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.
https://open.tutujin.com/v1/modelsRequest example
curl https://open.tutujin.com/v1/models \
-H "Authorization: Bearer $TUTUJIN_API_KEY"import os
from openai import OpenAI
client = OpenAI(base_url="https://open.tutujin.com/v1", api_key=os.environ["TUTUJIN_API_KEY"])
for m in client.models.list():
print(m.id)import OpenAI from 'openai'
const client = new OpenAI({ baseURL: 'https://open.tutujin.com/v1', apiKey: process.env.TUTUJIN_API_KEY })
for await (const m of client.models.list()) {
console.log(m.id)
}Response (OpenAI format)
The structure, with placeholder values:
{
"success": true,
"object": "list",
"data": [
{
"id": "gpt-5.4-mini",
"object": "model",
"created": 1700000000,
"owned_by": "openai",
"supported_endpoint_types": ["openai"]
}
]
}| Field | Description |
|---|---|
data[].id | The model name; pass it unchanged as model |
data[].object | Always model |
data[].created | A timestamp for reference only; it is not the model's release date |
data[].owned_by | An ownership label for reference only |
data[].supported_endpoint_types | Endpoint 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 https://open.tutujin.com/v1/models \
-H "x-api-key: $TUTUJIN_API_KEY" \
-H "anthropic-version: 2023-06-01"{
"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 https://open.tutujin.com/v1beta/models \
-H "x-goog-api-key: $TUTUJIN_API_KEY"{
"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 withmodel_not_foundfor 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.