# Model IDs (/docs/model-naming)

A model ID has the form `creator/model`, for example `anthropic/claude-sonnet-5-5`, `openai/gpt-5.4-nano` or `zhipu/glm-5.3-flash`. The creator is the company that made the model, not the provider that hosts it. IDs are case-sensitive and must match exactly.

## Look IDs up [#look-ids-up]

Models are added and retired every week, so read IDs from the live list instead of hard-coding what you remember. `GET /v1/models` needs no key:

```bash
curl -s https://api.ohmygpt.com/v1/models \
  | jq -r '.data[] | select(.id | test("claude-sonnet")) | [.id, ([.protocols[].path] | join(" ")), (.lifecycle.sunset_at // "")] | @tsv'
```

```text
anthropic/claude-sonnet-4-5            /v1/chat/completions /v1/responses /v1/messages /v1/models/{id}:generateContent  2026-11-30
anthropic/claude-sonnet-4-5-20250929   /v1/chat/completions /v1/responses /v1/messages /v1/models/{id}:generateContent  2026-11-30
anthropic/claude-sonnet-4-6            /v1/chat/completions /v1/responses /v1/messages /v1/models/{id}:generateContent
anthropic/claude-sonnet-5-5            /v1/chat/completions /v1/responses /v1/messages /v1/models/{id}:generateContent
```

Fetch one model by appending its ID: `GET /v1/models/anthropic/claude-sonnet-4-5`. Trimmed:

```json
{
  "id": "anthropic/claude-sonnet-4-5",
  "name": "Claude Sonnet 4.5",
  "available": true,
  "context_length": 200000,
  "lifecycle": {
    "status": "deprecated",
    "deprecated_at": "2026-09-30",
    "sunset_at": "2026-11-30",
    "successor": "anthropic/claude-sonnet-5-5"
  },
  "protocols": [
    { "path": "/v1/chat/completions" },
    { "path": "/v1/responses" },
    { "path": "/v1/messages" },
    { "path": "/v1/models/{id}:generateContent" }
  ],
  "providers": [{ "provider": "anthropic", "display_name": "Anthropic" }]
}
```

| Field | Meaning |
|---|---|
| `protocols[].path` | The endpoints this model accepts. Calling any other endpoint returns `400 unsupported_endpoint`. |
| `available` | `true` when the model can be called now. |
| `providers[].provider` | The provider slugs that serve this model. Use them for [provider routing](/docs/provider-routing). |
| `lifecycle` | Present for models being retired: `sunset_at` is the day the model stops working and `successor` is the suggested replacement. Also present for models added here after their release: `listed_at` is the day they became available, while `created` stays the release date. |
| `managed_routing` | `true` when OhMyGPT selects the provider for you. Call these models by their plain ID. |

Prices for every model are on the [models page](https://www.ohmygpt.com/models).

## Pin a provider [#pin-a-provider]

Prefix the ID with a provider slug and a colon to send the request only to that provider:

```bash
curl https://api.ohmygpt.com/v1/chat/completions \
  -H "Authorization: Bearer $OHMYGPT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "tencent:zhipu/glm-5.3-flash", "messages": [{"role": "user", "content": "Hi"}]}'
```

The prefix works on every endpoint, including `/v1/messages` and the Gemini path. Use a slug from the model's `providers` list; any other slug returns `404 model_not_found`. [Provider routing](/docs/provider-routing) covers ordering and filtering providers without pinning one.

## Unknown and retired IDs [#unknown-and-retired-ids]

An ID that doesn't exist, or a model that has been removed, returns 404:

```json
{
  "error": {
    "param": "model",
    "code": "model_not_found",
    "message": "The model `openai/gpt-4o-mini-typo` does not exist. List available models with `GET /v1/models`.",
    "type": "not_found_error"
  }
}
```

Look the ID up again, or move to the `successor` named in `lifecycle`.

Send the ID exactly as listed, with nothing appended. To prefer the cheapest or fastest provider, set `provider.sort` as shown in [Provider routing](/docs/provider-routing).
