Quickstart for Grok NSFW users
Connect your existing OpenAI SDK in minutes to a hosted, uncensored LLM endpoint. This quickstart guides you through authentication, basic requests, streaming, and tool integration using the same code you already know.
Authentication & Base URL
Our API implements the openai compatible protocol. You authenticate by passing your unique API key in the Authorization header. The base URL for all requests is https://api.groknsfw.cc/v1. Unlike standard providers, we do not require a specific organization ID. Simply generate your key via the dashboard or the quick signup page. Keep your key secure; it provides full access to your prepaid credit. There are no monthly fees or subscriptions, only pay-per-token pricing with no expiration.
Every request must include the model identifier uncensored. This model is an open-weight large language model hosted on our infrastructure, distinct from other vendors. It is tuned to provide unrestricted responses for lawful adult content while maintaining high factual accuracy. You do not need to change your client library version; standard OpenAI SDKs work out of the box.
Basic Chat Completion
Send a standard chat completion request to generate text. The endpoint accepts a list of messages, including system, user, and assistant roles. This structure allows you to define context, instructions, and conversation history. The model returns a text response based on the provided prompt. You can control the creativity of the output using parameters like temperature and top_p. If no max_tokens is specified, the response can run to the end of the 100,000 token context window.
Errors are returned in standard JSON format. Common issues include invalid keys or insufficient credit. The API does not handle tokenization for you; you send text, and the model processes it internally. You receive the final generated text or partial streams if enabled.
Streaming Responses
Streaming is supported via Server-Sent Events (SSE). Use thestream parameter set to true in your request. The API returns a series of chunks as the model generates text. This is useful for real-time UI updates or reducing perceived latency. Each chunk contains partial data. The final chunk includes the token usage statistics for the request, allowing you to track costs accurately. Ensure your client library handles stream interruption gracefully.
Function Calling & Tools
The API supports function calling, allowing the model to output structured data instead of plain text. Define your tools in the tools parameter, specifying the function name, description, and parameters schema. When the model determines a tool call is necessary, it returns the function name and arguments in JSON format. Your application then executes the function and feeds the result back into the conversation. This enables complex workflows, data extraction, and automated actions. Set tool_choice to control whether the model must use a tool or can choose freely.
JSON Mode
For applications requiring strict output formats, use JSON mode. Set the response_format parameter to {"type": "json_object"}. The model will constrain its output to valid JSON. This is ideal for parsing data into your backend systems or generating structured configurations. Note that JSON mode may slightly reduce the model's reasoning flexibility compared to free-form text. Ensure your prompt clearly instructs the model to output only JSON. This feature works alongside function calling but provides a simpler interface when you only need structured data without tool definitions.
Token Usage & Limits
Your account is limited to 300 requests per minute and 8 concurrent requests per key. The maximum request body size is 8 MB. If you exceed these limits, the API returns a 429 status code. Authentication errors return 401, and insufficient credit returns 402. Pricing is $0.15 per million input tokens and $0.50 per million output tokens. Errors and refusals do not consume credit. The context window is 100,000 tokens total, including both prompt and completion. Manage your token usage carefully to avoid unexpected costs. Credit never expires, and you can top up anytime using crypto.
cURL
curl https://api.groknsfw.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."}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.groknsfw.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)Node.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.groknsfw.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);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)Technical specifications
One table with every limit, feature and price that applies to your key.
| Spec | Value |
|---|---|
| Protocol | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| API key | Bearer token in the Authorization header |
| Model ID | uncensored |
| Methods | POST /v1/chat/completions · GET /v1/models |
| Base URL | https://api.groknsfw.cc/v1 |
| JSON mode | JSON object mode via response_format json_object |
| Other parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Completion length | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Context window | 100,000 tokens, input and output combined |
| SSE streaming | Supported (stream: true), usage included at the end |
| Concurrency | up to 8 in parallel per key |
| Requests per minute | 300/min per key |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Max body | 8 MB request body |
| Bonus credit | +5% from $50, +10% from $100, +15% from $200 |
| Subscription | no monthly fee; paid credit does not expire |
| How you pay | prepaid credit, charged by real token usage; errors and refusals are free |
| Payment | crypto: USDT on TRON or USDC on Base, $20–$500, any whole sum |
| Trial credit | $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 |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Account | Google or e-mail and password |
| Key management | one key per account, regenerate any time (the old one stops working) |
| Content policy | uncensored for adults; the only hard rule: no sexual content involving minors |
Error reference
Every error is JSON with a type you can switch on. You are never charged for an error.
| 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 | out of credit; add credit and retry |
403 | content_blocked | refused by the content policy |
404 | not_found | unknown endpoint |
413 | request_too_large | request body larger than 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | model busy — retry in a few seconds |
Questions and answers
Is this service a reseller of Grok models?
No. This is an independent API. We host our own uncensored open-weight model on our servers. It is not GPT, Claude, Gemini, Grok, or any other vendor's model. It runs on our infrastructure and is tuned for unrestricted content generation.
How do I top up my credit?
We accept only USDT (TRC20) and USDC (Base). You can top up any whole amount between $20 and $500. Credits do not expire. There are no monthly fees or subscriptions. Top-ups from $50 and $100 include bonus credit.
What is the maximum output length?
There is no separate output cap per request. The total context window, including both prompt and completion, is 100,000 tokens. If you do not set the max_tokens parameter, the response can run to the end of the window.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.