EN ▾
Get API key

Quickstart for Gemma users

Drop the Gemma uncensored API into your existing OpenAI-compatible client in three lines. This guide covers authentication, streaming, tools, and JSON mode for the single uncensored endpoint.

Get API key

Prerequisites: SDK Setup

Before sending requests, ensure your environment has the official SDK installed for your language. You need a valid API key, which you generate on the Get API key page via Google or email/password. The key is displayed immediately after signup. No phone number is required, and no card is needed for the initial trial credit. Keep your key secure; it authenticates all requests to the base URL.

Authentication & Base URL

Configure your client to point to our base URL: https://api.gemmauncensored.com/v1. Set the Authorization header to Bearer YOUR_API_KEY. This endpoint is OpenAI-compatible, meaning you can reuse existing client code by simply swapping the base URL and key. The API serves one model with the ID uncensored. It does not support embeddings, images, or audio.

curl https://api.gemmauncensored.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
  }'

Basic Chat Completion Request

Send a standard chat completion request to POST /v1/chat/completions. Specify the model as uncensored. The model is an open-weight LLM tuned to answer without content refusals for lawful adult use, though it strictly blocks sexual content involving minors. You can define system, user, and assistant messages as usual. The API returns text output based on your prompt.

Streaming Responses (SSE)

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE). Each chunk contains partial text. The final chunk includes the total token usage statistics. This approach reduces perceived latency for long outputs. Use your SDK's built-in streaming handlers to process the stream efficiently without buffering the entire response in memory.

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)

Function Calling & JSON Mode

The API supports function calling via the tools and tool_choice parameters. Define your functions in the request schema, and the model will output structured tool calls when appropriate. For strict JSON output, set response_format to {"type": "json_object"}. This ensures the model returns valid JSON, useful for parsing structured data. You can also control randomness with temperature, top_p, stop, seed, and penalty parameters.

from openai import OpenAI

client = OpenAI(base_url="https://api.gemmauncensored.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)

Limits, Errors, and Context Window

The context window supports 100,000 tokens total (prompt + completion). There is no separate output cap, and if max_tokens is unset, the response can run to the end of the window. You are limited to 300 requests per minute and 8 concurrent requests per key. Request bodies must be under 8 MB. If your API key is invalid, the server returns a 401 error. If your prepaid credit is exhausted, you receive a 402 error requiring a crypto top-up. Errors and refusals do not consume credit.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.gemmauncensored.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);

API specifications

If your tool speaks the OpenAI API, these are the details that matter.

SpecValue
CompatibilityOpenAI Chat Completions schema; official openai SDKs work unchanged
API keyBearer token in the Authorization header
EndpointsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.gemmauncensored.com/v1
Modeluncensored
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Max context100,000 tokens (prompt + completion together)
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
SSE streamingSupported (stream: true), usage included at the end
JSON moderesponse_format: {"type": "json_object"}
Requests per minute300 requests per minute per key
Concurrencyup to 8 in parallel per key
Max bodyup to 8 MB per request
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Subscriptionno monthly fee; paid credit does not expire
Volume bonus+5% from $50, +10% from $100, +15% from $200
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Free trial$0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
How you payprepaid credit, charged by real token usage; errors and refusals are free
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Accountsign in with Google or with e-mail + password
Key managementone active key per account; a new key replaces the old one
Content policyadult content allowed; sexual content involving minors is refused

When a request fails

Every error is JSON with a type you can switch on. You are never charged for an error.

CodeTypeMeaning
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary overload, retry shortly

Questions and answers

How do I top up my credit?

Credit is topped up by crypto: USDT (TRC20) or USDC (Base). Minimum top-up is $20, maximum $500. You receive a +5% bonus for $50+ and +10% for $100+ and +15% for $200+. PayPal is not accepted.

What happens if I exceed the rate limit?

You are limited to 300 requests per minute and 8 concurrent requests per key. Exceeding these limits will result in errors. Errors and refusals are free and do not consume your prepaid credit.

Is this the official Gemma API?

No. We are an independent service hosting our own open-weight uncensored model. We are not affiliated with Google, Meta, or any other vendor. Our API is compatible with OpenAI SDKs but serves a different model.

Your key is one form away

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

Get API key