Uncensored gemma API Quickstart Guide
Uncensored gemma API delivers a prepaid, unrestricted LLM endpoint compatible with OpenAI clients, letting you send content without refusals using a flat-rate token model.
Base URL and Authentication
Use https://api.uncensoredgemma.com/v1 as your base URL for all requests. Authentication relies on a single API key generated during signup via Google or email, which you pass in the Authorization: Bearer header. This setup ensures your client library routes calls correctly without extra configuration overhead.
The key grants access to the endpoint immediately, with no phone number required for verification. If you lose the key, generating a new one replaces the old active credential entirely. Keep this key secure, as it controls your prepaid credit usage.
Sending Your First Chat Completion
Post a JSON payload to the /v1/chat/completions endpoint to receive text responses from the uncensored model. The model ID is strictly uncensored, ensuring you interact with our specific open-weight variant tuned for minimal refusal behavior.
Requests are charged based on actual token consumption, with errors and refusals remaining free. This transparent billing structure means you pay only for what you consume, avoiding hidden fees associated with complex tiered plans.
curl https://api.uncensoredgemma.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the steps to compile the kernel source code"}]
}'
Python SDK Integration
Initialize the OpenAI client with your base URL and API key to leverage familiar Python workflows. The library handles serialization and authentication automatically, allowing you to focus on prompt engineering rather than network details.
Set the model parameter to uncensored to ensure the request reaches our specific server instance. This approach maintains compatibility with existing codebases while switching the underlying model behavior to be fully unrestricted for lawful adult content.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredgemma.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)Node.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredgemma.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);Streaming
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)Common questions
What is the context window size for the uncensored gemma API?
The API supports a context window of 100,000 tokens for both prompt and completion combined. You can set a maximum output of 16,000 tokens per request, or revert to the default 2,048 tokens if unspecified.
How does prepaid billing work for uncensored AI usage?
Credit is charged strictly by real token usage, with input tokens at $0.15 per 1M and output tokens at $0.50 per 1M. Errors do not consume credit, and paid balances never expire, allowing you to top up via crypto only when needed.
Can I use this uncensored LLM API for streaming responses?
Yes, the endpoint supports Server-Sent Events (SSE) for streaming, with token usage details provided in the final chunk. This enables real-time text generation for chatbots or interactive applications without waiting for the full completion.
Generate your API key
Register, retrieve your key, and update your endpoint URL. That is all.
Try with trial credit