Cheap KIGuide
Set Up an AI API Key: OpenAI-Compatible in 5 Minutes
To set up an AI API key you need an account, one click for the key and two settings in your client: a base URL and a model id. Here is the full path, with code you can paste.
Last updated
Summary
- Sign up, claim the $0.50 trial on the API key page, copy the key.
- Use base URL https://api.cheapki.com/v1, model uncensored and a Bearer token.
- Store the key in an environment variable, never in source control.
- Reissue or revoke keys yourself; the old key stops working at once.

The five steps
If you want to set up an AI API key without reading everything, do this:
- Sign up with Google, or with email and password.
- Open the API key page and claim the $0.50 trial credit with one click. Copy the key.
- Put the key in an environment variable:
export API_KEY="...". - Test it with the curl command below.
- In your client or SDK, set the base URL to
https://api.cheapki.com/v1and the model touncensored.
The trial needs no card. It is one per person and valid for 7 days. When you want more, top up from $20 in crypto (USDT on TRC20 or USDC on Base).
You need very little to start: a browser to sign up, a terminal with curl or a language runtime with the OpenAI SDK installed, and a place to keep one secret. There is nothing to install for the API itself and no separate developer console to configure. Rates are $0.15 per 1M input tokens and $0.50 per 1M output tokens, and the model id is the same for every request.
Store the key safely
The key is a secret: anyone who has it can spend your credit. Put it in an environment variable or your platform's secret manager. Do not paste it into a front-end script, because everything in a browser is readable by visitors. Add .env to .gitignore before your first commit, and if a key does end up in a repository, treat it as leaked and replace it right away (see the key management section below).
export API_KEY="paste-your-key-here"
# for a project, put the same line in .env and load it with your tool of choiceTest with curl
Start with the cheapest possible check. This lists the available model id:
curl https://api.cheapki.com/v1/models \
-H "Authorization: Bearer $API_KEY"
The auth header is Authorization: Bearer followed by your key. If the list comes back, the key and URL are right. Now send a real request:
curl https://api.cheapki.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Say hello in one sentence."}]
}'
To see tokens arrive as they are generated, add "stream": true to the body and pass -N to curl so it does not buffer. The reply comes as server-sent events, one JSON chunk per line, and usage is sent at the end. If streaming works in curl, it will work in your SDK too.
Add -i to see the response headers. X-Balance-USD shows your remaining credit, and X-Request-Id identifies the call.
Use it from Python and Node
The API is OpenAI-compatible, so the official SDKs work after you change the base URL and key. Python:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.cheapki.com/v1",
api_key=os.environ["API_KEY"],
)
r = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(r.choices[0].message.content)
Node:
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.cheapki.com/v1",
apiKey: process.env.API_KEY,
});
const r = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Say hello in one sentence." }],
});
console.log(r.choices[0].message.content);
Both calls use POST /v1/chat/completions. If you keep the key in a .env file, load it with python-dotenv in Python or with node --env-file=.env in recent Node versions, so the code above stays unchanged. The API also offers POST /v1/responses and GET /v1/models. See the docs for details such as streaming, tool calling and JSON mode.
Point an existing tool at it
Most apps that support OpenAI-style endpoints ask for three fields: a base URL (sometimes called API host or endpoint), an API key and a model name. Fill them in like this:
| Field | Value |
|---|---|
| Base URL | https://api.cheapki.com/v1 |
| API key | Your key from the API key page |
| Model | uncensored |
The official SDKs also read the environment variables OPENAI_API_KEY and OPENAI_BASE_URL, so you can switch an existing program without editing code:
export OPENAI_API_KEY="$API_KEY"
export OPENAI_BASE_URL="https://api.cheapki.com/v1"
from openai import OpenAI
client = OpenAI() # base URL https://api.cheapki.com/v1 comes from OPENAI_BASE_URL
r = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "ping"}],
)
print(r.choices[0].message.content)Manage, reissue and revoke keys
You never need to contact support to replace a key. On the API key page you can regenerate (reissue) the key at any time, and the old one stops working immediately. Update your environment variable and restart the services that use it.
Accounts that have topped up can hold up to 5 keys, give each a label and revoke any of them. A sensible layout is one key per application or environment, such as staging, production and batch-jobs. If one leaks or a contractor leaves, you revoke that key alone and the rest keep working. Separate keys also make it easier to see which program is using your balance.
Rotate keys without downtime by using that spare capacity. Create a new labelled key, add it to your configuration, deploy, confirm requests succeed, then revoke the old key. On a key you reissue instead, the old one dies the moment the new one appears, so there is a short gap between regenerating it and updating your app. For a hobby project that gap is fine. For a production service, use the rolling method, which is available once the account has topped up.
Check your balance and limits from code
Once the key works, build two habits into your program. First, read the headers. Each response carries X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency, which tell you the ceiling for your key, along with X-Balance-USD. Second, check the balance on a schedule instead of waiting for a failure:
curl https://api.cheapki.com/v1/balance \
-H "Authorization: Bearer $API_KEY"
The OpenAI-style route GET /v1/dashboard/billing/credit_grants also works for tools that expect it. A trial key has 2 concurrent requests and 60 requests per minute; a full key has 8 and 300. If your program runs several workers, keep their count at or below your concurrency limit and remember that a streamed request holds its slot until the stream ends.
A short safety checklist before you ship anything that uses the key: keep it server-side, give each deployment its own key, set an alert on the balance, and put a retry with a short wait around calls that return 429.
Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
| Not found (404) | Base URL is missing /v1, or /v1 is doubled because the client adds it too. Use exactly the URL above, or drop the suffix if your client appends it. |
| Authentication error | Wrong or old key, stray whitespace or a quote copied with it. Remember that a reissued key invalidates the previous one. |
| Unknown model | The model id must be uncensored. |
429 with rate_limited | Too many requests per minute: 300 on a full key, 60 on a trial key. Slow down or spread requests out. |
429 with concurrency | Too many at once: 8 on a full key, 2 on a trial key. Streams count until they end. |
429 with Retry-After: 5 | Temporary overload. Wait 5 seconds and retry. |
Failed or refused requests are not charged, so a mistyped request costs nothing. For hardening beyond the basics, see Ki ohne Zensur: A Production Checklist, and the pricing page for rates: $0.15 per 1M input tokens and $0.50 per 1M output tokens.
More guides
FAQ
Where do I get the API key?
Sign up, then open the API key page and claim the $0.50 trial credit with one click. The key appears there.
Can I replace a key if it leaks?
Yes. Regenerate it on the API key page; the old key stops working at once. No support request is needed.
How many keys can I have?
Accounts that have topped up can hold up to 5 keys, label them and revoke any of them.
What base URL and model do I use?
The base URL is https://api.cheapki.com/v1 and the model id is uncensored. Authenticate with an Authorization Bearer header.
https://api.cheapki.com/v1uncensored
Start with free credits
Enter email and password, then get your key immediately.