List language models
Get an API key to send requests.
Request for model list
Section titled “Request for model list”https://gptunnel.ru/v1/modelsLists 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
| Parameter | Type | Description |
|---|---|---|
Authorization* | string | API key |
Example request
Section titled “Example request”Set the GPTUNNEL_API_KEY environment variable.
import jsonimport osfrom 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))curl --fail-with-body --silent --show-error \ --url 'https://gptunnel.ru/v1/models' \ --header "Authorization: ${GPTUNNEL_API_KEY:?Set GPTUNNEL_API_KEY}"const response = await fetch('https://gptunnel.ru/v1/models', { headers: { Authorization: process.env.GPTUNNEL_API_KEY },})if (!response.ok) throw new Error(await response.text())console.log(await response.json())Example response
Section titled “Example 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 } ]}Context, response and price
Section titled “Context, response and price”| 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.
Deprecation status
Section titled “Deprecation status”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
| Parameter | Type | Description |
|---|---|---|
deprecated | boolean | true means the retirement date has passed. If false, check deprecated_at for a scheduled date. |
deprecated_at | string | null | Retirement 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_to | string | null | ID 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. |
Errors
Section titled “Errors”{ "error": { "message": "Unauthorized", "type": "unauthorized_request_error", "param": null, "code": null }}