Skip to content

List language models

Get an API key to send requests.

GEThttps://gptunnel.ru/v1/models

Lists the models and prices available to your API key. If the key has an allowed-model list, this endpoint returns only models on that list. Use a model’s id from this catalog as the model value in a request to your chosen API.

Request headers

ParameterTypeDescription
Authorization*stringAPI key

Set the GPTUNNEL_API_KEY environment variable.

import json
import os
from urllib.request import Request, urlopen
request = Request(
'https://gptunnel.ru/v1/models',
headers={'Authorization': os.environ['GPTUNNEL_API_KEY']},
)
with urlopen(request, timeout=30) as response:
print(json.load(response))

This example shows one entry from a verified catalog response. Request the catalog with your API key to see current limits, prices, and available models.

{
"object": "list",
"data": [
{
"id": "gpt-6-luna",
"object": "model",
"title": "GPT 6 Luna",
"max_capacity": 1050000,
"max_completion_tokens": 128000,
"cost_context": "0.02",
"cost_completion": "0.1",
"type": "TEXT",
"deprecated": false,
"deprecated_at": null,
"deprecation_redirect_to": null
}
]
}
Field Meaning
max_capacity Context window size in tokens, including input messages and output tokens.
max_completion_tokens Maximum number of output tokens for this model. You can request a lower limit in Chat Completions.
cost_context The price of 1,000 incoming tokens in rubles. The value is returned as a string.
cost_completion Price of 1,000 output tokens in RUB, returned as a string.

If a limit is 0 or null, confirm the model’s actual limit before sending a large request. See usage in the response for actual token usage.

The catalog identifies the models visible to your API key. Check supported API formats and confirm the parameters for your chosen endpoint.

These three fields tell you whether a model is scheduled for retirement, whether it has already retired, and how requests are handled afterward.

Retirement date and replacement model

ParameterTypeDescription
deprecatedbooleantrue means the retirement date has passed. If false, check deprecated_at for a scheduled date.
deprecated_atstring | nullRetirement date and time in ISO 8601 format. A future date announces an upcoming retirement. A null value means the model has not been marked for retirement.
deprecation_redirect_tostring | nullID of the replacement model that handles requests after retirement. Billing uses the requested model’s rates. If this field is null, there is no replacement and requests return HTTP 410 once the retirement date has passed.
{
"error": {
"message": "Unauthorized",
"type": "unauthorized_request_error",
"param": null,
"code": null
}
}