SilentAPI Logo SilentAPI

Fallbacks

Automatic model fallback when the primary model fails

SilentAPI tries another route when the selected route fails. Enable cross-model fallbacks to try selected text models after a retryable error.

How It Works

  1. Request a model, for example gpt-6-sol.
  2. If the model returns a retryable error, SilentAPI tries the next model.
  3. The silentapi object names the model that served the request.
  4. If every fallback fails, SilentAPI returns the last error.

Checking If Fallback Was Used

Every response includes a silentapi object:

"silentapi": {
    "cost": 0.000045,
    "fallback": "claude-sonnet-5.5",
    "model": "claude-sonnet-5.5",
    "model_name": "Claude Sonnet 5.5",
    "requested_model": "gpt-6-sol",
    "substituted": true,
    "notice": "GPT 6 Sol was unavailable, so SilentAPI served this request with Claude Sonnet 5.5."
}
FieldTypeMeaning
costnumberCharge in credits for the model that served the request
fallbackstring or nullID of the fallback model that served the request, or null
modelstringID of the model that served the request
model_namestringName of the model that served the request
requested_modelstringRequested model ID. Only present when another model served the request.
substitutedbooleantrue. Only present when another model served the request.
noticestringShort text about the change. Only present when another model served the request.

Eligible Error Codes

Fallback is triggered when the requested model returns one of these status codes:

StatusReason
401Authentication error (key rotation)
402Service payment or quota error
403Forbidden (key issue)
404Requested model unavailable on that route
408Request timeout
409Conflict
425Too early
429Rate limited
500+Server errors
TimeoutThe model did not respond in time

Custom Fallback Models

Configure a cross-model fallback chain on the Fallbacks page. SilentAPI retries the request on the selected models after a retryable error.

Set up to two preferred fallback models. SilentAPI tries the primary model, then the selected fallback models. If you select no models, it uses the account defaults.

Cross-model fallbacks are disabled by default. Turn on Enable cross-model fallbacks, select models, and save. Fallbacks follow retryable service errors. Invalid requests such as 400 and 422 do not trigger them. Account key and balance errors do not trigger them.

Streaming and Fallbacks

SilentAPI selects the first available route before a stream starts. After the stream starts to send data, SilentAPI cannot retry the request with a different model. If you need fallbacks after output starts, do not set stream: true.