Documentation
ModelConduit exposes an OpenAI-compatible API. Any client that speaks the OpenAI Chat Completions format works: change the base URL to https://modelconduit.com/api/v1 and use a ModelConduit key.
from openai import OpenAI
client = OpenAI(base_url="https://modelconduit.com/api/v1", api_key="<MODELCONDUIT_API_KEY>")
resp = client.chat.completions.create(
model="anthropic/claude-sonnet-5-5",
messages=[{"role": "user", "content": "Write a haiku about Mumbai rain."}],
)
print(resp.choices[0].message.content)Authentication
Send your key as a bearer token on every request. Create and revoke keys on the API keys page.
Authorization: Bearer mc-xxxxxxxxxxxxxxxxxxxxxxxxChat completions
POST /api/v1/chat/completions
| model | string, required | A model id such as anthropic/claude-opus-5-5. See /models. |
| messages | array, required | OpenAI-format messages: system, user and assistant. Images as image_url parts. |
| stream | boolean | Stream tokens as server-sent events. |
| max_tokens | integer | Upper bound on output tokens (capped at the model's limit). |
| reasoning_effort | string | low · medium · high · xhigh · max — passed to models that support effort. |
| models | array | Fallback list tried in order if a provider is down or rate-limited. |
Every response includes usage.cost_usd — the exact charge for that request at provider list price.
Streaming
Set "stream": true. You receive chat.completion.chunk events, then a final chunk with usage, then data: [DONE].
stream = client.chat.completions.create(
model="anthropic/claude-haiku-5-5",
messages=[{"role": "user", "content": "Count to five."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")Model fallback
Pass models to try several models in order. If the first provider is down, out of capacity or rate-limited, the request moves to the next one. Request errors (bad input) are returned immediately.
{
"model": "anthropic/claude-sonnet-5-5",
"models": ["anthropic/claude-sonnet-5-5", "openai/gpt-5", "google/gemini-2.5-pro"],
"messages": [{"role": "user", "content": "Summarise this invoice…"}]
}Claude Opus 5.5, Sonnet 5.5 and Fable models also use Anthropic's built-in refusal fallback, which re-runs a declined request on another Claude model.
List models
GET /api/v1/models returns every model with context length and pricing.
Errors
| 400 | invalid_request | Missing model or messages, or a malformed body. |
| 401 | invalid_api_key | Missing or wrong API key. |
| 402 | insufficient_credits | Your balance is empty. Top up on the Credits page. |
| 402 | key_limit_reached | This key has hit the credit limit you set for it. |
| 404 | model_not_found | The model id doesn't exist. |
| 429 | rate_limited | Too many requests — retry with backoff. |
| 503 | provider_unavailable | The provider is down or not configured; use models fallback. |
Billing & usage
ModelConduit is prepaid. Each request is charged at the provider's list price and deducted from your credit balance. Card top-ups carry a 5% platform fee; USD bank-wire top-ups have no fee. Invoices for Indian businesses include your GSTIN and the reverse-charge note.