Документация API go2llm
Один аккаунт, USD-баланс и API-ключи для опубликованных AI-моделей. Базовый адрес Anthropic-совместимого API — https://go2llm.tech, OpenAI-совместимого — https://go2llm.tech/v1.
Быстрый старт
- Зарегистрируйтесь и создайте API-ключ в кабинете.
- Получите актуальный каталог через
GET /v1/models. - Выберите model ID и один из объявленных для него endpoints.
- Отправьте короткий запрос и проверьте списание в кабинете.
curl https://go2llm.tech/v1/messages \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"MODEL_ID_FROM_CATALOG","max_tokens":120,"messages":[{"role":"user","content":"Ответь: OK"}]}'
Авторизация
API-запросы авторизуются пользовательским ключом. OpenAI-совместимые endpoints принимают Authorization: Bearer YOUR_API_KEY; Anthropic Messages также принимает x-api-key: YOUR_API_KEY. Регистрация и вход в кабинет доступны по email/password, Google и Telegram. Браузерная сессия кабинета не заменяет API-ключ.
Получение и использование API-ключа
Создайте ключ во вкладке ключей, сразу сохраните показанное значение и не передавайте его в клиентский JavaScript, репозиторий, скриншот или поддержку. Для production, разработки и CI используйте разные ключи. По умолчанию каждый ключ ограничен 20 RPM.
Во всех примерах документации используется только безопасный заполнитель YOUR_API_KEY.
Каталог моделей
Таблица ниже строится из того же актуального каталога, что GET /v1/models. В ней перечислены доступные модели, их точный ID, цены, возможности и endpoints — используйте их без изменений, таблица обновляется вместе с опубликованным snapshot.
| Модель | Возможности | Endpoints | Тарификация | Цена |
|---|---|---|---|---|
Qwen3.8 Maxqwen3.8-max | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.166 · output $0.498 · cache read $0.014 · cache write $0.208 |
Claude Haiku 4.5claude-haiku-4-5 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.13 · output $0.65 · cache read $0.013 · cache write $0.163 |
DeepSeek V4 Flash Visiondeepseek-v4-flash-vision-exp | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.04 · output $0.161 · cache read $0.0008 · cache write $0.05 |
DeepSeek V4 Prodeepseek-v4-pro | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.066 · output $0.198 · cache read $0.0022 · cache write $0.083 |
Gemini 3.1 Flash Imagegemini-3.1-flash-image | text, image → image | images.generations, images.edits | изображение | size=1024x1024;quality=standard: $0.024 |
Gemini 3.5 Flash Litegemini-3.5-flash-lite | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.07 · output $0.583 · cache read $0.007 · cache write $0.088 |
Grok Imagine Imagegrok-imagine-image | text → image | images.generations | изображение | size=1024x1024;quality=standard: $0.0049 |
Grok Imagine Image Progrok-imagine-image-pro | text → image | images.generations | изображение | size=1024x1024;quality=standard: $0.049 |
MiniMax M3minimax-m3 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.04 · output $0.158 · cache read $0.0079 · cache write $0.049 |
Kimi K2.7 Codekimi-k2.7-code | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.095 · output $0.402 · cache read $0.019 · cache write $0.119 |
Kimi K3kimi-k3 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.302 · output $1.51 · cache read $0.03 · cache write $0.378 |
Nano Banana 2nano-banana-2 | text, image → image | images.generations, images.edits | изображение | size=1024x1024;quality=standard: $0.041 |
Nano Banana Pronano-banana-pro | text, image → image | images.generations, images.edits | изображение | size=1024x1024;quality=standard: $0.034 |
GPT-5.3 Codexgpt-5.3-codex | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.519 · output $4.15 · cache read $0.052 · cache write $0.649 |
GPT-5.6 Lunagpt-5.6-luna | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.04 · output $0.24 · cache read $0.004 · cache write $0.05 |
GPT Image 2gpt-image-2 | text, image → image | images.generations, images.edits | изображение | size=1024x1024;quality=standard: $0.0058 |
Grok 4.20 Multi-Agentgrok-4.20-multi-agent | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.286 · output $0.573 · cache read $0.046 · cache write $0.358 |
Grok 4.6grok-4.6 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.2 · output $0.601 · cache read $0.05 · cache write $0.25 |
MiMo v2.5 Promimo-v2.5-pro | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.077 · output $0.153 · cache read $0.0006 · cache write $0.096 |
GLM 5.1glm-5.1 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.171 · output $0.537 · cache read $0.032 · cache write $0.214 |
GLM 5.2glm-5.2 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.141 · output $0.442 · cache read $0.026 · cache write $0.176 |
GLM 5.3glm-5.3 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.141 · output $0.442 · cache read $0.026 · cache write $0.176 |
Claude Fable 5claude-fable-5 | text → text, tool | chat.completions | 1 млн токенов | input $1.01 · output $5.03 · cache read $0.101 · cache write $1.26 |
Claude Fable 5.1claude-fable-5-1 | text → text, tool | chat.completions | 1 млн токенов | input $4.5 · output $22.5 · cache read $0.113 · cache write $5.63 |
Claude Opus 4.8claude-opus-4-8 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.503 · output $2.51 · cache read $0.05 · cache write $0.629 |
Qwen3.8 Flashqwen3.8-flash | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.013 · output $0.045 · cache read $0.0017 · cache write $0.017 |
GPT-5.6 Terragpt-5.6-terra | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.201 · output $1.21 · cache read $0.02 · cache write $0.251 |
Kimi K2.6kimi-k2.6 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.129 · output $0.542 · cache read $0.022 · cache write $0.161 |
Gemini 3.8 Flashgemini-3.8-flash | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.106 · output $0.531 · cache read $0.011 · cache write $0.133 |
GPT-5.6 Solgpt-5.6-sol | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.402 · output $2.01 · cache read $0.04 · cache write $0.503 |
GPT-5.5gpt-5.5 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.503 · output $3.02 · cache read $0.05 · cache write $0.629 |
Claude Opus 5claude-opus-5 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.503 · output $2.51 · cache read $0.05 · cache write $0.629 |
Codex Auto Reviewcodex-auto-review | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.503 · output $3.02 · cache read $0.05 · cache write $0.629 |
MiMo v2.5mimo-v2.5 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.056 · output $0.112 · cache read $0.0011 · cache write $0.07 |
MiMo v2.6 Flashmimo-v2.6-flash | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.042 · output $0.084 · cache read $0.0008 · cache write $0.052 |
Gemini 3.8 Flash Tieredgemini-3.8-flash-tiered | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.3 · output $1.5 · cache read $0.03 · cache write $0.375 |
Gemini 3.7 Flash Tieredgemini-3.7-flash-tiered | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.3 · output $1.5 · cache read $0.03 · cache write $0.375 |
GPT-6 Astragpt-6-astra | text → text, tool | chat.completions, messages | 1 млн токенов | input $1.01 · output $5.03 · cache read $0.101 · cache write $1.26 |
Gemini 3.5 Flash Lowgemini-3.5-flash-low | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.211 · output $1.05 · cache read $0.021 · cache write $0.264 |
Gemini 3.6 Flash Highgemini-3.6-flash-high | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.225 · output $1.13 · cache read $0.022 · cache write $0.281 |
Claude Sonnet 5claude-sonnet-5 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.329 · output $1.64 · cache read $0.033 · cache write $0.411 |
Claude Sonnet 5.5claude-sonnet-5-5 | text → text, tool | chat.completions, messages | 1 млн токенов | input $1.5 · output $7.5 · cache read $0.075 · cache write $1.88 |
Claude Opus 4.7claude-opus-4-7 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.649 · output $3.25 · cache read $0.065 · cache write $0.811 |
DeepSeek V4 Flashdeepseek-v4-flash | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.023 · output $0.068 · cache read $0.0007 · cache write $0.028 |
DeepSeek V4.1 Flashdeepseek-v4.1-flash | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.045 · output $0.18 · cache read $0.0009 · cache write $0.056 |
Claude Opus 4.6claude-opus-4-6 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.503 · output $2.51 · cache read $0.05 · cache write $0.629 |
Claude Sonnet 4.6claude-sonnet-4-6 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.344 · output $1.72 · cache read $0.034 · cache write $0.43 |
Gemini 2.5 Flashgemini-2.5-flash | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.036 · output $0.3 · cache read $0.0036 · cache write $0.045 |
Gemini 2.5 Progemini-2.5-pro | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.212 · output $1.7 · cache read $0.021 · cache write $0.265 |
Gemini 3 Flash Previewgemini-3-flash-preview | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.094 · output $0.562 · cache read $0.0094 · cache write $0.117 |
Gemini 3.1 Pro Previewgemini-3.1-pro-preview | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.3 · output $1.8 · cache read $0.03 · cache write $0.375 |
Gemini 3.6 Flashgemini-3.6-flash | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.128 · output $0.638 · cache read $0.013 · cache write $0.16 |
GLM 5.3 Flashglm-5.3-flash | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.018 · output $0.06 · cache read $0.0036 · cache write $0.022 |
GPT-5.4gpt-5.4 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.348 · output $2.09 · cache read $0.035 · cache write $0.435 |
Grok 4.3grok-4.3 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.178 · output $0.356 · cache read $0.028 · cache write $0.222 |
Grok 4.5grok-4.5 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.201 · output $0.603 · cache read $0.03 · cache write $0.251 |
Qwen3.7 Maxqwen3.7-max | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.166 · output $0.498 · cache read $0.017 · cache write $0.208 |
Qwen3.7 Plusqwen3.7-plus | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.03 · output $0.121 · cache read $0.0031 · cache write $0.038 |
GPT Image 2.5gpt-image-2.5 | text, image → image | images.generations, images.edits | изображение | size=1024x1024;quality=standard: $0.019 |
GPT-6 Lunagpt-6-luna | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.028 · output $0.14 · cache read $0.0028 · cache write $0.035 |
GPT-6 Solgpt-6-sol | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.35 · output $1.75 · cache read $0.035 · cache write $0.438 |
GPT-6.1 Solgpt-6.1-sol | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.3 · output $1.5 · cache read $0.015 · cache write $0.375 |
Claude Opus 5.5claude-opus-5-5 | text → text, tool | chat.completions, messages | 1 млн токенов | input $2.57 · output $12.85 · cache read $0.15 · cache write $3.21 |
Grok 4.7grok-4.7 | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.2 · output $0.601 · cache read $0.05 · cache write $0.25 |
GLM 5.3 FlashXglm-5.3-flashx | text → text, tool | chat.completions, messages | 1 млн токенов | input $0.046 · output $0.154 · cache read $0.0075 · cache write $0.058 |
Одну модель можно запросить отдельно: GET /v1/models/{id} возвращает ту же запись, что элемент массива в /v1/models, и тоже не требует ключа. Алиас резолвится, но в ответе id канонический — запрос claude-sonnet-5 вернёт claude-sonnet-4-5, и подстановка видна сразу. Неизвестный ID даёт 404 model_not_found.
curl https://go2llm.tech/v1/models/MODEL_ID_FROM_CATALOG
Выбор endpoint
Используйте только значение из endpoints выбранной модели:
messages→POST /v1/messagesв формате Anthropic;chat.completions→POST /v1/chat/completionsв формате OpenAI;images.generations→POST /v1/images/generations;images.edits→POST /v1/images/edits(img2img).
Неподходящая пара model ID и endpoint возвращает 400 model_protocol_mismatch.
POST /v1/responses в поле endpoints не появляется: это не то, что продаётся на модели, а то, как с ней можно разговаривать. Маршрут обслуживает ровно те же модели, что chat.completions.
Anthropic Messages
curl https://go2llm.tech/v1/messages \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"MODEL_ID_FROM_CATALOG","max_tokens":120,"messages":[{"role":"user","content":"Ответь: OK"}]}'
Маршрут доступен моделям с endpoint messages.
OpenAI Chat Completions
curl https://go2llm.tech/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{"model":"MODEL_ID_FROM_CATALOG","max_tokens":120,"messages":[{"role":"user","content":"Ответь: OK"}]}'
Маршрут доступен моделям с endpoint chat.completions.
OpenAI Responses API
POST /v1/responses принимает формат OpenAI Responses API и работает как адаптер поверх chat.completions: те же модели, тот же резерв, то же списание и тот же usage.cost_usd. Модель, у которой в каталоге только messages, через этот маршрут недоступна.
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://go2llm.tech/v1")
response = client.responses.create(
model="MODEL_ID_FROM_CATALOG",
instructions="Отвечай одной строкой.",
input="Ответь: OK",
max_output_tokens=64,
)
print(response.output_text)
Поддержаны input строкой и массивом, instructions, tools и tool_choice в плоской форме Responses, function_call и function_call_output, max_output_tokens, stream, parallel_tool_calls, response_format.
Шим stateless: шлюз не хранит историю ответов. previous_response_id, store: true и background: true отклоняются с 400 stateful_responses_unsupported — передавайте всю историю в input. Подробности и примеры потока и вызова инструмента: Responses API.
Подсчёт токенов
POST /v1/messages/count_tokens принимает то же тело, что POST /v1/messages (model, messages, system, tools), и возвращает размер входа. Ключ обязателен, но резерв не ставится и списания нет — вызов бесплатный. Отдельный лимит: 60 RPM на ключ.
curl https://go2llm.tech/v1/messages/count_tokens \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"MODEL_ID_FROM_CATALOG","messages":[{"role":"user","content":"Ответь: OK"}]}'
{
"input_tokens": 14,
"go2llm": { "exact": false, "method": "byte_estimate", "typical_error_pct": null }
}
Это оценка по байтам, а не вендорский токенайзер. Блок go2llm в ответе говорит об этом явно: exact: false. Годится, чтобы решить, влезает ли контекст в окно, и прикинуть стоимость; не годится как точный биллинговый счётчик. Фактическое количество токенов и фактическую цену смотрите в usage реального ответа модели.
typical_error_pct приходит null: типичное отклонение оценки от факта мы ещё не измерили и поэтому не публикуем. Как только оценщик будет откалиброван по накопленному расходу, в этом поле появится число.
Streaming
Передайте stream: true и читайте SSE до штатного финального события. Не повторяйте запрос автоматически после первого содержательного SSE-фрагмента: fallback после начала ответа запрещён.
Tool calls
Для моделей, в чьих публичных возможностях есть tool, передайте tools и tool_choice в формате выбранного протокола. Описание инструмента включает имя, назначение и JSON Schema аргументов. Сам инструмент выполняется вашим приложением; модель только запрашивает его вызов.
Изображения и опубликованные возможности
Для распознавания изображений выбирайте текстовую модель, у которой modalities.input в GET /v1/models содержит image. У каждой text-only модели каталог публикует vision_companion — ближайшую доступную мультимодальную модель, по возможности того же семейства. Audio, video, PDF и другие неподдерживаемые блоки возвращают 400 unsupported_content_type.
Генерация изображений доступна только если живой каталог содержит endpoint images.generations. Передавайте опубликованные для модели size, quality и допустимое количество результатов. Для media-запроса используйте уникальный Idempotency-Key; повторяйте его только с идентичным телом.
curl https://go2llm.tech/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: project-image-0001" \
-H "content-type: application/json" \
-d '{"model":"MODEL_ID_FROM_CATALOG","prompt":"Minimal API diagram","n":1,"size":"1024x1024","quality":"standard","response_format":"url"}'
img2img работает у моделей, в чьих endpoints есть images.edits. Исходную картинку передавайте файлом, как это делает OpenAI SDK (client.images.edit(image=open("photo.png", "rb"), ...)). До 4 файлов PNG, JPEG или WebP передаются как image[]. Цена за результат та же, что у генерации.
curl https://go2llm.tech/v1/images/edits \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: project-edit-0001" \
-F model=MODEL_ID_FROM_CATALOG \
-F "prompt=Сделай фон белым" \
-F size=1024x1024 \
-F image=@photo.png
Непубликованные возможности не являются частью контракта.
Claude Code
В Claude Code годится не любая модель каталога, а только та, у которой в GET /v1/models в списке endpoints есть messages. Модель из каталога без него вернёт 400 model_protocol_mismatch. Список печатает однострочник:
curl -s https://go2llm.tech/v1/models \
| python3 -c 'import json,sys; print(*(m["id"] for m in json.load(sys.stdin)["data"] if "messages" in m.get("endpoints",[])), sep="\n")'
export ANTHROPIC_BASE_URL=https://go2llm.tech
export ANTHROPIC_AUTH_TOKEN=YOUR_API_KEY
export ANTHROPIC_MODEL=claude-opus-4-8
export ANTHROPIC_SMALL_FAST_MODEL=claude-haiku-4-5
claude
ANTHROPIC_SMALL_FAST_MODEL Claude Code дёргает сам для служебных задач, и она тоже обязана быть с endpoint messages.
Используйте ANTHROPIC_AUTH_TOKEN: если на машине уже есть личный вход в Claude Code, ANTHROPIC_API_KEY может уступить сохранённому логину, и запрос уйдёт мимо go2llm с 401.
Codex
Актуальные версии Codex CLI (@openai/codex) поддерживают для кастомных провайдеров только wire_api = "responses" — формат OpenAI Responses API. Раньше это и было причиной отказа: маршрута /v1/responses у go2llm не существовало, и Codex получал 404.
Теперь POST /v1/responses опубликован и проверен живым прогоном Codex CLI 0.151.0 2026-09-14: codex exec прочитал файл тестового проекта, исполнил инструменты и внёс правку. Прогон был на модели qwen3-8-flash; интерактивный TUI codex мы не гоняли. Настройка ~/.codex/config.toml и границы проверки — на странице инструментов для кода и на Codex API.
OpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({ apiKey: "YOUR_API_KEY", baseURL: "https://go2llm.tech/v1" });
const response = await client.chat.completions.create({
model: "MODEL_ID_FROM_CATALOG",
messages: [{ role: "user", content: "Ответь: OK" }],
});
Anthropic SDK
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({ apiKey: "YOUR_API_KEY", baseURL: "https://go2llm.tech" });
const response = await client.messages.create({
model: "MODEL_ID_FROM_CATALOG",
max_tokens: 120,
messages: [{ role: "user", content: "Ответь: OK" }],
});
Python
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://go2llm.tech/v1")
response = client.chat.completions.create(
model="MODEL_ID_FROM_CATALOG",
messages=[{"role": "user", "content": "Ответь: OK"}],
)
JavaScript и TypeScript
Используйте OpenAI SDK для chat.completions и Anthropic SDK для messages. Передавайте точный model ID из каталога, задавайте разумный max_tokens и обрабатывайте HTTP-код до чтения тела ответа. Серверный ключ — YOUR_API_KEY; не включайте его в браузерный bundle.
Этот запрет исполним, а не только написан: Access-Control-Allow-Origin: * стоит ровно на публичном чтении — GET /v1/models, GET /v1/models/{id}, GET /api/pricing, GET /status. На маршрутах, которые берут ключ, CORS нет намеренно, и OPTIONS к ним отвечает 405 с объяснением: вызывайте go2llm со своего сервера. Каталог и цены из браузера читать можно — например, чтобы собрать селектор моделей.
cURL
Примеры cURL приведены в quickstart и разделах endpoints. Для диагностики добавьте -i, чтобы увидеть HTTP-код и Retry-After, но не публикуйте команду с реальным ключом.
Другие клиенты
Другой клиент можно использовать только после проверки, что он позволяет задать base URL, передаёт нужный заголовок, вызывает опубликованный endpoint и корректно читает обычный или SSE-ответ. Непроверенные клиенты не заявляются совместимыми.
Баланс и биллинг
go2llm работает только по pay-as-you-go без подписки. Баланс и цены ведутся в USD. Баланс можно самостоятельно пополнить в кабинете по СБП или криптовалютой; зачисление происходит после подтверждения платежа. API резервирует оценочную стоимость до внешнего запроса, затем списывает фактическое использование и освобождает остаток. Сумма списания возвращается в usage.cost_usd обычного ответа или финального usage-блока SSE. Подробности: цены и биллинг.
Бюджет по ключу: GET /v1/me
Чтобы агент не узнавал о пустом балансе из 402 посреди длинного прогона, остаток и квоту можно прочитать тем же ключом:
curl https://go2llm.tech/v1/me -H "Authorization: Bearer YOUR_API_KEY"
{
"object": "api_key",
"key": { "name": "prod", "masked": "gk_sk_abcd…wxyz", "quota_usd": 50,
"spent_usd": 12.34, "rpm_limit": 20, "allowed_models": ["*"],
"expires_at": null },
"balance": { "spendable_usd": 87.66, "reserved_usd": 0.12, "currency": "USD" },
"limits": { "account_max_concurrency": 2 }
}
Сравнивайте с оценкой предстоящей работы именно spendable_usd: reserved_usd — это деньги, уже удержанные под выполняющиеся запросы, тратить их нельзя. expires_at приходит строкой ISO-8601 или null. Ключ без привязанного аккаунта отдаёт "balance": null — его расход ограничен только квотой.
Маршрут не отдаёт email, другие ключи аккаунта, реферальные и платёжные данные и полный секрет ключа: утёкший ключ не должен превращаться в опознание владельца и в доступ к остальным его ключам. Лимит — 60 RPM на ключ, ответ идёт с cache-control: no-store. Подробнее: Баланс и расходы.
Rate limits
Лимит по умолчанию — 20 RPM на каждый ключ независимо. При превышении API возвращает HTTP 429 и Retry-After. Учитывайте этот заголовок и используйте ограниченный exponential backoff.
Ошибки
| HTTP | Причина | Действие |
|---|---|---|
| 400 | неверный JSON, content или protocol | исправьте запрос и сверьте endpoint |
| 401 | ключ отсутствует или неверен | передайте YOUR_API_KEY в нужном заголовке |
| 402 | недостаточно баланса | пополните баланс или уменьшите запрос |
| 403 | ключ отключён, истёк или ограничен | проверьте настройки ключа |
| 404 | model ID не опубликован | обновите /v1/models |
| 404 | endpoint_not_found | такого маршрута под /v1/ нет; список опубликованных — в error.message |
| 405 | method_not_allowed | маршрут есть, но принимает другой метод — он в заголовке allow |
| 409 | конфликт idempotency | не используйте один ключ для разных media-запросов |
| 429 | rate limit или квота | учтите Retry-After |
| 5xx | маршрут временно недоступен | сохраните request_id и повторите безопасный запрос позже |
Ошибки под /v1/ приходят JSON-конвертом с error.type, error.code, error.message и error.request_id. Заголовок x-go2llm-request-id есть на всех ответах /v1/*, включая ошибочные — логируйте его. Полный разбор: Ошибки API.
Fallback-поведение
До начала ответа сервис может автоматически повторить запрос при временной сетевой ошибке, timeout, 429 или 5xx. На клиентском 400 повтор не выполняется. После первого байта или валидного SSE-события автоматический повтор отключается, чтобы не смешивать и не дублировать ответ.
FAQ
Где брать model ID? Только из GET /v1/models или динамической таблицы выше.
Хранятся ли промпты и ответы? Нет, они не сохраняются в продуктовых логах. Для выполнения запроса они передаются выбранному внешнему AI-провайдеру.
Можно ли использовать один ключ для разных моделей? Да, если эти модели разрешены настройками ключа.
Есть ли подписка? Нет, используется USD-баланс pay-as-you-go.
Поддержка
Поддержка разбирает проблемы и ошибки после самостоятельной настройки. Интеграции, SDK, ключи и окружение настраиваются по документации.
Telegram: @go2llm_support. Email: support@go2llm.tech.
Укажите время и часовой пояс, endpoint, HTTP-код, model ID и request_id. Не отправляйте пароль, сессионные cookie, полный API-ключ или платёжные реквизиты.