List models

Retrieve the list of currently available models. The response format is selected automatically from the request headers: - Returns Anthropic format when the x-api-key and anthropic-version headers are present - Returns Gemini format when the x-goog-api-key header or key query parameter is present - Returns OpenAI format otherwise

GET /v1/models

Service root: https://getrouter.ai

Protocol: OpenAI-compatible Models

Authentication: Authorization: Bearer YOUR_API_KEY

Parameters

ParameterLocationTypeRequiredDescription
keyquerystringNoGoogle API key (for Gemini format)
x-api-keyheaderstringNoAnthropic API key (for Claude format)
anthropic-versionheaderstringNoAnthropic API version
x-goog-api-keyheaderstringNoGoogle API key (for Gemini format)

Example request

curl --request GET \
  --url https://getrouter.ai/v1/models \
  --header "Authorization: Bearer YOUR_API_KEY"

Responses

StatusDescription
200Model list retrieved successfully
401Authentication failed

Success response fields

FieldTypeRequiredDescription
objectstringNo
dataarray<object>No

Example response

{
  "object": "object",
  "data": [
    {
      "id": "string",
      "object": "object",
      "created": 1,
      "owned_by": "string"
    }
  ]
}

This page is generated from the public Relay OpenAPI specification. Browse the complete specification in the API Explorer.