Список моделей
Запрос списка моделей
GET
https://gptunnel.ru/v1/models Возвращает список всех доступных LLM моделей с ценами.
Headers
| Параметр | Тип | Описание |
|---|---|---|
Authorization* | string | API ключ |
Пример запроса
import axios from 'axios'
const response = await axios({ method: 'GET', url: 'https://gptunnel.ru/v1/models', headers: { Authorization: 'YOUR_API_KEY', },})
console.log(response.data)import requests
response = requests.get( 'https://gptunnel.ru/v1/models', headers={'Authorization': 'YOUR_API_KEY'},)
print(response.json())curl -X GET https://gptunnel.ru/v1/models \ -H 'Authorization: YOUR_API_KEY'Пример ответа
{ "object": "list", "data": [ { "id": "gpt-4o", "object": "model", "created": 1685584800, "title": "GPT 4o Vision 128K", "max_capacity": 4096, "cost_context": "1.3500", "cost_completion": "2.7000" }, { "id": "gpt-4o-mini", "object": "model", "created": 1685584800, "title": "GPT 4o Mini", "max_capacity": 4096, "cost_context": "0.1200", "cost_completion": "0.4800" } ]}Ошибки
{ "error": { "message": "Unauthorized", "type": "unauthorized_request_error", "param": null, "code": null }}