litellmEasy Examples

Unified API to call 100+ LLM providers (OpenAI, Anthropic, etc.)

Getting started with litellm

Installation and basic usage of litellm.

python
# Install: pip install litellm
import litellm

# Basic litellm usage
print(f"Using litellm")
# See documentation for detailed examples
Expected Output
# Expected output shown below
# (Run locally with: litellm)

litellm is a third-party package. Unified API to call 100+ LLM providers (OpenAI, Anthropic, etc.). Install with: pip install litellm

Common litellm operations

Frequently used features of litellm.

python
# Install: pip install litellm
import litellm

# Common litellm patterns
print(f"litellm version: {litellm.__version__}")

These are the most commonly used features of litellm in everyday development.

Want to try these examples interactively?

Open Easy Playground