> 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: nexos-...` for a user key or `X-Api-Key: nexos-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.\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."},"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,"description":"Maximum number of context (input) tokens the model supports."},"pricing":{"$ref":"#/components/schemas/ModelPricing"},"endpoints":{"$ref":"#/components/schemas/Endpoints"},"region":{"$ref":"#/components/schemas/ModelRegion"}},"required":["id","object","created","updated","name","owned_by"]},"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"}},"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","speech_generation","transcription","translation","moderation"]}},"ModelRegion":{"type":"string","description":"Region the model is hosted in.","enum":["EU","US","OTHER"]}}},"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: nexos-...` for a user key or `X-Api-Key: nexos-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,"description":"Maximum number of context (input) tokens the model supports."},"pricing":{"$ref":"#/components/schemas/ModelPricing"},"endpoints":{"$ref":"#/components/schemas/Endpoints"},"region":{"$ref":"#/components/schemas/ModelRegion"},"provider":{"type":"string","description":"Company providing the model."},"available":{"type":"boolean","description":"If true, model is already assigned to user's team."}},"required":["id","object","created","updated","name","owned_by","available","region"]},"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"}},"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","speech_generation","transcription","translation","moderation"]}},"ModelRegion":{"type":"string","description":"Region the model is hosted in.","enum":["EU","US","OTHER"]}}},"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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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: nexos-...` for a user key or `X-Api-Key: nexos-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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
