EZAT RouterDocs
API 参考

List models (Anthropic format)

GET
/v1/models

Lists the models your key can use, in Anthropic's format, with canonical author/model ids. A key restricted to some models lists only those. Deprecated models are listed while they are still served; models in preview only for keys allowed to use them.

Every model comes in one page: has_more is always false, and the limit, before_id and after_id query parameters are ignored.

Authorization

headerx-api-key<token>

Your EZAT Router key (ezat_sk_…) in the x-api-key header, as the Anthropic SDKs send it. Accepted on every /v1 and /openai/v1 endpoint.

Header Parameters

anthropic-version?string

Accepted for compatibility with Anthropic's SDKs, which send it, but not used. You don't need to send it.

Response Body

The models your key can use.

application/json
  1. response
data*array<>
has_more*boolean

Always false. Every model comes in one page.

first_id*string|null
last_id*string|null
Example Request
curl -X GET 'https://api.router.ezat.io/v1/models' \  -H "x-api-key: $EZAT_API_KEY"
Example Response
{  "data": [    {      "type": "model",      "id": "anthropic/claude-opus-5-5",      "display_name": "Claude Opus 5.5",      "created_at": "2026-10-28T09:12:44.103Z"    },    {      "type": "model",      "id": "anthropic/claude-sonnet-5-5",      "display_name": "Claude Sonnet 5.5",      "created_at": "2026-10-28T09:12:44.115Z"    }  ],  "has_more": false,  "first_id": "anthropic/claude-opus-5-5",  "last_id": "anthropic/claude-sonnet-5-5"}

Create a chat completion POST

Sends a conversation to a model and returns its reply, in OpenAI's Chat Completions format. Set `"stream": true` to receive `chat.completion.chunk` events. The request is translated to Anthropic's Messages format and runs through the same gateway as `POST /v1/messages`: the same limits, routing, failover and prices. - **Messages.** `system` and `developer` messages are joined into the system prompt, wherever they appear. Assistant `tool_calls` and `tool` messages become tool calls and tool results, and consecutive messages from the same side are merged. - **Images and PDFs.** `image_url` parts accept base64 data URLs and `http(s)` URLs, which the gateway downloads (JPEG, PNG, GIF or WebP; public hosts only; up to 10 MB per image, 32 MB and 20 URLs per request; 15 seconds and 3 redirects per download). PDFs go in `file` parts as a base64 `file_data` data URL. - **Prompt caching is automatic.** When the model supports caching and the request marks no breakpoints of its own, the gateway adds up to two: one at the end of the system prompt (or of the tools, when there is no system prompt) and one on the newest message, which the next turn reads back. Send `x-ezat-cache: off` to opt out. To place breakpoints yourself, add Anthropic's `cache_control` to content parts or tools. - **Refused with `400`**, because they would change the result and have no equivalent: `n` other than 1, `logprobs`, `top_logprobs`, a non-empty `logit_bias`, audio (`modalities` other than text, `audio`, `input_audio` parts), `web_search_options`, the legacy `functions` and `function_call`, the `function` role, `response_format` of type `json_object`, and `file_id`. - **Ignored:** every field not listed in the request schema, such as `user`, `seed`, `presence_penalty`, `frequency_penalty`, `store`, `metadata` and `service_tier`. - **Not returned:** the model's thinking text. Thinking tokens are counted in `usage`.

Get a model (Anthropic format) GET

Returns one model, looked up by canonical id or alias. The response always carries the canonical id. Canonical ids contain a slash, which must be URL-encoded here: `/v1/models/anthropic%2Fclaude-opus-5-5`. The Anthropic SDKs encode it for you. Aliases need no encoding: `/v1/models/claude-opus-5-5`. An unencoded slash gets a `404`.