# Model discovery

Request the catalog with the same key that will make the inference request:

```bash
curl https://api.thecodeapi.com/v1/models \
  -H "Authorization: Bearer $THE_CODE_API_KEY"
```

The returned `data` array follows the OpenAI model-list shape and includes capability and request-contract information. Select a returned `id`; inspect its capabilities, supported parameters, and token limits. Use a chat model for Chat Completions or Responses, and an embeddings model for embeddings.

## Why models differ between accounts

Model discovery applies platform approval, active provider credentials, user-enabled models, aliases, and capability policy. Disabled or incompletely configured models are absent. Enable an available model in [Dashboard → Models](https://thecodeapi.com/dashboard?tab=models), or contact support if the required model is unavailable.

Refresh discovery after a routing error or configuration change. Do not build model inventories from documentation or upstream catalogs. The gateway returns catalog revision headers and an ETag for clients that cache discovery.

The public documentation MCP server explains discovery; it does not receive a key or return private account catalogs. Applications call this authenticated API directly.
