Skip to content
TutujinAPI

Get started

Models endpoint

GET /v1/models returns the models the current key can call — those its group offers that also pass the key's model allowlist. OpenAI format by default; with Claude or Gemini auth headers it returns their official formats.

GET /v1/models returns the models the current key can call: the ones its group offers that also pass the key's model allowlist. The default response is in OpenAI format; with Claude or Gemini auth headers you get the format their official SDKs parse.

GEThttps://www.tutujin.com/v1/models

Request example

curl https://www.tutujin.com/v1/models \
  -H "Authorization: Bearer $TUTUJIN_API_KEY"

Response (OpenAI format)

The structure, with placeholder values:

JSON
{
  "success": true,
  "object": "list",
  "data": [
    {
      "id": "gpt-5.4-mini",
      "object": "model",
      "created": 1700000000,
      "owned_by": "openai",
      "supported_endpoint_types": ["openai"]
    }
  ]
}
FieldDescription
data[].idThe model name; pass it unchanged as model
data[].objectAlways model
data[].createdA timestamp for reference only; it is not the model's release date
data[].owned_byAn ownership label for reference only
data[].supported_endpoint_typesEndpoint types the model supports, such as openai (Chat Completions), anthropic (Claude Messages), gemini, openai-response, embeddings, image-generation

The key decides what is listed: a key in another group may return different models. For every model and its price in each group, see Models and pricing.

Claude and Gemini formats

With the x-api-key and anthropic-version headers, the response uses Anthropic's model-list format, which the Anthropic SDK's client.models.list() parses directly:

cURL
curl https://www.tutujin.com/v1/models \
  -H "x-api-key: $TUTUJIN_API_KEY" \
  -H "anthropic-version: 2023-06-01"
JSON
{
  "data": [
    {
      "id": "claude-sonnet-5-5",
      "type": "model",
      "display_name": "claude-sonnet-5-5",
      "created_at": "2023-11-14T22:13:20Z"
    }
  ],
  "first_id": "...",
  "last_id": "...",
  "has_more": false
}

With an x-goog-api-key header, or on GET /v1beta/models, you get Gemini's format:

cURL
curl https://www.tutujin.com/v1beta/models \
  -H "x-goog-api-key: $TUTUJIN_API_KEY"
JSON
{
  "models": [
    {
      "name": "gemini-3.8-flash",
      "displayName": "gemini-3.8-flash"
    }
  ],
  "nextPageToken": null
}

In the Gemini format only name and displayName are filled in; the other fields are empty, and name is the bare model name without a models/ prefix.

Notes

  • The list only contains models this key can use right now. A key with a model allowlist only returns the allowlisted models.
  • GET /v1/models/{model} looks up a single model, but it only recognizes some common model names and returns an error object with model_not_found for the rest. To check whether you can call a model, rely on the list.
  • The list changes rarely; fetch it when your service starts and cache it rather than querying before every request.

Still stuck? Add our WeChat support JsnonoChat and send the request id from the error message, and we will look into it.