EN ▾

Uncensored LLM API for Gemini users

Get API key

https://api.gemininsfw.com/v1

gemininsfw.comGemini API Key Alternative With No Content Refusals

Gemini API Key Alternative With No Content Refusals

A gemini api key alternative is a key from a different service that you can drop into the same place in your app. This one is OpenAI-compatible, tuned to answer lawful adult requests without content refusals, and the swap takes about ten minutes.

Updated

Key points

  • You change three values: base URL, key and model name (uncensored).
  • Gemini-style contents and parts become OpenAI-style messages.
  • Check the key works with GET /v1/models and watch your balance in X-Balance-USD.
  • Text only, 100,000-token context, 8 concurrent requests on a full key.
One key fading out while a new glowing key slides into a socket, illustrating swapping API keys
A coin dropping into a jar of chat bubbles beside a gauge, illustrating a small trial credit for an AI API

The migration in six steps

  1. Create an account on the API key page. Sign up with Google, or with email and password.
  2. Claim the $0.50 trial with one click. It is valid for 7 days, needs no payment and is one per person.
  3. Store the key in an environment variable, for example ALT_API_KEY.
  4. Point your client at https://api.gemininsfw.com/v1.
  5. Change the model name to uncensored.
  6. Convert request and response shapes if you used Gemini's native format.

If you use an OpenAI SDK already, steps 4 and 5 are the whole job. If you use Google's native client, step 6 matters, and the next sections cover it.

First call and a health check

Before touching your app, confirm the key works. List the models and then send a tiny chat request.

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

curl https://api.gemininsfw.com/v1/chat/completions \
  -H "Authorization: Bearer $ALT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"uncensored","messages":[{"role":"user","content":"Reply with the word ready."}]}'

A 401 means the key is wrong or missing the Bearer prefix. A 429 means you hit a rate or concurrency limit. A successful reply includes the X-Balance-USD header, which tells you what is left of your credit. You can also read the balance from GET /v1/balance or the OpenAI-style /v1/dashboard/billing/credit_grants route.

Field mapping from Gemini-style requests

Gemini-styleHereNote
API key in query or headerAuthorization: Bearer KEYNever put it in a URL
contents with partsmessages with contentJoin text parts into one string
Role modelRole assistantUser stays user
systemInstructionFirst message, role systemOne system message is enough
generationConfig.temperaturetemperatureTop level
maxOutputTokensmax_tokensOptional
Response candidates[0].content.parts[0].textchoices[0].message.contentPlain string

Google also documents an OpenAI-compatible mode for its API. If your app already uses it, you can skip the table and change only the base URL and key.

Python and Node

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.gemininsfw.com/v1",
    api_key=os.environ["ALT_API_KEY"],
)

resp = client.chat.completions.create(
    model="uncensored",
    messages=[
        {"role": "system", "content": "You are a story editor for adult fiction."},
        {"role": "user", "content": "Suggest three plot twists for a spy romance."},
    ],
)
print(resp.choices[0].message.content)
print(resp.usage)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.gemininsfw.com/v1",
  apiKey: process.env.ALT_API_KEY,
});

const stream = await client.chat.completions.create({
  model: "uncensored",
  stream: true,
  messages: [{ role: "user", content: "Describe a rainy harbour at midnight." }],
});
for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

Streaming uses server-sent events, and usage arrives at the end. Tool calling and JSON mode (response_format with json_object) also work. The docs show the rest.

What changes in behavior

The key is the easy part. Behavior is what you need to test. The model here is an open-weight model run by an independent provider. It is not Gemini, not made by Google and not a router across vendors. Expect different style, different strengths and different weak spots than a large hosted model. Run your real prompts and compare, because a benchmark on someone else's tasks proves little about yours.

Differences worth planning for:

  • Refusals. Tuned to answer lawful adult requests without content refusals. Sexual content involving minors is never allowed.
  • Modalities. Text only. No images, audio, video, embeddings or fine-tuning.
  • Context. 100,000 tokens for prompt and completion together.
  • Prompt style. Safety-oriented hedging in your old prompts can be removed; clear role and format instructions help more.

Limits and error handling

A full key allows 8 concurrent requests and 300 requests per minute; a trial key allows 2 and 60. The response headers include X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency, so your code can read the cap instead of hardcoding it. When you exceed a limit, the API returns HTTP 429 with code rate_limited or concurrency. Under temporary overload it also returns 429 with Retry-After: 5.

Honor that header, and retry with a growing delay. Remember that a streamed call keeps its concurrency slot until the stream ends, so if you stream to slow clients, set a timeout on the connection. The maximum body is 8 MB.

import time, httpx

PAYLOAD = {"model": "uncensored", "messages": [{"role": "user", "content": "Say ready."}]}

def post_with_retry(key, payload=PAYLOAD, tries=4):
    for n in range(tries):
        r = httpx.post(
            "https://api.gemininsfw.com/v1/chat/completions",
            headers={"Authorization": f"Bearer {key}"},
            json=payload,
            timeout=120,
        )
        if r.status_code == 429:
            time.sleep(int(r.headers.get("Retry-After", 5)) * (n + 1))
            continue
        return r
    return r

Test before you cut over

Do not switch production traffic in one step. Build a small set of 20 to 30 real prompts from your logs, including the ones that failed or got blocked before. Run them against both keys and read the results side by side. Score them on the things your users notice: does it follow the format, hold the character, and keep the length you ask for.

Then roll out gradually. Send 5% of traffic to the new key behind a flag, watch error rates and the X-Balance-USD header, and raise the share when nothing surprising appears. Keep the old key configured until you are confident, so a rollback is a flag flip and not a deploy. Log the X-Request-Id header on every call. If you ever need help with a specific request, that ID is what to send to support.

Money and payment

Pay as you go at $0.15 per 1M input tokens and $0.50 per 1M output tokens. Failed or refused requests are not charged, there is no subscription and credit never expires. Top up any whole amount from $20 to $500, with +5% from $50, +10% from $100 and +15% from $200. Payment is crypto only: USDT on TRC20 or USDC on Base. Details are on the pricing page.

If your main goal is to try things at zero cost first, read the page on an AI API free to use. For separating claims from facts about another provider in the same space, see MiniMax API myths versus facts. Prompts are not used for training.

Questions and answers

Can I keep my Gemini key and add this one?

Yes. Keep both in environment variables and choose the client per request. Many apps send general tasks to one provider and adult fiction to another.

What do I put as the model name?

Use uncensored. You can confirm it with GET /v1/models.

Is this key from Google?

No. It belongs to an independent service that runs an open-weight model behind an OpenAI-compatible API.

How do I check my balance?

Read the X-Balance-USD response header, or call GET /v1/balance.

Your key is one form away

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

Get API key