List models
List the models available to your API key.
/v1/models
Returns the models your API key can use, in the OpenAI format. The list already takes into account the key's group and model restrictions, so every returned ID can be passed to the model field of other endpoints.
Authentication
Authorization: Bearer sk-xxxx
The same endpoint also answers in other formats depending on the headers you send:
| Request | Response format |
|---|---|
GET /v1/models with Authorization: Bearer |
OpenAI (object: "list", data[]) |
GET /v1/models with x-api-key and anthropic-version |
Anthropic (data[], first_id, last_id, has_more) |
GET /v1beta/models with x-goog-api-key or ?key= |
Gemini (models[], nextPageToken) |
Request example
curl https://rutoken.ai/v1/models \
-H "Authorization: Bearer $API_KEY"
from openai import OpenAI
client = OpenAI(base_url="https://rutoken.ai/v1", api_key="sk-xxxx")
for model in client.models.list():
print(model.id)
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://rutoken.ai/v1", apiKey: "sk-xxxx" });
for await (const model of client.models.list()) {
console.log(model.id);
}
Response
{
"success": true,
"object": "list",
"data": [
{
"id": "gpt-4o-mini",
"object": "model",
"created": 1626777600,
"owned_by": "openai",
"supported_endpoint_types": ["openai"]
},
{
"id": "claude-sonnet-4-5",
"object": "model",
"created": 1626777600,
"owned_by": "anthropic",
"supported_endpoint_types": ["anthropic", "openai"]
}
]
}
| Field | Type | Description |
|---|---|---|
data[].id |
string | Model ID to use in requests. |
data[].owned_by |
string | Model vendor. |
data[].supported_endpoint_types |
string[] | API formats the model can be called with, e.g. openai, openai-response, anthropic, gemini, embeddings, jina-rerank, image-generation. |
Retrieve a model
GET /v1/models/{model} returns a single model object in the same format. For an unknown model the response is an error object with code: "model_not_found".
curl https://rutoken.ai/v1/models/gpt-4o-mini \
-H "Authorization: Bearer $API_KEY"
Gemini format
GET /v1beta/models returns the list in the Gemini API shape, so the Google SDKs can list models directly:
curl https://rutoken.ai/v1beta/models \
-H "x-goog-api-key: $API_KEY"
{
"models": [
{
"name": "gemini-2.5-flash",
"displayName": "gemini-2.5-flash"
}
],
"nextPageToken": null
}
In the Gemini format only name and displayName are filled; other fields such as inputTokenLimit are null. Check model details and prices in the Model Square.