Neural network API key: what it is, where to get it and how not to lose money

A key is a password to your balance, not to a chat. Where keys come from, how to test one, and how limits protect your money.

5 min · · API keys · development

If you are connecting a model to your own code for the first time, the first word you hit is "key". What is it, how does it differ from a login to the familiar chat, and where do you get one? Let us go in order: what a neural network API key is, where it comes from at providers and at a gateway, how to check that it works, and how to protect the money on your balance.

What an AI API key is

An API key is a string that tells the server who is sending the request and whose balance to charge. Zukko keys start with fetch_; other services use their own prefixes. The key travels in a request header, usually like this:

bash
Authorization: Bearer fetch_...

The Anthropic SDK sends the same key in the x-api-key header, and the gateway accepts both. More on authorization: Authentication.

An important consequence: anyone who knows the key can send requests at your expense. A key is closer to a card number than to a login.

How a key differs from a chat login

Chat loginAPI key
How you paysubscription or service limitsper token, from a balance
Where it is usedbrowser or appcode, editor, bot
What the service seesyour accountthe key and its balance
Risk if leakedaccount takeoversomeone else's spend on your balance

A chat login and a key are not interchangeable. You cannot paste your chat account password into Cursor or a Python script: you need a key. Subscription prices and terms change on the services' sites, so check the current plan on the site itself; we do not quote them here.

Where keys come from

Directly from a provider. Every model developer (OpenAI, Anthropic, Google, DeepSeek and others) has a developer console where you create a key, attach a payment method and top up a balance. Terms by country and payment method are set by the provider, so check them on its site. A separate key per provider means a separate account, balance and invoice.

Through a gateway. A gateway such as Zukko gives one key to Claude, GPT, Gemini, DeepSeek, Qwen and GLM models and one balance in dollars. From Russia the balance can be topped up through SBP, by MasterCard or in cryptocurrency. The sequence:

  1. Open the dashboard and sign in.
  2. Top up the balance (from $1). SBP is accepted in rubles at the market rate at the time of payment, and the payment page adds an 8.5% fee on top; MasterCard cards carry a fee of about 13%, amounts $2 to $594; crypto such as USDT is also available.
  3. Go to the API keys page, create a key and name it.
  4. Copy the key right away: the full key is shown only once at creation. If you lose it, create a new one and revoke the old one.

There is no credit for signing up. There is $0.50 for subscribing to the @zukkopro channel, once per Telegram account: link Telegram in the dashboard, subscribe and press "Check".

How to check that the key works

The quickest test, with no libraries to install:

bash
export ZUKKO_API_KEY="fetch_your_key"

curl https://api.zukko.pro/v1/chat/completions \
  -H "Authorization: Bearer $ZUKKO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash",
    "messages": [{"role": "user", "content": "Answer in one word: does it work?"}],
    "max_tokens": 20
  }'

The same request in Python:

bash
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.zukko.pro/v1",
    api_key=os.environ["ZUKKO_API_KEY"],
)
r = client.chat.completions.create(
    model="deepseek-v4.1-flash",
    messages=[{"role": "user", "content": "Answer in one word: does it work?"}],
    max_tokens=20,
)
print(r.choices[0].message.content)

If you get an error instead of an answer, check the code:

  • 401: the key is wrong or has a typo (check the fetch_ prefix and stray spaces);
  • 402: not enough money on the balance;
  • 403 model_not_allowed_for_key: this model is not allowed for the key;
  • 404 model_not_found: wrong model name, compare with GET /v1/models.

Full breakdown: 401, 402, model not found.

How to store a key

The usual ways to lose money: commit a key to a public repository, put it into frontend code, send a screenshot of the settings. Basic rules:

  • keep the key in an environment variable (OPENAI_API_KEY or your own, like ZUKKO_API_KEY above), not in source code;
  • if you use a .env file, add it to .gitignore before the first commit;
  • never place a key in browser JavaScript: send model requests from your server;
  • do not paste a key into a chat, ticket or messenger, even "temporarily";
  • use separate keys for separate projects, so a leaked key can be revoked without breaking the others.

More: safe API key storage. If a key has already leaked, the order is: revoke first, investigate later.

Limits: protection from nasty surprises

Even a carefully stored key can burn through a balance because of a bug: a runaway agent or a loop with no exit condition. So each Zukko key can have:

  • a daily limit in dollars;
  • a monthly limit in dollars;
  • a list of allowed models (allowed_models).

When a limit is reached, the API returns 429 with the code key_daily_limit_reached or key_monthly_limit_reached, and further spend on that key stops. A simple start: an experiment key with a limit of $1 to $2 a day, allowed only on cheap models. For production, create a separate key with a limit sized to the real load. How to set it up: daily and monthly key limit.

FAQ

Does one key work for all neural networks?

A provider key works only with that provider's models. A Zukko gateway key gives access to models from several developers; the list is returned by GET /v1/models.

Can I view the key again?

No. The full key is shown once at creation. If you lost it, create a new key and revoke the old one.

Do I pay for the key itself?

No, you pay for the tokens used, from the balance. The cost of a request is computed from model prices; see current prices in the dashboard or via GET /v1/models.

What if the key was shown to someone else?

Revoke it in the dashboard and create a new one. To get started, create a key on the API keys page, set a limit and test it with the request above.

zukko

Pay 25×
less

for Claude Code & ChatGPT

One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.

Get API keyDocumentation

api.zukko.pro · fetch_*

AI API key: what it is, where to get it, how to store · Zukko