First request in five minutes
Integrate our uncensored API into your NSFW AI workflow by updating three configuration values in your existing OpenAI-compatible client. This quickstart covers authentication, text generation, and streaming with zero additional dependencies.
Base URL and Authentication
Our API mirrors the OpenAI v1 interface, allowing you to swap endpoints without changing your application logic. Use https://api.groknsfw.top/v1 as your base URL. Authentication requires a valid API key passed in the Authorization header as a Bearer token. You can generate this key instantly via Google sign-in or email on the dashboard. Each account supports one active key at a time; issuing a new key invalidates the previous one immediately. This single-key model simplifies access control for most development and QA environments.
First Request
Send a standard chat completion request to test connectivity. The model identifier is uncensored, which handles content refusals differently than standard models. Below is a basic example using the curl command line tool to verify your key and base URL are correct.
curl https://api.groknsfw.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."}]
}'
If you receive a JSON response with choices and usage, your integration is active. Check the usage object to see token consumption for accurate billing tracking.
Python SDK Integration
Use the official openai Python package to interact with our endpoint. Set the base_url and api_key attributes before making calls. This approach works with any library that supports the OpenAI schema, making migration from other providers straightforward.
from openai import OpenAI
client = OpenAI(base_url="https://api.groknsfw.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)
This snippet demonstrates a synchronous request. For high-throughput NSFW content generation, consider using asynchronous clients to handle multiple requests concurrently without blocking your main thread.
Node.js SDK Setup
For JavaScript or TypeScript applications, configure the OpenAI SDK to point to our base URL. This ensures your existing client code works without modification. The Node.js ecosystem benefits from this compatibility, allowing rapid prototyping of NSFW chat interfaces.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.groknsfw.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);
Ensure you are using a recent version of the SDK that supports custom base URLs. The configuration object should strictly include the apiKey and baseURL properties to avoid endpoint mismatches.
Streaming Responses (SSE)
Enable real-time token generation by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream, delivering tokens as they are generated. This reduces perceived latency for end-users in chat applications.
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)
Parse the SSE events to extract the delta content. The final chunk in the stream contains the total usage statistics, which you should use for accurate billing reconciliation. Streaming does not affect token counting or pricing.
Limits, Errors, and Context
Your requests are subject to a limit of 300 per minute and 8 concurrent requests per key. The maximum request body size is 8 MB, and the context window supports up to 100,000 tokens total. Errors are returned in standard HTTP formats: 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Credit errors are free, but rate limits require you to throttle requests. There is no separate output cap; omitting max_tokens lets the response run to the end of the window.
Specs at a glance
The numbers below are the real limits of this API, not marketing. Compare them with what your app needs.
| Spec | Value |
|---|---|
| Compatibility | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| API key | Bearer token in the Authorization header |
| Base URL | https://api.groknsfw.top/v1 |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Model ID | uncensored |
| JSON mode | response_format: {"type": "json_object"} |
| Max output | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Sampling parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Max context | 100,000 tokens (prompt + completion together) |
| Streaming | Supported (stream: true), usage included at the end |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Rate limit | 300/min per key |
| Concurrency | up to 8 in parallel per key |
| Request size | 8 MB request body |
| How you pay | pay 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 |
| Subscription | paid credit never expires, no subscription |
| Bonus credit | +5% on $50+, +10% on $100+, +15% on $200+ |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Sign-in | Google or e-mail and password |
| Key management | one active key per account; a new key replaces the old one |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
Error codes
The type field is stable, the message is for humans. Errors cost nothing.
| Status | Type | Reason |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend |
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 | sexual content involving minors — refused, not billed |
404 | not_found | unknown endpoint |
413 | request_too_large | body over 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | temporary overload, retry shortly |
Questions and answers
Is this the official Grok API?
No, we are an independent service hosting an open-weight model tuned for uncensored responses. We use the same API protocol as OpenAI, but our model is not GPT-4, Grok, or any other vendor's model. Check the vendor's documentation for their specific model details.
How do I get more API keys?
Each account is limited to one active API key at a time. Generating a new key on the dashboard will immediately invalidate the previous key. This design simplifies access management for individual developers and small teams.
Do you support function calling?
Yes, the API supports standard function calling via the tools and tool_choice parameters. You can also enforce JSON output using response_format: { "type": "json_object" } for structured data generation.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.