Switch your client in three lines
Get your first response in under five minutes. This guide covers the OpenAI-compatible endpoints, streaming, and tool use for the uncensored Gemma API.
Base URL and Authentication
Start by pointing your client to the base URL https://api.gemmauncensored.top/v1. You need a valid API key for every request. Generate one instantly via the dashboard using Google or email; no phone number is required. The key grants full access to the chat completions endpoint. Keep your key secure, as it is the only credential needed for billing and usage tracking.
Your First Request
Send a POST request to /v1/chat/completions with the model ID uncensored. The response returns text output based on your prompt. If you encounter a 401, verify your key. A 402 error means your prepaid credit is exhausted. The model handles controversial topics without refusal, provided they are lawful.
curl https://api.gemmauncensored.top/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."}]
}'
Python SDK Integration
Use the official OpenAI Python client. Set the base URL to our endpoint and provide your API key. The SDK handles serialization automatically. This approach works for synchronous calls. You can parse the response text directly. It is the fastest way to integrate the API into backend services or scripts.
from openai import OpenAI
client = OpenAI(base_url="https://api.gemmauncensored.top/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)
Node.js Implementation
Initialize the OpenAI package with the custom base URL. Pass the model ID uncensored in the completion request. This setup mirrors standard OpenAI integrations. It allows you to reuse existing client code with minimal changes. Perfect for Node.js applications requiring direct text generation without content filters.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.gemmauncensored.top/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);
Streaming Responses
Enable streaming by setting stream: true. The API returns Server-Sent Events (SSE). Each chunk contains partial text. Token usage details appear in the final chunk. This method reduces perceived latency for long outputs. It is ideal for real-time displays or interactive applications where immediate feedback is critical.
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 supports 100,000 tokens total. There is no separate output cap. Rate limits cap at 300 requests per minute. Handle 401 errors by refreshing your key. Fix 402 errors by topping up credit via crypto. A 429 indicates you have exceeded the per-minute limit. Adjust your request frequency accordingly to avoid service interruptions.
Under the hood: specs
The numbers below are the real limits of this API, not marketing. Compare them with what your app needs.
| Parameter | Details |
|---|---|
| Protocol | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| Authentication | Bearer token in the Authorization header |
| Base URL | https://api.gemmauncensored.top/v1 |
| Model ID | uncensored |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Sampling parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| JSON mode | JSON object mode via response_format json_object |
| Max output | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Context window | 100,000 tokens (prompt + completion together) |
| Streaming | Supported (stream: true), usage included at the end |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Parallel requests | 8 requests at the same time per key |
| Request size | up to 8 MB per request |
| Rate limit | 300/min per key |
| How you pay | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Price | $0.15 per 1M input tokens · $0.50 per 1M output tokens |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Volume bonus | +5% from $50, +10% from $100, +15% from $200 |
| Credit expiry | no monthly fee; paid credit does not expire |
| 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 |
| Key management | one key per account, regenerate any time (the old one stops working) |
| Sign-in | sign in with Google or with e-mail + password |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
Error codes
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| Code | Type | Meaning |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | no key, wrong key, or a key replaced by a newer one |
402 | no_credit | balance is empty — top up, requests resume at once |
403 | content_blocked | refused by the content policy |
404 | not_found | only /v1/chat/completions and /v1/models exist |
413 | request_too_large | request body larger than 8 MB |
429 | rate_limited · concurrency | over 300/min or 8 parallel — back off and retry |
503 | upstream_busy | model busy — retry in a few seconds |
Questions and answers
Does the API support function calling?
Yes, the endpoint supports function calling with tools and tool_choice parameters. You can define custom tools in your request payload for structured interactions.
What happens if I exceed the rate limit?
The API returns a 429 status code. You must wait until the minute resets or reduce your request frequency. The limit is 300 requests per minute per key.
Is the trial credit refundable?
No, the $0.50 trial credit is non-refundable and expires after 7 days. It is designed for quick testing without requiring a credit card or payment method.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.