latestOpenAPI 3.1.02026-08-236994571.1 MB

79928a3d37d3

Fallback Management

Create Fallback

Create or update fallbacks for a specific model.

This endpoint allows you to configure fallback models separately from the general config. Fallbacks are triggered when a model call fails after retries.

Example Request:

{
    "model": "gpt-3.5-turbo",
    "fallback_models": ["gpt-4", "claude-3-haiku"],
    "fallback_type": "general"
}

Fallback Types:

  • general: Standard fallbacks for any error (default)
  • context_window: Fallbacks specifically for context window exceeded errors
  • content_policy: Fallbacks specifically for content policy violations
post/fallback

Request body

modelstring required

The model name to configure fallbacks for (e.g., 'gpt-3.5-turbo')

fallback_modelsstring[] required

List of fallback model names in order of priority

fallback_type'general' | 'context_window' | 'content_policy'

Type of fallback: 'general' (default), 'context_window', or 'content_policy'

Response

Successful Response

modelstring required

The model name

fallback_modelsstring[] required

List of fallback model names

fallback_typestring required

Type of fallback

messagestring required

Success message