{
 "schema_version": 1,
 "generated": "2026-10-23",
 "id": "berriai-litellm--call-100-llms-with-one-openai-format-api",
 "repo": "BerriAI/litellm",
 "repo_url": "https://github.com/BerriAI/litellm",
 "repo_slug": "berriai-litellm",
 "title": "Call 100+ LLM providers through one OpenAI-format API",
 "page_title": "How to call 100+ LLM providers through one OpenAI-format API with Litellm",
 "summary": "Switch between OpenAI, Anthropic and other providers in Python without rewriting request code.",
 "who": "A Python developer who calls more than one LLM provider and is tired of learning a different SDK and request format for each one.",
 "problem": "Each provider has its own SDK, auth pattern, request format and error types, so every new model adds integration work.",
 "outcome": "One completion call in OpenAI format returns responses from different providers by changing only the model string.",
 "steps": [
  "Install the SDK with `uv add litellm`",
  "Set the provider keys as environment variables, such as OPENAI_API_KEY and ANTHROPIC_API_KEY",
  "Call `completion` from Litellm with a model such as openai/gpt-4o",
  "Change the model string to anthropic/claude-sonnet-4-20250514 and run the same call again"
 ],
 "agent_prompt": "Using the litellm repo at <path>, write a short Python script that sends the message 'Hello!' to openai/gpt-4o and to anthropic/claude-sonnet-4-20250514 through litellm.completion. Expected output: two printed responses. Verify that both API keys are set in the environment before running.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "You still need a valid account and API key for each provider you call, and the provider's own pricing and limits apply.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Python and the uv package manager installed",
  "API keys for the LLM providers you plan to call, such as OpenAI or Anthropic",
  "For the gateway use cases: a machine to run the proxy server on and a LiteLLM master key or virtual key for clients"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/berriai-litellm/call-100-llms-with-one-openai-format-api/",
 "md": "https://dedupedai.com/use-cases/berriai-litellm/call-100-llms-with-one-openai-format-api/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/berriai-litellm--call-100-llms-with-one-openai-format-api.json",
 "api_version": "v1"
}
