API через терминал: cURLAPI from the terminal: cURL

Одна команда — и видно, что ключ живой и модель отвечает. Вставь ключ в поле ниже — команда соберётся под тебя.One command shows that your key works and the model responds. Paste your key below and the command will be built for you.

Base URL
API KeyAPI Key

Ключ не отправляется с этой страницы: команды собираются локально в браузере. Без галочки выше ключ исчезнет после закрытия страницы. Ключ — как пароль: не показывай его на скриншотах, не отправляй в чаты и не добавляй в Git. Нет ключа — зарегистрируйся: личный ключ выпустится сам. Кнопки скачивания готовых файлов (settings.json, codex-setup.bat) — на странице «Подключение» — генератор конфигураций.Your key never leaves this page: commands are assembled locally in your browser. Without the checkbox above, the key disappears when you close the page. Treat the key like a password: never show it in screenshots, chats, or Git. No key yet? Register — a personal key is issued automatically. Download buttons for ready-made files are on the full connection page.

Как подключить

API через терминалAPI from the terminal

Ключ из поля выше автоматически подставляется в команды и конфиги.Your key from the field above is inserted into the commands and configs automatically.

Совсем без терминала: страница «Баланс и логи» — вставь ключ, увидишь остаток и списания. А если хочется терминала:

1

Проверь запросом к чату

Вернулся текст модели — ключ рабочий.

Вставь команду в терминал целиком и нажми Enter:

2

Остаток баланса

Число в поле token_balance — твой остаток.

Windows: команды вставляй в Git Bash (ставится вместе с Git). В PowerShell перенос строки через «\» не работает, а слово curl часто является псевдонимом другой утилиты — либо используй Git Bash, либо curl.exe и одну строку без переносов.

macOS / Linux: открой Terminal (Cmd+Пробел → набери terminal) и вставь команду.

No terminal at all: the Balance and logs page — paste your key and you'll see the balance and the charges. And if you do want the terminal:

1

Test with a chat request

If the model's text came back — the key works.

Paste the command into the terminal in one piece and hit Enter:

2

Remaining balance

The number in token_balance is what you have left.

Windows: paste the commands into Git Bash (it installs together with Git). In PowerShell the “\” line break doesn't work, and the word curl is often an alias for another utility — either use Git Bash, or curl.exe with a single line without breaks.

macOS / Linux: open Terminal (Cmd+Space → type terminal) and paste the command.

Частые ошибки

401 Unauthorized
Ключ не скопирован целиком или потерялись кавычки. Ключ идёт сразу после слова Bearer и в двойных кавычках.
402 — оплата required / баланс
На ключе закончились токены. Пополни в кабинете — остаток виден на странице баланса.
curl: command not found (Windows)
Ты в обычной командной строке без curl. Поставь Git для Windows (вместе с ним ставится Git Bash) или используй curl.exe.
Кривой JSON / 400 Bad Request
Во вставленной команде потерялись кавычки или перенос строки. Скопируй команду кнопкой «Копировать» и вставь одним куском.
401 Unauthorized
The key wasn't copied in full, or the quotes got lost. The key goes right after the word Bearer and in double quotes.
402 — payment required / balance
The key has run out of tokens. Top it up in the cabinet — the remaining balance is on the balance page.
curl: command not found (Windows)
You're in a plain command prompt without curl. Install Git for Windows (Git Bash comes with it) or use curl.exe.
Broken JSON / 400 Bad Request
Quotes or a line break were lost in the pasted command. Copy the command with the “Copy” button and paste it in one piece.

Ограничения и совместимость

Пример показывает маршрут /v1/chat/completions. Сервер также поддерживает стриминг SSE, Responses API, Anthropic-формат /v1/messages, картинки и аудио — маршруты и примеры в документации.

Не публикуй команды с настоящим ключом (скриншоты, статьи, issues) — по ключу расходуется твой баланс.

The example shows the /v1/chat/completions route. The server also supports SSE streaming, the Responses API, the Anthropic format /v1/messages, images and audio — routes and examples are in the documentation.

Never publish commands with a real key (screenshots, articles, issues) — your balance is spent under that key.

Вопросы и ответы

Можно проверить ключ без терминала?
Да: страница «Баланс и логи» показывает остаток и последние списания по ключу — без входа и команд.
Что означает 429?
Слишком много запросов подряд. Подожди около минуты и повтори — сервер охлаждает перегретые ключи, это нормально.
Как включить стриминг ответа?
Добавь в JSON поле "stream": true — ответ будет приходить частями (SSE). Примеры — в документации.
Какую модель подставить для теста?
Дешёвую — gpt-5.6-luna: тест будет стоить копейки. Список и коэффициенты — в таблице моделей.
Can I check a key without the terminal?
Yes: the Balance and logs page shows the balance and the recent charges for a key — no sign-in and no commands.
What does 429 mean?
Too many requests in a row. Wait about a minute and retry — the server cools down hot keys, that's normal.
How do I enable response streaming?
Add the field "stream": true to the JSON — the answer will arrive in parts (SSE). Examples are in the documentation.
Which model should I use for a test?
A cheap one — gpt-5.6-luna: the test will cost pennies. The list and the coefficients are in the model table.