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

# Models

## Retrieve all available models

> This endpoint retrieves information about all available models. An optional API key can be provided via the \`Authorization\` header; when present, results are scoped to the models and providers available based on the inference settings. Provider filtering parameters mirror those accepted by the chat completions endpoint.

```json
{"openapi":"3.0.0","info":{"title":"Cortecs Model API","version":"1.0.0"},"servers":[{"url":"https://api.cortecs.ai/v1"}],"security":[{"bearerAuth":[]},{}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Optional API key. When provided, the response is filtered to only include models and providers available based on the inference settings."}},"schemas":{"Models":{"type":"object","required":["object","data"],"properties":{"object":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}}},"Model":{"type":"object","required":["id","object","created","owned_by","pricing","providers"],"properties":{"id":{"type":"string"},"object":{"type":"string"},"created":{"type":"integer"},"owned_by":{"type":"string"},"description":{"type":"string","nullable":true},"pricing":{"$ref":"#/components/schemas/Pricing"},"providers":{"type":"array","items":{"type":"string"}},"context_size":{"type":"integer","description":"The maximum context size for this model.","nullable":true},"tags":{"type":"array","items":{"type":"string"},"nullable":true},"input_modalities":{"type":"array","description":"Supported input modalities (e.g. text, image, audio) derived from the model tags.","items":{"type":"string"}},"output_modalities":{"type":"array","description":"Supported output modalities (e.g. text, audio, embeddings) derived from the model tags.","items":{"type":"string"}},"supported_features":{"type":"array","description":"Features supported by this model across all available providers. Current values include `json_mode`, `reasoning`, and `tools`.","items":{"type":"string","enum":["json_mode","reasoning","tools"]}},"model_series":{"type":"array","items":{"type":"string"},"nullable":true},"providers_details":{"type":"object","description":"Per-provider breakdown keyed by provider name. Only present when `extended=true`, and always included by the single-model endpoint.","additionalProperties":{"$ref":"#/components/schemas/ProviderDetails"}}}},"Pricing":{"type":"object","description":"Pricing details. On the model level the cost numbers represent the minimums based on the cheapest provider available for this model.","required":["input_token","output_token","currency"],"properties":{"input_token":{"type":"number","description":"Input token cost per 1M tokens"},"output_token":{"type":"number","description":"Output token cost per 1M tokens"},"audio_cost":{"type":"number","description":"Audio cost per second (if supported)"},"speech_cost":{"type":"number","description":"Speech cost per 1M characters (if supported)"},"cache_read_cost":{"type":"number","description":"Cache read cost per 1M tokens (if supported)"},"cache_write_cost":{"type":"number","description":"Cache write cost per 1M tokens (if supported)"},"currency":{"type":"string","description":"The currency of the prices (e.g. EUR, USD)"}}},"ProviderDetails":{"type":"object","description":"Per-provider details, keyed by provider name. Only present when `extended=true` (and always for the single-model endpoint).","properties":{"pricing":{"$ref":"#/components/schemas/Pricing"},"quantization":{"type":"string","description":"The quantization applied by this provider, if any.","nullable":true},"context_size":{"type":"integer","description":"The context size offered by this provider.","nullable":true},"supported_features":{"type":"array","description":"Features supported by this provider. Current values include `json_mode`, `reasoning`, and `tools`.","items":{"type":"string","enum":["json_mode","reasoning","tools"]}}}}}},"paths":{"/models":{"get":{"summary":"Retrieve all available models","description":"This endpoint retrieves information about all available models. An optional API key can be provided via the `Authorization` header; when present, results are scoped to the models and providers available based on the inference settings. Provider filtering parameters mirror those accepted by the chat completions endpoint.","parameters":[{"name":"tag","in":"query","description":"One or more tags to filter by (defaults to ['Instruct'])","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"currency","in":"query","description":"ISO currency code for pricing conversion (defaults to 'EUR')","required":false,"schema":{"type":"string","default":"EUR"}},{"name":"allowed_providers","in":"query","description":"Restrict results to models that are available on at least one of the specified providers. Accepts multiple values.","required":false,"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},{"name":"eu_native","in":"query","description":"When `true`, only models hosted by providers that are based and regulated within the EU are returned. Even when `false`, all endpoints remain GDPR compliant.","required":false,"schema":{"type":"boolean"}},{"name":"allow_quantization","in":"query","description":"When `false`, quantized model variants are excluded from the results. Defaults to `true`.","required":false,"schema":{"type":"boolean"}},{"name":"allow_zero_data_retention","in":"query","description":"When `true`, only models available on providers that offer zero data retention (ZDR) are returned.","required":false,"schema":{"type":"boolean"}},{"name":"extended","in":"query","description":"When `true`, each model additionally includes a `providers_details` object with a per-provider breakdown of pricing, quantization, context size and supported features. Defaults to `false`.","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"A list of available models","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models"}}}},"401":{"description":"Invalid or expired API key"},"500":{"description":"Internal server error"}}}}}}
```

## Retrieve a single model

> Retrieve detailed information about a specific model. The response always includes the \`providers\_details\` per-provider breakdown. An optional API key can be provided via the \`Authorization\` header; when present, results are scoped to the models and providers available based on the inference settings. The same provider filtering parameters as \`/models\` are accepted and are applied to the model's provider list. If no matching model (with at least one allowed provider) is found, \`null\` is returned.

```json
{"openapi":"3.0.0","info":{"title":"Cortecs Model API","version":"1.0.0"},"servers":[{"url":"https://api.cortecs.ai/v1"}],"security":[{"bearerAuth":[]},{}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Optional API key. When provided, the response is filtered to only include models and providers available based on the inference settings."}},"schemas":{"Model":{"type":"object","required":["id","object","created","owned_by","pricing","providers"],"properties":{"id":{"type":"string"},"object":{"type":"string"},"created":{"type":"integer"},"owned_by":{"type":"string"},"description":{"type":"string","nullable":true},"pricing":{"$ref":"#/components/schemas/Pricing"},"providers":{"type":"array","items":{"type":"string"}},"context_size":{"type":"integer","description":"The maximum context size for this model.","nullable":true},"tags":{"type":"array","items":{"type":"string"},"nullable":true},"input_modalities":{"type":"array","description":"Supported input modalities (e.g. text, image, audio) derived from the model tags.","items":{"type":"string"}},"output_modalities":{"type":"array","description":"Supported output modalities (e.g. text, audio, embeddings) derived from the model tags.","items":{"type":"string"}},"supported_features":{"type":"array","description":"Features supported by this model across all available providers. Current values include `json_mode`, `reasoning`, and `tools`.","items":{"type":"string","enum":["json_mode","reasoning","tools"]}},"model_series":{"type":"array","items":{"type":"string"},"nullable":true},"providers_details":{"type":"object","description":"Per-provider breakdown keyed by provider name. Only present when `extended=true`, and always included by the single-model endpoint.","additionalProperties":{"$ref":"#/components/schemas/ProviderDetails"}}}},"Pricing":{"type":"object","description":"Pricing details. On the model level the cost numbers represent the minimums based on the cheapest provider available for this model.","required":["input_token","output_token","currency"],"properties":{"input_token":{"type":"number","description":"Input token cost per 1M tokens"},"output_token":{"type":"number","description":"Output token cost per 1M tokens"},"audio_cost":{"type":"number","description":"Audio cost per second (if supported)"},"speech_cost":{"type":"number","description":"Speech cost per 1M characters (if supported)"},"cache_read_cost":{"type":"number","description":"Cache read cost per 1M tokens (if supported)"},"cache_write_cost":{"type":"number","description":"Cache write cost per 1M tokens (if supported)"},"currency":{"type":"string","description":"The currency of the prices (e.g. EUR, USD)"}}},"ProviderDetails":{"type":"object","description":"Per-provider details, keyed by provider name. Only present when `extended=true` (and always for the single-model endpoint).","properties":{"pricing":{"$ref":"#/components/schemas/Pricing"},"quantization":{"type":"string","description":"The quantization applied by this provider, if any.","nullable":true},"context_size":{"type":"integer","description":"The context size offered by this provider.","nullable":true},"supported_features":{"type":"array","description":"Features supported by this provider. Current values include `json_mode`, `reasoning`, and `tools`.","items":{"type":"string","enum":["json_mode","reasoning","tools"]}}}}}},"paths":{"/models/{model_id}":{"get":{"summary":"Retrieve a single model","description":"Retrieve detailed information about a specific model. The response always includes the `providers_details` per-provider breakdown. An optional API key can be provided via the `Authorization` header; when present, results are scoped to the models and providers available based on the inference settings. The same provider filtering parameters as `/models` are accepted and are applied to the model's provider list. If no matching model (with at least one allowed provider) is found, `null` is returned.","parameters":[{"name":"model_id","in":"path","description":"The model identifier (e.g. `mistral-small-2503`).","required":true,"schema":{"type":"string"}},{"name":"tag","in":"query","description":"One or more tags to filter by (defaults to ['Instruct'])","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"currency","in":"query","description":"ISO currency code for pricing conversion (defaults to 'EUR')","required":false,"schema":{"type":"string","default":"EUR"}},{"name":"allowed_providers","in":"query","description":"Restrict the model's provider list to at least one of the specified providers. Accepts multiple values.","required":false,"schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},{"name":"eu_native","in":"query","description":"When `true`, only providers that are based and regulated within the EU are considered. Even when `false`, all endpoints remain GDPR compliant.","required":false,"schema":{"type":"boolean"}},{"name":"allow_quantization","in":"query","description":"When `false`, quantized provider variants are excluded. Defaults to `true`.","required":false,"schema":{"type":"boolean"}},{"name":"allow_zero_data_retention","in":"query","description":"When `true`, only providers that offer zero data retention (ZDR) are considered.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"The requested model, or `null` if it was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}}},"401":{"description":"Invalid or expired API key"},"500":{"description":"Internal server error"}}}}}}
```
