OhMyGPT

Model IDs

Look up model IDs, the endpoints each model accepts, and retirement dates.

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

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:

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

{
  "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" }]
}
FieldMeaning
protocols[].pathThe endpoints this model accepts. Calling any other endpoint returns 400 unsupported_endpoint.
availabletrue when the model can be called now.
providers[].providerThe provider slugs that serve this model. Use them for provider routing.
lifecyclePresent only for models being retired. sunset_at is the day the model stops working and successor is the suggested replacement.
managed_routingtrue when OhMyGPT selects the provider for you. Call these models by their plain ID.

Prices for every model are on the models page.

Pin a provider

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

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 covers ordering and filtering providers without pinning one.

Unknown and retired IDs

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

{
  "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.

On this page