Skip to main content
GET
/
api
/
token
/
models
Get Token Models
curl --request GET \
  --url https://api.example.com/api/token/models

Overview

Get the list of models that the current token (API Key) can access. If the token has no model restrictions, all enabled system models are returned.

Authentication

Authenticate using an API Key (sk-xxx):
Authorization: Bearer sk-xxx

Response Format

{
  "success": true,
  "data": [
    "gpt-4o",
    "gpt-4o-mini",
    "claude-sonnet-4-20250514",
    "gemini-2.5-pro",
    "text-embedding-3-large"
  ]
}

Code Examples

from openai import OpenAI

client = OpenAI(
    api_key="sk-xxx",
    base_url="https://crazyrouter.com/v1"
)

# Get model list via OpenAI SDK
models = client.models.list()
for model in models.data:
    print(model.id)
You can also use the OpenAI-compatible GET /v1/models endpoint to get the model list, which works the same way.