EN ▾
Get API key

LLM API Key: How to Get and Use One in 5 Steps

Getting an LLM API key here takes a sign-up, one click for trial credit, and a short test request. This page lists the steps in order and shows how to store and check the key.

Updated

A glowing key above a circuit board connected to a server block, illustrating an API key

Key points

  • Sign up with Google or with email and password, then open the API key page.
  • New users can claim $0.50 of trial credit with one click, valid for 7 days.
  • Top up with USDT on TRC20 or USDC on Base, any whole amount from $20 to $500.
  • Keep the key in an environment variable and test it with GET /v1/models.

The five steps at a glance

  1. Create an account with Google, or with email and password.
  2. Open the API key page and copy your key.
  3. Claim the $0.50 trial credit with one click.
  4. Send a test request to confirm everything works.
  5. When the trial is used up, top up with crypto and keep building.

An llm api key is just a secret string that identifies your account. Every request carries it in an Authorization: Bearer header, and the balance on your account pays for the tokens you use. There is no subscription and no monthly fee.

Step 1 and 2: sign up and find the key

Sign-up works with a Google account or with an email address and password. Pick whichever you will remember; there is nothing else to fill in. After you log in, go to the API key page. Your key is shown there.

Treat the key like a password. Anyone who holds it can spend your balance. Do not paste it into public chats, screenshots, front-end JavaScript or a git repository. If you think it has leaked, stop using it and write to the support page contact right away so it can be dealt with.

Step 3: claim the trial credit

New users can claim $0.50 of trial credit with one click on the API key page after sign-up. The conditions are short:

  • One claim per person.
  • Valid for 7 days from the claim.
  • No payment needed to start.
  • A trial key runs at 2 concurrent requests and 60 requests per minute.

That is enough to test the integration, run a few hundred short prompts and see how the model answers. As a rough measure, a request with 1,000 input tokens and 500 output tokens costs $0.00015 + $0.00025 = $0.0004, so $0.50 covers about 1,250 such requests. Real prompts vary, so read the usage numbers in the responses.

Step 4: test the key

Run these two commands in a terminal. The first lists models, the second sends a chat message. Replace the key with yours, or better, export it first.

export API_KEY="your-key-here"

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

curl https://api.gemininsfw.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Say hello in five words."}],
    "max_tokens": 30
  }'

A JSON reply with a choices array means the key works. In the response headers you will also find X-Balance-USD, which shows the credit left, and X-Request-Id, which support can use to look at a specific call.

Common errors

SymptomLikely causeFix
401 UnauthorizedTypo, extra space or missing "Bearer"Copy the key again and check the header
404 Not FoundBase URL without /v1Use https://api.gemininsfw.cc/v1
429 with concurrencyToo many open requestsLower parallel workers, close unfinished streams
429 with rate_limitedOver the per-minute capSlow down or add retries with a delay

Step 5: add credit with crypto

When the trial runs out, you add prepaid credit. This site takes crypto: USDT on the TRC20 network or USDC on Base. Pick any whole amount from $20 to $500. Larger top-ups come with a bonus:

Top-upBonusCredit you get
$20 to $49nonesame as paid
$50+5%$52.50
$100+10%$110
$200+15%$230

Credit never expires, and failed or refused requests are not charged. Make sure the network matches the coin you send: USDT must go over TRC20 and USDC over Base. A transfer on the wrong network is the most common way to lose funds in crypto, so check twice before you confirm. Details and token prices are on the pricing page.

What not to do with an API key

A few habits save trouble later. Do not share one key between many people; if one person leaks it, everyone is affected. Do not put it in a mobile app or a browser script, because anyone can read it there. Do not commit it, even to a private repository, since history is easy to copy. And do not send it by chat or email in plain text.

It also helps to watch your balance. Every response includes the X-Balance-USD header, so a small check in your code can warn you before credit runs low. If the balance drops faster than you expect, look at how long your prompts are: a growing chat history is the usual reason, since the whole history is billed as input on every call.

Storing and using the key safely

Put the key in an environment variable and read it in code:

import os
from openai import OpenAI

client = OpenAI(base_url="https://api.gemininsfw.cc/v1", api_key=os.environ["API_KEY"])
r = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Hello"}],
)
print(r.choices[0].message.content)

For web apps, call the API from your server, never from the browser. Create separate environments for development and production, keep a .env file out of version control, and use your host's secrets feature when you deploy. If you use a front end such as a chat client, paste the key into its settings screen along with the base URL and the model uncensored. More request examples are in the docs.

Questions and answers

Is the API key free?

The key itself costs nothing. New users can claim $0.50 of trial credit on the API key page, and after that you pay per token from prepaid credit.

How many keys can I have?

The site does not publish a number, so check the API key page for what your account shows. If you need more than one, ask through the support page.

Does the trial credit expire?

Yes, the trial credit is valid for 7 days. Topped-up credit never expires.

What is the difference between a trial key and a full key?

A trial key allows 2 concurrent requests and 60 requests per minute. A full key allows 8 concurrent requests and 300 requests per minute.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API keyRead the docs