Инструкция по настройке
Пошаговое подключение Bazik API к популярным инструментам. API-ключ gw_sk_... вы получите после покупки на FunPay.
Codex CLI
Установка
Убедитесь, что установлена свежая версия Node.js, затем:
npm install -g @openai/codex
Конфигурация
Создайте или откройте файл ~/.codex/config.toml:
Создайте или откройте файл %USERPROFILE%\.codex\config.toml:
model = "codex-5.6-sol"
model_provider = "router"
[model_providers.router]
name = "api"
base_url = "https://codex.vlessxray.pro/v1"
wire_api = "responses"
config.toml строку env_key = "OPENAI_API_KEY" — из-за неё Codex ищет ключ в переменной окружения, не находит и просит войти в ChatGPT. Ключ берётся из auth.json (ниже). Если Codex всё же не подхватывает ключ — просто удалите строку env_key, если она осталась.
Аутентификация
Создайте файл ~/.codex/auth.json:
Создайте файл %USERPROFILE%\.codex\auth.json:
{"OPENAI_API_KEY": "gw_sk_YOUR_KEY_HERE"}
Запустите codex. Для смены модели в сессии: /model codex-5.6-sol.
codex-5.6-sol, codex-5.6-terra, codex-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.4-mini.
GPT-5.6 используйте модели с префиксом codex- — codex-5.6-sol, codex-5.6-terra, codex-5.6-luna (или gpt-5.5). Обычные gpt-5.6-* в любом агентном клиенте (Codex CLI, Cursor, Cline и т.п.) выдают сырой XML вместо вызова инструмента, и tool calling не работает — это баг на стороне клиента, лечится сменой на codex-5.6-*.
Claude Code
Установка
npm install -g @anthropic-ai/claude-code
Конфигурация
Создайте или откройте файл ~/.claude/settings.json (или .claude/settings.json в корне проекта):
{
"env": {
"ANTHROPIC_BASE_URL": "https://codex.vlessxray.pro",
"ANTHROPIC_API_KEY": "gw_sk_YOUR_KEY_HERE"
}
}
Запустите claude. Модель можно выбрать при запуске: claude --model claude-fable-5.
ANTHROPIC_BASE_URL указывается без /v1 на конце -- Claude Code добавит его сам.Если при первом запуске Claude Code спросит «Do you want to use this API key?» -- выберите Yes, иначе ключ не подхватится.
Доступные модели:
claude-fable-5, claude-opus-4-8, claude-sonnet-4-6, claude-haiku-4-5.
Claude Cowork
gw_sk_... туда подключить нельзя (то же ограничение, что у Agent-режима Cursor).
Чтобы получить ту же агентную работу (планирование задач, правка файлов, MCP) с нашим ключом — используйте Claude Code: тот же принцип, но через ANTHROPIC_BASE_URL с нашим endpoint.
https://codex.vlessxray.pro (без /v1), API Key — ключ gw_sk_... из заказа, модель — claude-fable-5 / claude-opus-4-8.
Cursor
- Откройте Settings → Models.
- В поле OpenAI API Key вставьте
gw_sk_YOUR_KEY_HERE. - Включите Override OpenAI Base URL и укажите
https://codex.vlessxray.pro/v1. - Нажмите + Add model, впишите
cursor-fable-5(или другуюcursor-модель, см. ниже), включите её. - Нажмите Verify и выберите модель в чате.
cursor- — это те же топовые модели, но под именами, которые Cursor не перехватывает на свой бэкенд. Всё уходит на наш API и списывается с вашего ключа.Доступно:
cursor-fable-5, cursor-opus-5, cursor-opus-4-8, cursor-sonnet-4-6, cursor-haiku-4-5, cursor-gpt-5.5, cursor-gpt-5.6, cursor-grok-4.5, cursor-grok-4.3, cursor-gemini-3.1-pro, cursor-gemini-3.5-flash.Модели без коллизий (
kimi-k3, deepseek-v4, glm-5.2, perplexity-pro, kiro-dev) в Cursor работают под обычными именами.
claude-opus-4-8, grok-4.5, gpt-5.6 и т.п.), Cursor распознаёт его как свою встроенную модель и шлёт запрос на свой бэкенд, списывая с вашего Cursor-плана, а наш ключ игнорирует (симптом: «This model does not support custom API keys» или «списывается с моего Cursor»). Решение: возьмите cursor-fable-5, либо в списке моделей Cursor снимите галки со встроенных gpt-*/claude-*/grok-* с тем же именем, оставьте включённой только добавленную, и нажмите Verify.
cursor-моделью. Это ограничение самого Cursor, настройками и именем модели не обходится. Если вы упёрлись в эту ошибку — наш ключ в Cursor Agent подключить нельзя; используйте Claude Code, Cline, OpenCode или Continue (там наш ключ работает полноценно, одним ключом на все модели).
Cline (VS Code)
- Установите расширение Cline из VS Code Marketplace.
- В настройках расширения выберите API Provider: OpenAI Compatible.
- Base URL:
https://codex.vlessxray.pro/v1 - API Key:
gw_sk_YOUR_KEY_HERE - Model: любая модель из каталога (например,
gpt-5.5илиclaude-fable-5).
Continue (VS Code / JetBrains)
Создайте или откройте файл ~/.continue/config.yaml:
models:
- model: gpt-5.5
title: GPT-5.5
provider: openai
apiBase: https://codex.vlessxray.pro/v1
apiKey: gw_sk_YOUR_KEY_HERE
Сохраните файл, перезапустите Continue и выберите модель.
OpenCode
Установите OpenCode (нужен Node.js):
npm install -g opencode-ai
Создайте или откройте файл ~/.config/opencode/opencode.json. Готовый конфиг со всеми моделями — вставьте свой ключ:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"bazik": {
"npm": "@ai-sdk/openai-compatible",
"name": "Bazik API",
"options": {
"baseURL": "https://codex.vlessxray.pro/v1",
"apiKey": "gw_sk_YOUR_KEY_HERE"
},
"models": {
"gpt-5.5": {},
"gpt-5.6": {},
"gpt-5.4-mini": {},
"claude-opus-5": {},
"claude-fable-5": {},
"claude-sonnet-4-6": {},
"claude-haiku-4-5": {},
"kimi-k3": {},
"grok-4.5": {},
"deepseek-v4": {},
"gemini-3.5-flash": {},
"perplexity-pro": {},
"kiro-dev": {},
"glm-5.2": {}
}
}
}
}
Сохраните, запустите opencode, нажмите /models — все модели под провайдером «Bazik API», переключение на лету.
JetBrains AI Chat
Вместо встроенного чата используйте плагин Continue:
- Установите плагин Continue из JetBrains Marketplace.
- Настройте
~/.continue/config.yamlкак в разделе Continue выше. - Выберите модель и работайте как обычно.
Доступные модели
Claude
- claude-opus-4-8
- claude-opus-4-7
- claude-opus-4-6
- claude-sonnet-4-6
- claude-haiku-4-5
- claude-fable-5
GPT / Codex
- gpt-5.5
- gpt-5.4
- gpt-5.4-mini
- gpt-5.3-codex-spark
- gpt-5.6-sol / terra / luna
- codex-5.6-sol / terra / luna
Cursor
- cursor-fable-5
- cursor-opus-5
- cursor-opus-4-8
- cursor-sonnet-4-6
- cursor-haiku-4-5
- cursor-gpt-5.5
- cursor-gpt-5.6
- cursor-grok-4.5
- cursor-grok-4.3
- cursor-gemini-3.1-pro
- cursor-gemini-3.5-flash
Grok
- grok-4.5
- grok-4.3
Kimi
- kimi-k3
- kimi-k2.7
Gemini
- gemini-3.1-pro
- gemini-3.5-flash
Other
- perplexity-pro
- deepseek-v4
- kiro-dev
Ошибки и решения
| Ошибка | Решение |
|---|---|
| Execution Policy (PowerShell) | PowerShell блокирует запуск скриптов. Выполните от имени администратора:Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser |
| npm: command not found | Установите Node.js (LTS). npm входит в комплект. |
| Unknown model / model not found | Проверьте точное название модели из каталога. Названия чувствительны к регистру. |
| Codex: просит войти в ChatGPT / не видит ключ | Удалите строку env_key = "OPENAI_API_KEY" из ~/.codex/config.toml — ключ берётся из auth.json. Если есть старый ~/.codex/auth.json от входа через ChatGPT — пересоздайте его как {"OPENAI_API_KEY": "gw_sk_..."}. |
| Cursor: списывается с моего Cursor / custom API keys | Имя модели совпало со встроенным каталогом Cursor. Используйте модель cursor-fable-5, либо снимите галки со встроенных моделей с тем же именем и нажмите Verify. Если ошибка «This model does not support custom API keys» остаётся — это режим Agent/Composer Cursor, он работает только по подписке Cursor и кастомные ключи не принимает; используйте Claude Code / Cline / OpenCode / Continue. |
| Tool calling не работает / сырой XML / агент не правит файлы | Выбрана модель gpt-5.6-*. Для вызова инструментов переключитесь на codex-5.6-sol / codex-5.6-terra / codex-5.6-luna (или gpt-5.5). Обычные gpt-5.6-* отдают XML вместо tool call — это баг клиента. |
| HTTP 402 / token limit exceeded | Токены исчерпаны. Купите новый пакет на FunPay. |
| HTTP 500 / Internal Server Error | Проблема на стороне сервера. Попробуйте через минуту. |
| ECONNRESET / timeout | Проблема соединения. Проверьте, не мешает ли VPN или корпоративный прокси. Попробуйте без VPN. |
| 401 Unauthorized | Неверный или отсутствующий ключ. Проверьте, что ключ начинается с gw_sk_ и вставлен без пробелов. |
Setup Guide
Step-by-step connection of Bazik API to popular development tools. You will receive your API key gw_sk_... after purchasing on FunPay.
Codex CLI
Installation
Make sure you have a recent version of Node.js installed, then run:
npm install -g @openai/codex
Configuration
Create or open ~/.codex/config.toml:
Create or open %USERPROFILE%\.codex\config.toml:
model = "codex-5.6-sol"
model_provider = "router"
[model_providers.router]
name = "api"
base_url = "https://codex.vlessxray.pro/v1"
wire_api = "responses"
env_key = "OPENAI_API_KEY" to config.toml — it makes Codex look for the key in an environment variable, fail to find it, and prompt for ChatGPT login. The key is taken from auth.json (below). If Codex still won't pick up the key, just delete the env_key line if it's there.
Authentication
Create ~/.codex/auth.json:
Create %USERPROFILE%\.codex\auth.json:
{"OPENAI_API_KEY": "gw_sk_YOUR_KEY_HERE"}
Run codex. To switch models during a session: /model codex-5.6-sol.
codex-5.6-sol, codex-5.6-terra, codex-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.4-mini.
GPT-5.6 use the codex- prefixed models — codex-5.6-sol, codex-5.6-terra, codex-5.6-luna (or gpt-5.5). Plain gpt-5.6-* in any agent client (Codex CLI, Cursor, Cline, etc.) emits raw XML instead of a tool call, so tool calling won't work — it's a client-side bug, fixed by switching to codex-5.6-*.
Claude Code
Installation
npm install -g @anthropic-ai/claude-code
Configuration
Create or open ~/.claude/settings.json (or .claude/settings.json in the project root):
{
"env": {
"ANTHROPIC_BASE_URL": "https://codex.vlessxray.pro",
"ANTHROPIC_API_KEY": "gw_sk_YOUR_KEY_HERE"
}
}
Run claude. You can select the model at launch: claude --model claude-fable-5.
ANTHROPIC_BASE_URL must be specified without /v1 at the end -- Claude Code appends it automatically.If Claude Code asks "Do you want to use this API key?" on first launch, choose Yes, otherwise the key won't be picked up.
Available models:
claude-fable-5, claude-opus-4-8, claude-sonnet-4-6, claude-haiku-4-5.
Claude Cowork
gw_sk_... key can't be connected to it (same limitation as Cursor's Agent mode).
To get the same agentic work (task planning, editing files, MCP) with our key, use Claude Code: same idea, routed through ANTHROPIC_BASE_URL to our endpoint.
https://codex.vlessxray.pro (without /v1), API Key — your gw_sk_... key from the order, model — claude-fable-5 / claude-opus-4-8.
Cursor
- Open Settings → Models.
- In the OpenAI API Key field, paste
gw_sk_YOUR_KEY_HERE. - Enable Override OpenAI Base URL and enter
https://codex.vlessxray.pro/v1. - Click + Add model, type
cursor-fable-5(or anothercursor-model, see below), enable it. - Click Verify and select the model in chat.
cursor- prefixed models — same top models, under names Cursor won't hijack to its own backend. Everything goes through our API and is billed to your key.Available:
cursor-fable-5, cursor-opus-5, cursor-opus-4-8, cursor-sonnet-4-6, cursor-haiku-4-5, cursor-gpt-5.5, cursor-gpt-5.6, cursor-grok-4.5, cursor-grok-4.3, cursor-gemini-3.1-pro, cursor-gemini-3.5-flash.Non-colliding models (
kimi-k3, deepseek-v4, glm-5.2, perplexity-pro, kiro-dev) work under their normal names in Cursor.
claude-opus-4-8, grok-4.5, gpt-5.6, etc.), Cursor recognizes it as its own built-in model and routes the request to its own backend, billing your Cursor plan and ignoring your key (symptom: "This model does not support custom API keys"). Fix: use cursor-fable-5, or in Cursor's model list uncheck the built-in gpt-*/claude-*/grok-* with the same name, leave only your added model enabled, then click Verify.
cursor- model. This is a Cursor restriction that can't be worked around with settings or model names. If you hit this error, our key can't be used in Cursor Agent; use Claude Code, Cline, OpenCode or Continue instead (our key works fully there, one key for all models).
Cline (VS Code)
- Install the Cline extension from VS Code Marketplace.
- In extension settings, set API Provider to OpenAI Compatible.
- Base URL:
https://codex.vlessxray.pro/v1 - API Key:
gw_sk_YOUR_KEY_HERE - Model: any model from the catalog (e.g.
gpt-5.5orclaude-fable-5).
Continue (VS Code / JetBrains)
Create or open ~/.continue/config.yaml:
models:
- model: gpt-5.5
title: GPT-5.5
provider: openai
apiBase: https://codex.vlessxray.pro/v1
apiKey: gw_sk_YOUR_KEY_HERE
Save the file, restart Continue, and select the model.
OpenCode
Install OpenCode (needs Node.js):
npm install -g opencode-ai
Create or open ~/.config/opencode/opencode.json. Ready-to-use config with all models — just insert your key:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"bazik": {
"npm": "@ai-sdk/openai-compatible",
"name": "Bazik API",
"options": {
"baseURL": "https://codex.vlessxray.pro/v1",
"apiKey": "gw_sk_YOUR_KEY_HERE"
},
"models": {
"gpt-5.5": {},
"gpt-5.6": {},
"gpt-5.4-mini": {},
"claude-opus-5": {},
"claude-fable-5": {},
"claude-sonnet-4-6": {},
"claude-haiku-4-5": {},
"kimi-k3": {},
"grok-4.5": {},
"deepseek-v4": {},
"gemini-3.5-flash": {},
"perplexity-pro": {},
"kiro-dev": {},
"glm-5.2": {}
}
}
}
}
Save, run opencode, press /models — all models available, switch on the fly.
JetBrains AI Chat
Use the Continue plugin instead:
- Install the Continue plugin from JetBrains Marketplace.
- Configure
~/.continue/config.yamlas shown in the Continue section above. - Select a model and you are ready to go.
Available Models
Claude
- claude-opus-4-8
- claude-opus-4-7
- claude-opus-4-6
- claude-sonnet-4-6
- claude-haiku-4-5
- claude-fable-5
GPT / Codex
- gpt-5.5
- gpt-5.4
- gpt-5.4-mini
- gpt-5.3-codex-spark
- gpt-5.6-sol / terra / luna
- codex-5.6-sol / terra / luna
Cursor
- cursor-fable-5
- cursor-opus-5
- cursor-opus-4-8
- cursor-sonnet-4-6
- cursor-haiku-4-5
- cursor-gpt-5.5
- cursor-gpt-5.6
- cursor-grok-4.5
- cursor-grok-4.3
- cursor-gemini-3.1-pro
- cursor-gemini-3.5-flash
Grok
- grok-4.5
- grok-4.3
Kimi
- kimi-k3
- kimi-k2.7
Gemini
- gemini-3.1-pro
- gemini-3.5-flash
Other
- perplexity-pro
- deepseek-v4
- kiro-dev
Troubleshooting
| Error | Solution |
|---|---|
| Execution Policy (PowerShell) | PowerShell blocks script execution. Run as administrator:Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser |
| npm: command not found | Install Node.js (LTS). npm is included. |
| Unknown model / model not found | Check the exact model name from the catalog. Names are case-sensitive. |
| Codex: prompts for ChatGPT login / won't pick up key | Remove the env_key = "OPENAI_API_KEY" line from ~/.codex/config.toml — the key comes from auth.json. If you have an old ~/.codex/auth.json from a ChatGPT login, recreate it as {"OPENAI_API_KEY": "gw_sk_..."}. |
| Cursor: billed to my Cursor / custom API keys | The model name collides with Cursor's built-in catalog. Use the cursor-fable-5 model, or uncheck the built-in models with the same name and click Verify. If "This model does not support custom API keys" persists, that's Cursor's Agent/Composer mode — it only works with a Cursor subscription and rejects custom keys; use Claude Code / Cline / OpenCode / Continue. |
| Tool calling doesn't work / raw XML / agent won't edit files | A gpt-5.6-* model is selected. For tool calls switch to codex-5.6-sol / codex-5.6-terra / codex-5.6-luna (or gpt-5.5). Plain gpt-5.6-* returns XML instead of a tool call — a client-side bug. |
| HTTP 402 / token limit exceeded | Tokens exhausted. Purchase a new package on FunPay. |
| HTTP 500 / Internal Server Error | Server-side issue. Try again in a minute. |
| ECONNRESET / timeout | Connection issue. Check if a VPN or corporate proxy is interfering. Try without VPN. |
| 401 Unauthorized | Invalid or missing key. Make sure the key starts with gw_sk_ and has no extra spaces. |