Инструкция по настройке

Пошаговое подключение 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.
Важно про tool calling (вызов инструментов / работа агента с файлами): для 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

Claude Cowork — это agent-режим внутри приложения Claude (desktop/web/mobile). Он работает только по подписке Anthropic (Pro / Max) на серверах Anthropic и не принимает кастомные API-ключи — наш ключ gw_sk_... туда подключить нельзя (то же ограничение, что у Agent-режима Cursor).

Чтобы получить ту же агентную работу (планирование задач, правка файлов, MCP) с нашим ключом — используйте Claude Code: тот же принцип, но через ANTHROPIC_BASE_URL с нашим endpoint.

Любой другой инструмент на Anthropic API, где можно задать свой адрес: Base URL https://codex.vlessxray.pro (без /v1), API Key — ключ gw_sk_... из заказа, модель — claude-fable-5 / claude-opus-4-8.

Cursor

  1. Откройте Settings → Models.
  2. В поле OpenAI API Key вставьте gw_sk_YOUR_KEY_HERE.
  3. Включите Override OpenAI Base URL и укажите https://codex.vlessxray.pro/v1.
  4. Нажмите + Add model, впишите cursor-fable-5 (или другую cursor-модель, см. ниже), включите её.
  5. Нажмите Verify и выберите модель в чате.
Для Cursor используйте модели с префиксом 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: режим Agent / Composer в свежих версиях Cursor работает только с моделями по подписке Cursor и полностью блокирует кастомные API-ключи — ошибка «This model does not support custom API keys» появляется даже с cursor-моделью. Это ограничение самого Cursor, настройками и именем модели не обходится. Если вы упёрлись в эту ошибку — наш ключ в Cursor Agent подключить нельзя; используйте Claude Code, Cline, OpenCode или Continue (там наш ключ работает полноценно, одним ключом на все модели).

Cline (VS Code)

  1. Установите расширение Cline из VS Code Marketplace.
  2. В настройках расширения выберите API Provider: OpenAI Compatible.
  3. Base URL: https://codex.vlessxray.pro/v1
  4. API Key: gw_sk_YOUR_KEY_HERE
  5. 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

Встроенный AI Chat в JetBrains не работает со сторонним API -- он использует проприетарный протокол ACP, а не стандартный OpenAI API.

Вместо встроенного чата используйте плагин Continue:

  1. Установите плагин Continue из JetBrains Marketplace.
  2. Настройте ~/.continue/config.yaml как в разделе Continue выше.
  3. Выберите модель и работайте как обычно.

Доступные модели

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"
Do not add 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.

Available models: codex-5.6-sol, codex-5.6-terra, codex-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.4-mini.
Important for tool calling (function calls / agent editing files): for 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

Claude Cowork is the agent mode inside the Claude app (desktop/web/mobile). It works only with an Anthropic subscription (Pro / Max) on Anthropic's servers and does not accept custom API keys — our 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.

Any other Anthropic-API tool where you can set a custom address: Base URL https://codex.vlessxray.pro (without /v1), API Key — your gw_sk_... key from the order, model — claude-fable-5 / claude-opus-4-8.

Cursor

  1. Open Settings → Models.
  2. In the OpenAI API Key field, paste gw_sk_YOUR_KEY_HERE.
  3. Enable Override OpenAI Base URL and enter https://codex.vlessxray.pro/v1.
  4. Click + Add model, type cursor-fable-5 (or another cursor- model, see below), enable it.
  5. Click Verify and select the model in chat.
For Cursor, use the 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.
If you add a model under its usual name (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.
Important Cursor limitation: the Agent / Composer mode in recent Cursor versions only works with Cursor's subscription models and fully blocks custom API keys — the "This model does not support custom API keys" error appears even with a 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)

  1. Install the Cline extension from VS Code Marketplace.
  2. In extension settings, set API Provider to OpenAI Compatible.
  3. Base URL: https://codex.vlessxray.pro/v1
  4. API Key: gw_sk_YOUR_KEY_HERE
  5. Model: any model from the catalog (e.g. gpt-5.5 or claude-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

The built-in AI Chat in JetBrains does not work with third-party APIs -- it uses the proprietary ACP protocol, not the standard OpenAI API.

Use the Continue plugin instead:

  1. Install the Continue plugin from JetBrains Marketplace.
  2. Configure ~/.continue/config.yaml as shown in the Continue section above.
  3. 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

ErrorSolution
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.