EN ▾

Uncensor GeminiBuild

API Documentation: uncensored model integration

Get started with our uncensored API by swapping the base URL and API key. Your existing client code works instantly with zero configuration overhead.

Quickstart: Send your first request

The fastest way to verify connectivity is a single completion call. Replace the placeholder key with your credentials and point the client to our base URL. The model responds immediately without content filtering for lawful inputs.

Use this cURL command to test the integration directly from your terminal.

curl https://api.howtouncensorgemini.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Summarize the pros and cons of the current model."}]
  }'

Authentication and Base URL

Our API uses standard Bearer token authentication. You must include your unique API key in the Authorization header of every request. The base URL is HTTPS://api.howtouncensorgemini.com/v1. This endpoint is compatible with any OpenAI SDK.

When you use the Python SDK, you only need to update the base URL and api_key. The rest of the parameters remain identical to the official OpenAI structure.

from openai import OpenAI

client = OpenAI(base_url="https://api.howtouncensorgemini.com/v1", api_key="YOUR_KEY")

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)

Chat Completions Endpoint

All interactions happen via the /v1/chat/completions endpoint. You send a list of messages and receive a text response. The model ID is always "uncensored". This single model handles all your generation needs without routing logic.

If you prefer JavaScript, the Node SDK requires minimal setup. Set the base URL and pass your key. The library handles the HTTP requests automatically.

import OpenAI from "openai";

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

const resp = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);

Supported Parameters and Features

We support standard parameters like temperature, top_p, and stop sequences. You can enforce JSON mode using response_format. Tool calling is fully supported for function integration. These features work exactly as documented in the OpenAI specification.

Set the model field to "uncensored" in every request. This ensures you always hit the correct inference engine. The system ignores unsupported parameters gracefully.

Streaming and Token Usage

Enable streaming by setting stream to true. You receive chunks of text as they are generated. The final chunk contains the full token usage statistics. This allows you to track costs in real time.

Use this example to handle streaming responses efficiently in your application.

stream = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Tell the story in second person."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Limits, Errors, and Context

The context window is 100,000 tokens total. You can output up to 16,000 tokens per request. Rate limits are 300 requests per minute. A 401 error means your key is invalid. A 402 error indicates insufficient credit. A 429 error means you hit the rate limit.

FAQ

how to uncensor gemini with this API

You do not need to modify the model architecture. Simply update your client base URL to our endpoint. The uncensored model handles the rest automatically.

what happens if I exceed the rate limit

The API returns a 429 status code. You must wait until the window resets or upgrade your usage tier if available. Errors are free, but rate limits apply to all requests.

is the 100k context window shared

Yes, the 100,000 token limit covers both the prompt and the completion. Plan your input tokens carefully to ensure you have enough room for the response.

Secure your API key

Register, retrieve the key, and update your base URL. Simple configuration.

Get your key