QUICKSTART

Quickstart

Sign up, top up your balance, issue an API key, and run your first Codex Key request in 5 minutes.

1. Sign up

Go to codexkey.ru/en, click Sign in / Sign up and create an account with email + password. A confirmation code is sent to your inbox. After verification you land in the dashboard at /cabinet.

2. Top up your balance

Open Billing → Top up in the side menu. Available payment methods:

  • Bank card (RU/Visa/Mastercard via YooKassa)
  • SBP (Russian instant payments)
  • Crypto (USDT TRC-20)

Minimum top-up is 100 RUB. Funds are credited to an internal RUB balance; every API request deducts the token cost based on the OpenAI rate and the 1.09 margin multiplier.

3. Issue an API key

Go to API Keys → Create key. Enter a key name (for example, local-dev) and click Create. The key is shown only once — copy it somewhere safe. Format:

sk-clb-xxxxxxxxxxxxxxxxxxxxxxxx

The key must be sent in the Authorization: Bearer sk-clb-... header on every request.

4. First request

Send a chat request to GPT-5 with curl:

curl https://codexkey.ru/v1/chat/completions \
  -H "Authorization: Bearer sk-clb-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4",
    "messages": [
      {"role": "user", "content": "Say hello in one sentence."}
    ]
  }'

The response follows the standard OpenAI format:

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "model": "gpt-5.4",
  "choices": [
    {
      "index": 0,
      "message": {"role": "assistant", "content": "Hello!"},
      "finish_reason": "stop"
    }
  ],
  "usage": {"prompt_tokens": 12, "completion_tokens": 4, "total_tokens": 16}
}

5. JavaScript example

const res = await fetch("https://codexkey.ru/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.CODEXKEY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "gpt-5.4",
    messages: [{ role: "user", content: "Hello" }],
  }),
});
const data = await res.json();
console.log(data.choices[0].message.content);

6. Next steps

If a request returns 401, check the key prefix and the Authorization header. If 402, top up your balance. All error codes are documented in the API reference.