ModelConduit

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.

python
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.

http
Authorization: Bearer mc-xxxxxxxxxxxxxxxxxxxxxxxx

Chat completions

POST /api/v1/chat/completions

modelstring, requiredA model id such as anthropic/claude-opus-5-5. See /models.
messagesarray, requiredOpenAI-format messages: system, user and assistant. Images as image_url parts.
streambooleanStream tokens as server-sent events.
max_tokensintegerUpper bound on output tokens (capped at the model's limit).
reasoning_effortstringlow · medium · high · xhigh · max — passed to models that support effort.
modelsarrayFallback 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].

python
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.

json
{
  "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

400invalid_requestMissing model or messages, or a malformed body.
401invalid_api_keyMissing or wrong API key.
402insufficient_creditsYour balance is empty. Top up on the Credits page.
402key_limit_reachedThis key has hit the credit limit you set for it.
404model_not_foundThe model id doesn't exist.
429rate_limitedToo many requests — retry with backoff.
503provider_unavailableThe 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.