List models
Menu
Models

List models

List the models available to your API key.

GET /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
curl https://rutoken.ai/v1/models \
  -H "Authorization: Bearer $API_KEY"
Python
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)
Node.js
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

json
{
  "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".

bash
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:

bash
curl https://rutoken.ai/v1beta/models \
  -H "x-goog-api-key: $API_KEY"
json
{
  "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.