With ModelSwitch, you change only the model parameter — all other code stays the same. One API key, one endpoint, any model.
Available models
Flagship models
High capability for demanding tasks.
| Model ID | Provider | Notes |
|---|
gpt-4o | OpenAI | Multimodal |
claude-sonnet-4 | Anthropic | Excellent coding |
claude-opus-4 | Anthropic | Most powerful |
gemini-2.5-pro | Google | 1M context window |
o3 | OpenAI | Advanced reasoning |
deepseek-r1 | DeepSeek | Reasoning at low cost |
Mid-tier models
Balanced performance and cost.
| Model ID | Provider | Notes |
|---|
gpt-4.1-mini | OpenAI | |
claude-3.5-haiku | Anthropic | |
gemini-2.0-flash | Google | |
llama-4-scout | Meta | MoE architecture, large context |
mistral-medium | Mistral | |
Budget models
Optimized for high-volume workloads.
| Model ID | Provider | Notes |
|---|
gpt-4.1-nano | OpenAI | Cheapest OpenAI model |
llama-3.1-8b | Meta | Very cheap |
gemini-2.5-flash | Google | Reasoning at low cost |
mixtral-8x7b | Mistral | |
deepseek-v3 | DeepSeek | GPT-4o quality at a fraction of the cost |
GET /v1/models returns all available model IDs with live pricing. Use it to discover new models or build a model picker in your app.
Swap the model parameter
from openai import OpenAI
client = OpenAI(api_key="ms-YOUR_KEY", base_url="https://modelswitch.io/v1")
# Use any model — same code, different model name
for model in ["gpt-4o", "claude-sonnet-4", "gemini-2.5-pro"]:
response = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": "Explain quantum computing in one sentence."}]
)
print(f"{model}: {response.choices[0].message.content}")
Choosing a model
- Flagship — use when output quality is the top priority: complex reasoning, nuanced writing, or multimodal inputs.
- Mid-tier — a good default for most production workloads; strong quality at a lower cost than flagship.
- Budget — best for high-volume tasks where cost matters most, such as classification, summarization, or preprocessing pipelines.
- Specialized — some tasks benefit from purpose-built models. For example,
codestral for code generation or sonar-pro for search-augmented answers.
When in doubt, start with a flagship model to validate your use case, then switch down to a cheaper tier once you know the output quality is acceptable.