Keep your AI app online when a model provider goes down
Add automatic fallback between models with one extra field. When the first model errors, the next one answers, and your users never see the outage.
Every model provider has outages, rate limits and slow periods. If your app calls one model directly, each of those turns into an error for your users.
The usual fix is a retry loop with a second provider: a second SDK, a second API key, a second request format and a lot of error handling. With Utopixel it is one field.
The models list
Send models with the backups you want, in order. Utopixel calls the first model, and if the provider returns an error it moves to the next one.
curl https://utopixel.online/api/v1/chat/completions \
-H "Authorization: Bearer sk-vb-..." \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-3.8-flash",
"models": ["deepseek/deepseek-v4.1-flash", "openai/gpt-6-luna"],
"messages": [{"role": "user", "content": "Classify this support ticket."}]
}'
In the OpenAI Python SDK, pass it through extra_body:
from openai import OpenAI
client = OpenAI(base_url="https://utopixel.online/api/v1", api_key="sk-vb-...")
resp = client.chat.completions.create(
model="google/gemini-3.8-flash",
messages=[{"role": "user", "content": "Classify this support ticket."}],
extra_body={"models": ["deepseek/deepseek-v4.1-flash", "openai/gpt-6-luna"]},
)
print(resp.model) # which model answered
print(resp.usage.cost) # what it cost, in USD
You can also leave out model and only send models. The first entry is used as the main model.
How to pick backups
A good backup is a model from a different company with similar quality and price. If Google has an incident, a DeepSeek or OpenAI model is unlikely to share it.
| Main model | Good backups |
|---|---|
google/gemini-3.8-flash |
deepseek/deepseek-v4.1-flash, openai/gpt-6-luna |
google/gemini-4-argon |
openai/gpt-6.1-sol, x-ai/grok-4.7 |
deepseek/deepseek-v4-pro |
moonshotai/kimi-k3, z-ai/glm-5 |
Every model accepts the same request format, so the same messages and parameters work on each backup. If you use tool calls, pick backups whose model page lists tool support.
You only pay for the answer
Each request is billed for the model that answered. A failed attempt on the first model does not cost you anything, and usage.cost shows the real price of what you got.
What your logs see
The model field in the response names the model that actually answered, not the one you asked for first. Log it, and you can see how often your main model failed and which backup covered for it.
Try it
Get an API key, keep the OpenAI or Anthropic SDK you already use, and add one field. The docs cover streaming, tool calls and error codes.