List available models

Discover your key permissions and exact model IDs.

GET/v1/models
https://api.hanrouter.ai/v1Manage API keys

URL and authentication

Use https://api.hanrouter.ai/v1 as the OpenAI-compatible Base URL and Authorization: Bearer $HANROUTER_API_KEY. Do not duplicate /v1. All manufacturers use your HanRouter key, not an upstream vendor key.

For the Anthropic SDK and Claude Code, use https://api.hanrouter.ai without /v1; the client appends /v1/messages. Use the OpenAI-compatible interface for Google models.

Verify available models

List models available to your key first, then copy data[].id exactly into requests. Names, case and aliases come from this response. The public plaza hides unpriced models; backend availability is unchanged.

Request example
curl "https://api.hanrouter.ai/v1/models" \
  -H "Authorization: Bearer $HANROUTER_API_KEY"

Request example

Examples use configured model IDs. Key group permissions determine access; query GET /v1/models first.

cURL
curl "https://api.hanrouter.ai/v1/models" \
  -H "Authorization: Bearer $HANROUTER_API_KEY"

Response example

JSON · illustrative structure
{
  "object": "list",
  "data": [
    {
      "id": "your-model-id",
      "object": "model"
    }
  ]
}