Как подключить API к CursorHow to connect a custom API to Cursor

Всё делается мышкой в настройках — терминал не нужен. Понадобятся два значения: адрес API и твой ключ.Everything is done with the mouse in the settings — no terminal needed. You only need two values: the API address and your key.

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 к CursorHow to connect a custom API to Cursor

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

  1. Открой Cursor Settings → Models (шестерёнка в правом верхнем углу, затем вкладка Models).
  2. Прокрути вниз до раздела «OpenAI API Key» и включи переключатель «Override OpenAI Base URL» — появится поле для адреса.
  3. Base URL: вставь
  4. API Key: вставь свой ключ и нажми Verify. Зелёная галочка — готово.
API Keysk-ВАШ_КЛЮЧ

Модели включаются в списке выше — выбирай те, что есть в нашем каталоге, например gpt-5.6-terra.

Проверка Verify не проходит? Проверь два места: адрес должен заканчиваться на /v1, ключ — скопирован целиком, без пробелов в начале и конце.

  1. Open Cursor Settings → Models (the gear icon in the top right corner, then the Models tab).
  2. Scroll down to the “OpenAI API Key” section and turn on “Override OpenAI Base URL” — an address field will appear.
  3. Base URL: paste
  4. API Key: paste your key and click Verify. A green checkmark — done.
API Keysk-ВАШ_КЛЮЧ

Models are enabled in the list above — pick the ones from our catalog, for example gpt-5.6-terra.

Verify not passing? Check two things: the address must end with /v1, and the key must be copied in full, with no spaces at the start or end.

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

Verify не проходит
Три причины по частоте: 1) в Base URL нет /v1 на конце; 2) ключ скопирован не целиком (открой «Показать» в поле вверху и сверь начало и конец); 3) в ключ попал пробел при копировании.
В чате ошибка «Model not available» или модель молчит
Cursor пытается вызвать модель, которой нет у провайдера. Включи в списке моделей только те ID, что есть в таблице моделей, и выбери одну из них в чате.
После обновления Cursor настройки слетели или пункт называется иначе
Cursor часто меняет интерфейс. Ищи в Settings → Models поля «Base URL» и «OpenAI API Key» — их суть не меняется. Если раздел вообще не находится, значит версия изменилась — сверься с документацией Cursor.
Ключ работает, но чат иногда отвечает другой моделью
Cursor сам переключает модель, если в списке включено несколько. Оставь включённой только нужную или явно выбирай модель в выпадающем списке чата.
Verify doesn't pass
Three likely causes, in order: 1) the Base URL is missing /v1 at the end; 2) the key wasn't copied in full (click “Show” in the field at the top and compare the beginning and the end); 3) a space got into the key when copying.
The chat shows “Model not available” or the model stays silent
Cursor is trying to call a model the provider doesn't have. Enable only the IDs from the model table and pick one of them in the chat.
After a Cursor update the settings are gone or the item is named differently
Cursor changes its interface often. Look in Settings → Models for the “Base URL” and “OpenAI API Key” fields — their meaning never changes. If you can't find the section at all, the version has changed — check the Cursor documentation.
The key works, but the chat sometimes answers with a different model
Cursor switches models itself when several are enabled. Keep only the one you need enabled, or explicitly pick the model in the chat's dropdown.

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

По документации Cursor, свой ключ работает для чат-моделей: «Custom API keys only work with chat models». Автодополнение Tab всегда выполняется на моделях Cursor и требует их подписку — на сторонний API его переключить нельзя.

Часть агентных функций Cursor также выполняется на их серверах — если функция требует подписку Cursor, это ограничение Cursor, а не ключа.

Названия пунктов настроек отличаются между версиями Cursor — ориентируйся на слова «Base URL» и «OpenAI API Key».

Если Cursor предлагает войти в аккаунт для какой-то функции — это его требование, с ключом оно не связано.

Per Cursor's documentation, a custom key works for chat models: “Custom API keys only work with chat models”. Tab autocomplete always runs on Cursor's own models and requires their subscription — it cannot be switched to a third-party API.

Some of Cursor's agent features also run on their servers — if a feature requires a Cursor subscription, that's a Cursor limitation, not the key's.

Setting names differ between Cursor versions — look for the words “Base URL” and “OpenAI API Key”.

If Cursor offers to sign in for some feature — that's its own requirement, unrelated to the key.

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

Будет ли Tab (автодополнение) работать с моим ключом?
Нет. Tab у Cursor работает на их собственных серверах и требует их подписку — на сторонний API его переключить нельзя. Твой ключ работает для чата и запросов моделей.
Нужно ли отключать встроенные модели Cursor?
Желательно оставить включёнными только модели из нашего каталога — тогда чат точно не ответит моделью, которой у тебя нет.
Какая модель лучше для чата в Cursor?
Оптимум — gpt-5.6-terra. Для сложного кода — claude-sonnet-5. Экономная — gpt-5.6-luna.
Где посмотреть, сколько токенов я потратил?
На странице «Баланс и логи»: вставь ключ — увидишь остаток и каждое списание, вход не нужен.
Will Tab (autocomplete) work with my key?
No. Cursor's Tab runs on their own servers and requires their subscription — it can't be pointed at a third-party API. Your key works for chat and model requests.
Should I disable the built-in Cursor models?
It's best to keep only the models from our catalog enabled — then the chat can't answer with a model you don't have.
Which model is best for chat in Cursor?
Balanced — gpt-5.6-terra. For hard code — claude-sonnet-5. Budget option — gpt-5.6-luna.
Where can I see how many tokens I've spent?
On the Balance and logs page: paste your key — you'll see the remaining balance and every single charge. No sign-in needed.