EN ▾

Quickstart for Gemma NSFW users

Integrate our uncensored text completion API by updating your base URL and API key. This guide covers the OpenAI-compatible endpoints for immediate deployment.

Base URL & Authentication

Our API is a drop-in replacement for standard OpenAI endpoints. To switch, update your client's base_url to https://api.gemmansfw.com/v1 and set the Authorization header to Bearer YOUR_API_KEY. This single change allows existing code to route requests to our uncensored model without modification. We support the official OpenAI SDKs and any compatible client library. Authentication is handled via a single API key generated during signup. Ensure you are using HTTPS to protect your credentials during transit. The model identifier for all requests is uncensored. This is an open-weight model hosted on our infrastructure, distinct from GPT or Llama variants.

First Request

Test the connection with a simple text completion request. The following example demonstrates a standard POST request to the chat completions endpoint. Replace YOUR_API_KEY with your key from the dashboard. The model field must be set to uncensored. This request returns pure text completion. You can adjust the max_tokens to control output length. If you omit max_tokens, the response can run to the end of the window. The response will contain the generated text in the choices array. This confirms your integration is working correctly with our uncensored model.

Python SDK Integration

Use the official OpenAI Python library to interact with our API. Install the package via pip, then initialize the client with our base URL. Pass your API key as the api_key argument. Set the base_url to https://api.gemmansfw.com/v1. This ensures all subsequent calls route to our uncensored endpoint. You can use the same prompt structure as you would for GPT-4. The library handles serialization and response parsing automatically. This approach minimizes boilerplate code and leverages existing ecosystem tools. It is ideal for rapid prototyping and production deployment. Ensure you are using a recent version of the SDK for full compatibility.

Node SDK Integration

For JavaScript environments, use the @anthropic-ai/sdk or the standard OpenAI npm package. Configure the client with the base URL https://api.gemmansfw.com/v1. Pass your API key in the configuration object. This allows you to send chat completions from your Node.js applications. The SDK handles the HTTP requests and response parsing. You can specify parameters like temperature and top_p to control creativity. This method is suitable for server-side rendering or API backend services. It maintains the same interface as the standard OpenAI client. Adjust the model name to uncensored in your request payload.

Streaming Responses

Enable streaming to receive tokens as they are generated. This reduces perceived latency for end-users. Set the stream parameter to true in your request. The API returns a Server-Sent Events (SSE) stream. Each chunk contains a partial response. The final chunk includes the total token usage statistics. This is useful for chat interfaces that display text in real-time. Ensure your client handles the stream correctly. Buffering or ignoring chunks may result in incomplete responses. Streaming is supported by all official SDKs and compatible clients. It provides a smoother user experience for long-form content generation.

Limits & Error Handling

Our API enforces strict limits to ensure stability. You are allowed 300 requests per minute per key and 8 concurrent requests. The maximum request body size is 8 MB. Errors return standard HTTP status codes. A 401 error indicates an invalid or missing API key. A 402 error means your prepaid credit is exhausted. A 429 error signals that you have exceeded the rate limit. Your context window is 100,000 tokens for prompt and completion combined. There is no separate output cap. Refusals for illegal content do not consume credit. Always check the response headers for usage details.

cURL

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

Python

from openai import OpenAI

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

Capabilities and limits

A quick checklist for developers: format, limits, features, billing.

FeatureSupport
CompatibilityOpenAI Chat Completions schema; official openai SDKs work unchanged
API keyBearer token in the Authorization header
Model IDuncensored
EndpointsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.gemmansfw.com/v1
Max context100,000 tokens, input and output combined
SSE streamingYes — server-sent events; the last chunk carries token usage
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Structured outputJSON object mode via response_format json_object
Other parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Request size8 MB request body
Concurrencyup to 8 in parallel per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Requests per minute300 requests per minute per key
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Bonus credit+5% from $50, +10% from $100, +15% from $200
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Trial credit$0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Credit expirypaid credit never expires, no subscription
Contentuncensored for adults; the only hard rule: no sexual content involving minors
Key managementone active key per account; a new key replaces the old one
Sign-inGoogle or e-mail and password

Error reference

Errors come back as JSON with a stable type; failed and refused requests are not billed.

StatusTypeReason
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditout of credit; add credit and retry
403content_blockedsexual content involving minors — refused, not billed
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_busytemporary overload, retry shortly

Questions and answers

What is the context window size?

The context window supports 100,000 tokens for the combined input and output. There is no separate output cap per request. If you do not specify a max_tokens value, the response can run to the end of the window.

How are errors handled and do they cost credit?

Errors such as 401 (invalid key) or 402 (insufficient funds) do not consume your prepaid credit. Token usage is only charged when a response is successfully generated. Refusals for hard content limits are also free. Errors are returned with standard HTTP status codes for easy debugging.

Can I use this API with existing OpenAI code?

Yes, the API is fully OpenAI-compatible. You only need to update the base URL and API key in your client configuration. The endpoint structure, parameters, and response formats match the OpenAI chat completions standard. This allows for drop-in replacement in most Python and Node.js applications.

Your key is one form away

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

Get API keyRead the docs