EN ▾
Get API key

First request in five minutes

Get started with the uncensored Gemma API in minutes using standard OpenAI-compatible tools. Send your first request with zero configuration and scale with transparent per-token billing.

Authentication

The API uses a single API key for authentication, issued immediately upon signup. You can generate a key via the Get API key page using Google or an email/password combination. This key authenticates all requests to the base URL: https://api.gemmauncensored.cc/v1. Unlike many services, we do not require a credit card for the initial trial, and the key is displayed only once, so save it securely.

Include the key in the Authorization header as a Bearer token. If the key is invalid or expired, the API returns a 401 error. There is no distinction between read and write scopes; the single key grants full access to your prepaid credit. One active key per account ensures simple tracking, and generating a new key automatically revokes the previous one.

Chat Completions Endpoint

Interact with the uncensored Gemma model using the standard POST /v1/chat/completions endpoint. The model identifier is strictly uncensored. This endpoint accepts text input and returns text output, supporting the same JSON structure used by OpenAI clients. It does not support embeddings, images, or audio, keeping the implementation lightweight.

Below is a basic example using cURL to send a system prompt and user message. This request demonstrates the minimal payload required to get a response from the model.

curl https://api.gemmauncensored.cc/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."}]
  }'

The response includes the generated text in choices[0].message.content. You can also retrieve available models via GET /v1/models, which will list uncensored as the only available option.

Python SDK Integration

Using the official OpenAI Python SDK, you can switch to our API by updating the base URL and API key. This allows you to leverage existing libraries and tooling designed for OpenAI-compatible endpoints. The model name remains uncensored.

from openai import OpenAI

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

This setup ensures that your code remains portable. If you later switch providers, you only need to update the configuration variables. The SDK handles JSON serialization and streaming automatically, reducing boilerplate in your application logic.

Node SDK Integration

For JavaScript and TypeScript developers, the Node.js OpenAI SDK works identically with our base URL. Configure the client with your API key and the correct base URL to point to our servers. This ensures compatibility with any existing OpenAI-compatible client implementation.

import OpenAI from "openai";

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

Pass the model name uncensored in your completion calls. The SDK handles the HTTP requests and parses the JSON responses, allowing you to focus on application logic rather than network handling.

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns data in Server-Sent Events (SSE) format, sending partial responses as they are generated. This reduces perceived latency for users, especially for longer outputs.

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)

The final chunk of the stream contains the total token usage for the request. Streaming does not affect pricing; you are charged for the same input and output tokens as a non-streamed request. Use streaming for chat interfaces where immediate word-by-word display improves user experience.

Limits, Errors & Context Window

The model supports a 100,000 token context window, combining prompt and completion. There is no separate output cap, and if max_tokens is not specified, the response can run to the end of the window. You are limited to 300 requests per minute and 8 concurrent requests per key. The request body must not exceed 8 MB.

Common errors include 401 Unauthorized for invalid keys, 402 Payment Required when credit is exhausted, and 429 Too Many Requests for rate limits. Errors do not consume credit. Credit never expires, so you can top up later without losing unused funds. Ensure your client handles retries gracefully for 429 errors.

Specs at a glance

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

SpecValue
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
MethodsPOST /v1/chat/completions · GET /v1/models
AuthenticationBearer token in the Authorization header
Base URLhttps://api.gemmauncensored.cc/v1
Model IDuncensored
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
StreamingSupported (stream: true), usage included at the end
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
Context window100,000 tokens (prompt + completion together)
Structured outputJSON object mode via response_format json_object
Parallel requestsup to 8 in parallel per key
Max bodyup to 8 MB per request
Requests per minute300 requests per minute per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Subscriptionpaid credit never expires, no subscription
Volume bonus+5% from $50, +10% from $100, +15% from $200
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
Free trial$0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Key managementone key per account, regenerate any time (the old one stops working)
Contentadult content allowed; sexual content involving minors is refused
Sign-insign in with Google or with e-mail + password

HTTP errors

The type field is stable, the message is for humans. Errors cost nothing.

HTTPTypeWhat to do
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditbalance is empty — top up, requests resume at once
403content_blockedrefused by the content policy
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busymodel busy — retry in a few seconds

Questions and answers

Is this the official Gemma API from Google?

No, this is an independent service running an uncensored variant of the open-weight Gemma model on our own servers. It is compatible with the OpenAI API format but is not affiliated with Google or any other model vendor.

How does billing work for errors?

You are only charged for successful token generation. Requests that result in errors (such as 402 or 429) or refusals due to content policy do not consume your prepaid credit.

Can I use multiple API keys simultaneously?

Each account is limited to one active API key at a time. Generating a new key automatically invalidates the previous one. This simplifies billing and usage tracking.

Your key is one form away

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