EasyRouterEasyRouter
Quick StartAPI DocsConnect Agent Tools
AI Model APIModelsList Models

Native OpenAI Format

Get a list of currently available models.

Automatically identify the return format based on the request headers:

  • Returns Anthropic format when x-api-key and anthropic-version headers are present
  • Returns Gemini format when x-goog-api-key header or key query parameter is present
  • Returns OpenAI format in other cases
GET
/v1/models

Authorization

BearerAuth

AuthorizationBearer <token>

Authenticate using a Bearer Token. Format: Authorization: Bearer sk-xxxxxx

In: header

Query Parameters

key?string

Google API Key (for Gemini format)

Header Parameters

x-api-key?string

Anthropic API Key (for Claude format)

anthropic-version?string

Anthropic API version

x-goog-api-key?string

Google API Key (for Gemini format)

Response Body

application/json

application/json

curl -X GET "https://easyrouter.io/v1/models"
{
  "object": "list",
  "data": [
    {
      "id": "gpt-4",
      "object": "model",
      "created": 0,
      "owned_by": "openai"
    }
  ]
}
{
  "error": {
    "message": "string",
    "type": "string",
    "param": "string",
    "code": "string"
  }
}