EN ▾
Get API key

HomeGuide

Free AI API key: get your own secure one

If you're looking for a free AI API key, the safe option is to get your own: it takes a minute, requires no payment method, and avoids the problems of using someone else's key. I'll explain what to expect and how to do it right.

Unrestricted AI: Technical Checklist for Production

Updated

Golden key on a small glass camera connected to a terminal

Key points

  1. Free keys circulating in forums and repositories are often leaked: they may stop working and expose your prompts.
  2. A personal trial key includes $0.50 in credit, valid for 7 days, no payment method required.
  3. Save the key in an environment variable and monitor the balance with X-Balance-USD.
  4. If it gets exposed, stop using it and notify support.

What's really behind a free key

A free AI API key can mean three different things, and it's important to know which one you're dealing with before pasting it into your project.

  1. An official free plan from a provider: the key is yours, with limits. Each provider sets its own conditions and changes them over time, so check their current page.
  2. A trial with credit: the key is yours and comes with a small, time-limited balance. This is what this service offers.
  3. Someone else's key published in a forum, gist, or repository. This is the one you should avoid.

The third category is the one that brings problems. Whoever publishes a key obtained it from somewhere: it could be a slip-up in a repository, a compromised account, or a paid account that someone is draining. In any case, the key isn't yours, and that has practical consequences.

Why you shouldn't use leaked keys

They stop working without warning

The real owner detects unusual usage, revokes it, and your app starts failing on a Tuesday afternoon. If you've built something on top, you're left without a base.

Your prompts go through an account you don't control

Everything you send is associated with someone else's account. If you work with client texts, personal fiction, or company data, that risk isn't worth the savings.

Limits are shared with strangers

If a hundred people use the same key, per-minute quotas and parallel requests run out quickly. You'll see 429 errors that have nothing to do with your usage.

It could be bait

An intermediate service that asks you to paste your key or install an extension to "generate" free keys has access to what you pass to it. Be wary of any site that asks for a real key that isn't the provider's panel.

How to get your own trial key

The steps in this service are few and don't require paying anything:

  1. Open the key page and register with Google, or with email and password.
  2. On your key page, click the trial credit button. You receive $0.50 with one click. It's one per person and valid for 7 days.
  3. Copy the key and save it outside the code.
  4. Make a first call to check that it responds.
export API_KEY="sk-tu-clave"

curl https://api.apiiasincensura.com/v1/models \
  -H "Authorization: Bearer $API_KEY"

If it returns the list of models, the key is valid. The available model is called uncensored: it's a single open model, run by an independent provider, unrelated to the official APIs of major AI companies. The trial key allows 2 concurrent requests and 60 per minute, enough for practice and little for production.

What $0.50 in credit gets you

The price is $0.15 per million input tokens and $0.50 per million output tokens. With an average conversation of 1,500 input tokens and 400 output tokens, each call costs 1,500 × 0.15 / 1,000,000 = $0.000225 plus 400 × 0.50 / 1,000,000 = $0.0002, i.e., $0.000425. Dividing $0.50 by that figure gives about 1,176 calls.

To develop an integration, that's a lot. To serve real users, it falls short, and that's where topping up comes in. Top-ups are whole amounts between $20 and $500, in crypto (USDT on TRC20 or USDC on Base), with bonuses of +5% from $50, +10% from $100, and +15% from $200. Details are on the pricing page.

Saving the key without leaking it yourself

Keys circulating on the internet almost always came from an oversight. Don't be the next one. These practices are enough for a small project:

  • Environment variable. Read the key with os.environ["API_KEY"] in Python or process.env.API_KEY in Node. Never write it literally in the code.
  • .env file outside Git. Add .env to .gitignore before the first commit, not after.
  • Nothing in the browser. If you put the key in JavaScript on a public website, anyone can see it in developer tools. Make calls from your server.
  • One key per environment. Don't use the same one for testing and production if you can avoid it.
  • Check the history. If you accidentally published the key in a repository, deleting the commit isn't enough: the content may have been copied. Stop using it and write to Support to decide what to do.

If you prefer to close the door to leaks by design, the best option is for your application to talk to your own small server, and for that server to be the only one that knows the key.

Monitor spending from code

A leaked key shows up in the balance before anywhere else. Every response includes the X-Balance-USD header, and you can check the balance with GET /v1/balance. A minimal script to run every few hours:

import os
import requests

r = requests.get(
    "https://api.apiiasincensura.com/v1/balance",
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
    timeout=10,
)
print(r.json())

If the balance drops more than your own calls explain, there's a leak. Compare with your application logs, and if it doesn't match, stop using that key. Failed or rejected requests aren't charged, so a sharp drop doesn't come from errors. The rest of the endpoints are described in the documentation.

More guides

Frequently asked questions

Is it safe to use a key found on the internet?

I don't recommend it. It may have been revoked, shared with others, or linked to someone else's account, and your prompts would pass through it.

How long does the test key last?

The $0.50 trial credit is valid for 7 days, is one per person, and is claimed with one click after registration.

Do I need a payment method to get it?

No. Just register with Google or with email and password.

What do I do when the free trial credit runs out?

Top up with an integer number of dollars between $20 and $500 in crypto. The balance does not expire and is deducted by usage.

Your key is one step away

Create an account, copy the key, and change the Base URL. That's it.

Get API key