GET
/
v1
/
models
curl -X GET "https://api.applerouter.ai/v1/models" \
  -H "Authorization: Bearer sk-your-api-key"
{
  "object": "list",
  "data": [
    {
      "id": "gpt-4o",
      "object": "model",
      "created": 1686935002,
      "owned_by": "openai"
    },
    {
      "id": "claude-3-5-sonnet-20241022",
      "object": "model",
      "created": 1686935002,
      "owned_by": "anthropic"
    },
    {
      "id": "gemini-2.0-flash",
      "object": "model",
      "created": 1686935002,
      "owned_by": "google"
    }
  ]
}

Overview

Lists available models. The response format is automatically determined based on the request headers:
  • OpenAI Format (Default): Standard response
  • Anthropic Format: When x-api-key and anthropic-version headers are present
  • Gemini Format: When x-goog-api-key header or key query parameter is present
curl -X GET "https://api.applerouter.ai/v1/models" \
  -H "Authorization: Bearer sk-your-api-key"
{
  "object": "list",
  "data": [
    {
      "id": "gpt-4o",
      "object": "model",
      "created": 1686935002,
      "owned_by": "openai"
    },
    {
      "id": "claude-3-5-sonnet-20241022",
      "object": "model",
      "created": 1686935002,
      "owned_by": "anthropic"
    },
    {
      "id": "gemini-2.0-flash",
      "object": "model",
      "created": 1686935002,
      "owned_by": "google"
    }
  ]
}

Authorizations

Authorization
string
header
required

使用 Bearer Token 认证。格式: Authorization: Bearer sk-xxxxxx

Headers

x-api-key
string

Anthropic API Key (用于 Claude 格式)

anthropic-version
string

Anthropic API 版本

Example:

"2023-06-01"

x-goog-api-key
string

Google API Key (用于 Gemini 格式)

Query Parameters

key
string

Google API Key (用于 Gemini 格式)

Response

成功获取模型列表

object
string
Example:

"list"

data
object[]