> For the complete documentation index, see [llms.txt](https://docs.nexos.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexos.ai/gateway-api/models.md).

# Models

List available models.

## List models

> List all models available to the user.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"UserModelsResponse":{"description":"A list of models available to use for the current user.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserModel"}},"total":{"type":"integer"}},"required":["object","data","total"]}}}}},"schemas":{"UserModel":{"type":"object","properties":{"id":{"type":"string","description":"The model identifier, which can be referenced in the API endpoints. This is the model's display name as shown in the console; matching in the `model` request field is case-insensitive but otherwise exact, and also accepts the model's canonical id.\n"},"nexos_model_id":{"type":"string","description":"Internal model identifier, which also can be referenced in the API endpoints."},"object":{"type":"string","description":"The object type, which is always \"model\"."},"created":{"type":"integer","format":"int64","description":"The Unix timestamp (in seconds) when the model was created."},"updated":{"type":"integer","format":"int64","description":"The Unix timestamp (in seconds) when the model was updated."},"owned_by":{"type":"string","description":"The organization that owns the model."},"developer":{"type":"string","description":"Company that developed the model."},"data_retention_period_days":{"type":"integer","format":"int32","minimum":0,"nullable":true,"description":"Number of days the provider retains request and response data. Null when the provider has no retention policy configured.\n"},"is_used_for_training":{"type":"boolean","description":"Whether the provider uses request and response data to train its models."},"name":{"type":"string","description":"Model name","deprecated":true},"timeout_ms":{"type":"integer","format":"int32","minimum":1,"description":"Model response timeout (milliseconds)"},"stream_timeout_ms":{"type":"integer","format":"int32","minimum":1,"description":"Model response timeout when streaming is enabled (milliseconds)"},"max_tokens":{"type":"integer","format":"int32","minimum":1,"description":"Maximum number of tokens the model can generate in a single request."},"context_length":{"type":"integer","format":"int32","minimum":1,"nullable":true,"deprecated":true,"description":"Deprecated alias for max_context_length, always equal to it. Use max_context_length instead. Null when the model's context window is unknown."},"max_context_length":{"type":"integer","format":"int32","minimum":1,"nullable":true,"description":"The model's total context window, in tokens. Independent of max_tokens and max_input_tokens. Null when the model's context window is unknown."},"min_cache_context_length":{"type":"integer","format":"int32","minimum":1,"nullable":true,"description":"Smallest prompt the provider will cache, in tokens. This is a caching floor, not a floor on accepted input. Null when the provider documents no floor."},"retirement_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true,"description":"Model retirement date. Null when no retirement date has been announced."},"health":{"$ref":"#/components/schemas/ModelHealth"},"pricing":{"$ref":"#/components/schemas/ModelPricing"},"endpoints":{"$ref":"#/components/schemas/Endpoints"},"input_modalities":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Input types the model accepts. The list is non-exhaustive: values seen so far are `text`, `image`, `audio`, `video`, `pdf`, `vision`, `assistant_prefill` and `embedding_image`, and consumers must tolerate values not listed here. Only types the model is known to accept appear, so a type missing from the list is not necessarily unsupported. `null` means no input type is known for this model; an empty list means the model is known to accept none of them."},"output_modalities":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Output types the model produces. The list is non-exhaustive: values seen so far are `text`, `image` and `audio`, and consumers must tolerate values not listed here. Only types the model is known to produce appear, so a type missing from the list is not necessarily unsupported. `null` means no output type is known for this model; an empty list means the model is known to produce none of them."},"supports_tools":{"type":"boolean","nullable":true,"description":"Whether the model supports function / tool calling. `null` means the capability is unknown, which is not the same as `false`."},"supports_structured_outputs":{"type":"boolean","nullable":true,"description":"Whether the model supports schema-constrained JSON output. `null` means the capability is unknown, which is not the same as `false`."},"supports_streaming":{"type":"boolean","nullable":true,"description":"Whether the model supports streaming responses. `null` means the capability is unknown, which is not the same as `false`."},"supports_reasoning":{"type":"boolean","nullable":true,"description":"Whether the model supports reasoning. `null` means the capability is unknown, which is not the same as `false`."},"region":{"$ref":"#/components/schemas/ModelRegion"},"provider":{"type":"string","description":"Provider hosting the model. Falls back to the provider identifier when the hosting provider is not set."},"icon_url":{"type":"string","description":"URL of the provider icon."},"capabilities":{"description":"Advanced request parameters supported by the model.","allOf":[{"$ref":"#/components/schemas/Capabilities"}]},"features":{"description":"Public features supported by the model.","allOf":[{"$ref":"#/components/schemas/PublicModelFeatures"}]},"latency":{"$ref":"#/components/schemas/ModelLatency"}},"required":["id","object","created","updated","name","owned_by","data_retention_period_days","is_used_for_training","retirement_date","latency","health"]},"ModelHealth":{"type":"object","nullable":true,"description":"Availability of the model, derived from a rolling 7-day window of gateway requests. Null when no signal has been collected yet, which is not the same as `down`.","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/ModelHealthStatus"},"uptime":{"type":"number","format":"float","nullable":true,"description":"Percentage of requests that succeeded over the rolling 7-day window. Null when the window holds too few requests to judge.\n"},"updated_at":{"type":"string","format":"date-time","nullable":true,"description":"When the health figures were last computed."}}},"ModelHealthStatus":{"type":"string","description":"Current availability of the model, derived from a rolling 7-day window of gateway requests. Always present within a `health` object; an absent `health` means no signal has been collected yet, which is not the same as `down`.\n","enum":["operational","degraded","down"]},"ModelPricing":{"properties":{"input_cost_per_token":{"type":"string"},"output_cost_per_token":{"type":"string"},"input_cost_per_second":{"type":"string"},"output_cost_per_second":{"type":"string"},"cache_write_cost_per_token":{"type":"string"},"cache_write_cost_per_token_1h_ttl":{"type":"string"},"cache_read_cost_per_token":{"type":"string"},"output_cost_first_megapixel":{"type":"string","description":"USD for the first output megapixel of an image generation request. A megapixel is 1024x1024. Billable megapixels are rounded up with a minimum of one, matching the vendor invoice.\n"},"output_cost_per_additional_megapixel":{"type":"string","description":"USD for each output megapixel beyond the first, on models priced by output resolution. Only meaningful together with output_cost_first_megapixel.\n"},"input_cost_per_reference_megapixel":{"type":"string","description":"USD per megapixel of reference image supplied as input.\n"},"max_billable_megapixel":{"type":"string","description":"Upper bound, in megapixels, on the billable area of a single image generation request. A request larger than this is billed at the cap.\n"}},"type":"object","title":"Model Pricing"},"Endpoints":{"type":"array","items":{"type":"string","description":"Array of endpoints supported by model","enum":["chat_completion","messages","completion","responses","realtime","assistants","batches","fine_tuning","embeddings","image_generation","image_edit","speech_generation","transcription","translation","moderation"]}},"ModelRegion":{"type":"string","description":"Region the model is hosted in, as configured on the base model.","enum":["EU","US","UK","CA","APAC","LATAM","MENA","AUNZ","EEA_CH_UK","OTHER"]},"Capabilities":{"type":"array","items":{"type":"string","enum":["prompt_caching","prompt_cache_key","safety_identifier","response_schema","system_messages","tool_choice","agentic_tool_calling_loops"]}},"PublicModelFeatures":{"type":"array","items":{"type":"string","enum":["streaming","structured_output","reasoning","thinking","extended_thinking"]}},"ModelLatency":{"type":"object","nullable":true,"description":"Latency figures observed for the model over the last 24 hours of gateway requests. Null when the window held too few requests to compute any of them.","properties":{"ttft_p50_ms":{"type":"number","format":"double","nullable":true,"description":"Median time to first token, in milliseconds. For a non-streaming request the total duration stands in for it. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"ttft_p95_ms":{"type":"number","format":"double","nullable":true,"description":"95th percentile time to first token, in milliseconds. For a non-streaming request the total duration stands in for it. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"e2e_p50_ms":{"type":"number","format":"double","nullable":true,"description":"Median end-to-end request duration, in milliseconds. Measured at the gateway, so it includes gateway overhead. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"e2e_p95_ms":{"type":"number","format":"double","nullable":true,"description":"95th percentile end-to-end request duration, in milliseconds. Measured at the gateway, so it includes gateway overhead. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"time_per_output_token_p50_ms":{"type":"number","format":"double","nullable":true,"description":"Median time per output token, in milliseconds. Lower is faster. Only streaming requests that produced output tokens count, so it is null when the window holds too few of them, or while the figure is temporarily unavailable."},"time_per_output_token_p95_ms":{"type":"number","format":"double","nullable":true,"description":"95th percentile time per output token, in milliseconds. Lower is faster. Only streaming requests that produced output tokens count, so it is null when the window holds too few of them, or while the figure is temporarily unavailable."},"updated_at":{"type":"string","format":"date-time","nullable":true,"description":"End of the window the figures were computed over."}},"required":["ttft_p50_ms","ttft_p95_ms","e2e_p50_ms","e2e_p95_ms","time_per_output_token_p50_ms","time_per_output_token_p95_ms","updated_at"]}}},"paths":{"/v1/models":{"get":{"operationId":"get-user-models-v1","summary":"List models","description":"List all models available to the user.","tags":["Models"],"responses":{"200":{"$ref":"#/components/responses/UserModelsResponse"},"404":{"description":"User not found."}}}}}}
```

## List all models

> List all models including ones not available for the current user.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"responses":{"AllModelsResponse":{"description":"A list all models including ones not available for the current user.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/GlobalModel"}}},"required":["object","data"]}}}}},"schemas":{"GlobalModel":{"type":"object","properties":{"id":{"type":"string","description":"Internal model identifier, which also can be referenced in the API endpoints."},"object":{"type":"string","description":"The object type, which is always \"global_model\"."},"created":{"type":"integer","format":"int64","description":"The Unix timestamp (in seconds) when the model was created."},"updated":{"type":"integer","format":"int64","description":"The Unix timestamp (in seconds) when the model was updated."},"owned_by":{"type":"string","description":"The organization that owns the model."},"name":{"type":"string","description":"Model name"},"timeout_ms":{"type":"integer","format":"int32","minimum":1,"description":"Model response timeout (milliseconds)"},"stream_timeout_ms":{"type":"integer","format":"int32","minimum":1,"description":"Model response timeout when streaming is enabled (milliseconds)"},"max_tokens":{"type":"integer","format":"int32","minimum":1,"description":"Maximum number of tokens the model can generate in a single request."},"context_length":{"type":"integer","format":"int32","minimum":1,"nullable":true,"deprecated":true,"description":"Deprecated alias for max_context_length, always equal to it. Use max_context_length instead. Null when the model's context window is unknown."},"max_context_length":{"type":"integer","format":"int32","minimum":1,"nullable":true,"description":"The model's total context window, in tokens. Independent of max_tokens and max_input_tokens. Null when the model's context window is unknown."},"min_cache_context_length":{"type":"integer","format":"int32","minimum":1,"nullable":true,"description":"Smallest prompt the provider will cache, in tokens. This is a caching floor, not a floor on accepted input. Null when the provider documents no floor."},"retirement_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","nullable":true,"description":"Model retirement date. Null when no retirement date has been announced."},"health":{"$ref":"#/components/schemas/ModelHealth"},"pricing":{"$ref":"#/components/schemas/ModelPricing"},"endpoints":{"$ref":"#/components/schemas/Endpoints"},"input_modalities":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Input types the model accepts. The list is non-exhaustive: values seen so far are `text`, `image`, `audio`, `video`, `pdf`, `vision`, `assistant_prefill` and `embedding_image`, and consumers must tolerate values not listed here. Only types the model is known to accept appear, so a type missing from the list is not necessarily unsupported. `null` means no input type is known for this model; an empty list means the model is known to accept none of them."},"output_modalities":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Output types the model produces. The list is non-exhaustive: values seen so far are `text`, `image` and `audio`, and consumers must tolerate values not listed here. Only types the model is known to produce appear, so a type missing from the list is not necessarily unsupported. `null` means no output type is known for this model; an empty list means the model is known to produce none of them."},"supports_tools":{"type":"boolean","nullable":true,"description":"Whether the model supports function / tool calling. `null` means the capability is unknown, which is not the same as `false`."},"supports_structured_outputs":{"type":"boolean","nullable":true,"description":"Whether the model supports schema-constrained JSON output. `null` means the capability is unknown, which is not the same as `false`."},"supports_streaming":{"type":"boolean","nullable":true,"description":"Whether the model supports streaming responses. `null` means the capability is unknown, which is not the same as `false`."},"supports_reasoning":{"type":"boolean","nullable":true,"description":"Whether the model supports reasoning. `null` means the capability is unknown, which is not the same as `false`."},"region":{"$ref":"#/components/schemas/ModelRegion"},"developer":{"type":"string","description":"Company that developed the model."},"data_retention_period_days":{"type":"integer","format":"int32","minimum":0,"nullable":true,"description":"Number of days the provider retains request and response data. Null when the provider has no retention policy configured.\n"},"is_used_for_training":{"type":"boolean","description":"Whether the provider uses request and response data to train its models."},"available":{"type":"boolean","description":"If true, model is already assigned to user's team."},"provider":{"type":"string","description":"Provider hosting the model. Falls back to the provider identifier when the hosting provider is not set."},"icon_url":{"type":"string","description":"URL of the provider icon."},"capabilities":{"description":"Advanced request parameters supported by the model.","allOf":[{"$ref":"#/components/schemas/Capabilities"}]},"features":{"description":"Public features supported by the model.","allOf":[{"$ref":"#/components/schemas/PublicModelFeatures"}]},"latency":{"$ref":"#/components/schemas/ModelLatency"}},"required":["id","object","created","updated","name","owned_by","available","region","data_retention_period_days","is_used_for_training","retirement_date","latency","health"]},"ModelHealth":{"type":"object","nullable":true,"description":"Availability of the model, derived from a rolling 7-day window of gateway requests. Null when no signal has been collected yet, which is not the same as `down`.","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/ModelHealthStatus"},"uptime":{"type":"number","format":"float","nullable":true,"description":"Percentage of requests that succeeded over the rolling 7-day window. Null when the window holds too few requests to judge.\n"},"updated_at":{"type":"string","format":"date-time","nullable":true,"description":"When the health figures were last computed."}}},"ModelHealthStatus":{"type":"string","description":"Current availability of the model, derived from a rolling 7-day window of gateway requests. Always present within a `health` object; an absent `health` means no signal has been collected yet, which is not the same as `down`.\n","enum":["operational","degraded","down"]},"ModelPricing":{"properties":{"input_cost_per_token":{"type":"string"},"output_cost_per_token":{"type":"string"},"input_cost_per_second":{"type":"string"},"output_cost_per_second":{"type":"string"},"cache_write_cost_per_token":{"type":"string"},"cache_write_cost_per_token_1h_ttl":{"type":"string"},"cache_read_cost_per_token":{"type":"string"},"output_cost_first_megapixel":{"type":"string","description":"USD for the first output megapixel of an image generation request. A megapixel is 1024x1024. Billable megapixels are rounded up with a minimum of one, matching the vendor invoice.\n"},"output_cost_per_additional_megapixel":{"type":"string","description":"USD for each output megapixel beyond the first, on models priced by output resolution. Only meaningful together with output_cost_first_megapixel.\n"},"input_cost_per_reference_megapixel":{"type":"string","description":"USD per megapixel of reference image supplied as input.\n"},"max_billable_megapixel":{"type":"string","description":"Upper bound, in megapixels, on the billable area of a single image generation request. A request larger than this is billed at the cap.\n"}},"type":"object","title":"Model Pricing"},"Endpoints":{"type":"array","items":{"type":"string","description":"Array of endpoints supported by model","enum":["chat_completion","messages","completion","responses","realtime","assistants","batches","fine_tuning","embeddings","image_generation","image_edit","speech_generation","transcription","translation","moderation"]}},"ModelRegion":{"type":"string","description":"Region the model is hosted in, as configured on the base model.","enum":["EU","US","UK","CA","APAC","LATAM","MENA","AUNZ","EEA_CH_UK","OTHER"]},"Capabilities":{"type":"array","items":{"type":"string","enum":["prompt_caching","prompt_cache_key","safety_identifier","response_schema","system_messages","tool_choice","agentic_tool_calling_loops"]}},"PublicModelFeatures":{"type":"array","items":{"type":"string","enum":["streaming","structured_output","reasoning","thinking","extended_thinking"]}},"ModelLatency":{"type":"object","nullable":true,"description":"Latency figures observed for the model over the last 24 hours of gateway requests. Null when the window held too few requests to compute any of them.","properties":{"ttft_p50_ms":{"type":"number","format":"double","nullable":true,"description":"Median time to first token, in milliseconds. For a non-streaming request the total duration stands in for it. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"ttft_p95_ms":{"type":"number","format":"double","nullable":true,"description":"95th percentile time to first token, in milliseconds. For a non-streaming request the total duration stands in for it. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"e2e_p50_ms":{"type":"number","format":"double","nullable":true,"description":"Median end-to-end request duration, in milliseconds. Measured at the gateway, so it includes gateway overhead. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"e2e_p95_ms":{"type":"number","format":"double","nullable":true,"description":"95th percentile end-to-end request duration, in milliseconds. Measured at the gateway, so it includes gateway overhead. Null when the window holds too few requests to judge, or while the figure is temporarily unavailable."},"time_per_output_token_p50_ms":{"type":"number","format":"double","nullable":true,"description":"Median time per output token, in milliseconds. Lower is faster. Only streaming requests that produced output tokens count, so it is null when the window holds too few of them, or while the figure is temporarily unavailable."},"time_per_output_token_p95_ms":{"type":"number","format":"double","nullable":true,"description":"95th percentile time per output token, in milliseconds. Lower is faster. Only streaming requests that produced output tokens count, so it is null when the window holds too few of them, or while the figure is temporarily unavailable."},"updated_at":{"type":"string","format":"date-time","nullable":true,"description":"End of the window the figures were computed over."}},"required":["ttft_p50_ms","ttft_p95_ms","e2e_p50_ms","e2e_p95_ms","time_per_output_token_p50_ms","time_per_output_token_p95_ms","updated_at"]}}},"paths":{"/v1/models/all":{"get":{"operationId":"get-all-models-v1","summary":"List all models","description":"List all models including ones not available for the current user.","tags":["Models"],"responses":{"200":{"$ref":"#/components/responses/AllModelsResponse"},"404":{"description":"User not found."}}}}}}
```

## Get fallbacks configuration for particular model

> Fallback configuration for a specific model. Fallbacks are tried in the order the model IDs are provided in the list.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"ModelFallbacksConfiguration":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the model"},"fallback_ids":{"$ref":"#/components/schemas/ModelFallbacks"},"created_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was last updated."}},"required":["id"]},"ModelFallbacks":{"type":"array","items":{"type":"string","format":"uuid","description":"The ID of the model to associate with the company."}}}},"paths":{"/v1/management/models/{model}/fallbacks":{"get":{"operationId":"get-model-fallbacks-v1","summary":"Get fallbacks configuration for particular model","description":"Fallback configuration for a specific model. Fallbacks are tried in the order the model IDs are provided in the list.","tags":["Models"],"parameters":[{"name":"model","in":"path","required":true,"description":"The ID of the model.","schema":{"type":"string"}}],"responses":{"200":{"description":"Model fallbacks configuration found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksConfiguration"}}}},"400":{"description":"Invalid request."}}}}}}
```

## Add fallbacks configuration for particular model

> Add fallback configuration for a specific model. Fallbacks are tried in the order the model IDs are provided in the list.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"ModelFallbacksRequest":{"type":"object","properties":{"models":{"$ref":"#/components/schemas/ModelFallbacks"}},"required":["models"]},"ModelFallbacks":{"type":"array","items":{"type":"string","format":"uuid","description":"The ID of the model to associate with the company."}},"ModelFallbacksConfiguration":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the model"},"fallback_ids":{"$ref":"#/components/schemas/ModelFallbacks"},"created_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was last updated."}},"required":["id"]}}},"paths":{"/v1/management/models/{model}/fallbacks":{"post":{"operationId":"post-model-fallbacks-v1","summary":"Add fallbacks configuration for particular model","description":"Add fallback configuration for a specific model. Fallbacks are tried in the order the model IDs are provided in the list.","tags":["Models"],"parameters":[{"name":"model","in":"path","required":true,"description":"The ID of the model.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksRequest"}}}},"responses":{"201":{"description":"Model fallbacks configuration successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksConfiguration"}}}},"400":{"description":"Invalid request or fallback configurations already associated with the model."},"404":{"description":"Model not found."}}}}}}
```

## Delete model fallbacks configuration

> Delete model fallbacks configuration

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}}},"paths":{"/v1/management/models/{model}/fallbacks":{"delete":{"operationId":"delete-model-fallbacks-v1","summary":"Delete model fallbacks configuration","description":"Delete model fallbacks configuration","tags":["Models"],"parameters":[{"name":"model","in":"path","required":true,"description":"The ID of the model.","schema":{"type":"string"}}],"responses":{"204":{"description":"Model fallbacks configuration deleted successfully"},"400":{"description":"Invalid request."}}}}}}
```

## Update fallbacks configuration for particular model

> Update the fallback configuration for a specific model. Fallbacks are tried in the order the model IDs are provided in the list.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Models","description":"List available models."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"ModelFallbacksRequest":{"type":"object","properties":{"models":{"$ref":"#/components/schemas/ModelFallbacks"}},"required":["models"]},"ModelFallbacks":{"type":"array","items":{"type":"string","format":"uuid","description":"The ID of the model to associate with the company."}},"ModelFallbacksConfiguration":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the model"},"fallback_ids":{"$ref":"#/components/schemas/ModelFallbacks"},"created_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was created."},"updated_at":{"type":"string","format":"date-time","description":"The time the model fallbacks configuration was last updated."}},"required":["id"]}}},"paths":{"/v1/management/models/{model}/fallbacks":{"patch":{"operationId":"update-model-fallbacks-v1","summary":"Update fallbacks configuration for particular model","description":"Update the fallback configuration for a specific model. Fallbacks are tried in the order the model IDs are provided in the list.","tags":["Models"],"parameters":[{"name":"model","in":"path","required":true,"description":"The ID of the model.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksRequest"}}}},"responses":{"200":{"description":"Model fallbacks configuration successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFallbacksConfiguration"}}}},"400":{"description":"Invalid request."}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nexos.ai/gateway-api/models.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
