Main pageBuild
Quickstart Guide
Connect your existing OpenAI SDK clients to our uncensored text generation API. This guide covers authentication, request formatting, and streaming for the 'uncensored' model.
Base URL and authentication
Use our specific base URL for all API calls. Pass your API key in the Authorization header. This ensures your requests route correctly to our uncensored endpoints.
- Base URL:
https://api.groknsfwpromptsthatwork.com/v1 - Header:
Authorization: Bearer YOUR_API_KEY
curl https://api.groknsfwpromptsthatwork.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "set max_tokens to fifty and temperature to zero"}]
}'
Sending your first request
Make a standard chat/completions call. Specify the model as uncensored. This model does not refuse lawful adult content. It handles text generation directly without extra routing.
from openai import OpenAI
client = OpenAI(base_url="https://api.groknsfwpromptsthatwork.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)
Using the Node SDK
Initialize the client with your base URL and key. Send a prompt to generate text. The response contains the full completion object. You can access the generated text via choices[0].message.content.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.groknsfwpromptsthatwork.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);
Handling streaming responses
Enable streaming by setting stream: true. The API returns chunks via Server-Sent Events. You can parse these chunks in real time. This reduces perceived latency for long outputs.
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)
Function calling and JSON mode
Supports tools and structured outputs. Use response_format: {type: "json_object"} for strict JSON. Define functions in the tools array. The model returns structured data based on your schema.
Understanding token usage and limits
The context window is 100,000 tokens total. Max output is 16,000 tokens per request. Rate limits are 300 requests per minute. Errors like 401 or 429 return standard codes. Credits are charged only for valid tokens.
Common questions
What is the base URL for the API?
The base URL is HTTPS://api.groknsfwpromptsthatwork.com/v1. Use this for all OpenAI-compatible SDK configurations.
How much does the uncensored model cost?
Input tokens cost $0.15 per 1M. Output tokens cost $0.50 per 1M. You pay for actual usage with prepaid credit.
Can I use this with the standard OpenAI Python SDK?
Yes. Set the base_url and api_key in your client initialization. The endpoint format matches the OpenAI chat completions interface exactly.
Get your API key now
Sign up, copy your key, and update the base URL. That is all you need to do.
Get API key