Get API key

Tools

Everything a request can switch on, in the fields the OpenAI SDK already sends.

One request, many switches.

Open cells you switch on per request.Sealed cells every request gets.

Each switch in code.

A line or two in the OpenAI SDK; nothing else in your code changes.

Sort providers
reply = client.chat.completions.create(
    model="moonshotai/kimi-k3",
    messages=messages,
Added:     extra_body={"provider": {"sort": "price"}},
)
Cheapest or fastest provider first
Order and fallbacks
reply = client.chat.completions.create(
    model="moonshotai/kimi-k3",
    messages=messages,
Added:     extra_body={"provider": {
Added:         "order": ["deepinfra", "novita"],
Added:         "allow_fallbacks": False,
Added:     }},
)
Your providers first, and only them if you like
Only and ignore
reply = client.chat.completions.create(
    model="moonshotai/kimi-k3",
    messages=messages,
Added:     extra_body={"provider": {"ignore": ["novita"]}},
)
Use only these providers, or never those
Keep it in the EU
reply = client.chat.completions.create(
    model="moonshotai/kimi-k3",
    messages=messages,
Added:     extra_body={"provider": {
Added:         "only": ["scaleway/eu", "simpleminds-eu/eu"],
Added:     }},
)
The request and its failover stay in the EU
Zero data retention
reply = client.chat.completions.create(
    model="moonshotai/kimi-k3",
    messages=messages,
Added:     extra_body={"provider": {"zdr": True}},
)
Only providers that keep prompts for 0 days
No training
reply = client.chat.completions.create(
    model="moonshotai/kimi-k3",
    messages=messages,
Added:     extra_body={"provider": {"data_collection": "deny"}},
)
Only providers that neither train nor keep
Tool calling
Added: tools = [{
Added:     "type": "function",
Added:     "function": {"name": "get_weather", "parameters": {
Added:         "type": "object",
Added:         "properties": {"city": {"type": "string"}},
Added:     }},
Added: }]
 
reply = client.chat.completions.create(
    model="moonshotai/kimi-k3",
    messages=messages,
Added:     tools=tools,
)
Let the model call your functions
Structured output
reply = client.chat.completions.create(
    model="moonshotai/kimi-k3",
    messages=messages,
Added:     response_format={
Added:         "type": "json_schema",
Added:         "json_schema": {"name": "city", "schema": {
Added:             "type": "object",
Added:             "properties": {"name": {"type": "string"}},
Added:         }},
Added:     },
)
An answer that follows your JSON schema
Reasoning
reply = client.chat.completions.create(
    model="moonshotai/kimi-k3",
    messages=messages,
Added:     extra_body={"reasoning": {"effort": "high"}},
)
One effort setting, every provider's terms
Prompt caching
reply = client.chat.completions.create(
    model="moonshotai/kimi-k3",
    messages=messages,
Added:     extra_body={"cache_control": {"type": "ephemeral"}},
)
Repeated prompt prefixes cost less
Sessions
reply = client.chat.completions.create(
    model="moonshotai/kimi-k3",
    messages=messages,
Added:     extra_body={"session_id": "support-chat-42"},
)
A conversation stays with its cache
Safe retries
reply = client.chat.completions.create(
    model="moonshotai/kimi-k3",
    messages=messages,
Added:     extra_headers={"Idempotency-Key": "order-7f3a"},
)
A retry never runs the request twice
Every field, in one place.The API reference lists each request field and what it does.