Base URL and Authentication
Your API key authenticates every request. Use the base URL HTTPS://api.claudensfwpolicy.com/v1 with any OpenAI-compatible client. We support "Continue with Google" or email sign-up for immediate key access. No phone number is required. The key is shown once after signup.
First Request
Send a POST request to /v1/chat/completions. The model id is "uncensored". This model is an open-weight model tuned for lawful adult use. It does not refuse standard topics. Errors and refusals are free. Use this curl command to test connectivity.
curl https://api.claudensfwpolicy.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List five common NSFW policy restrictions"}]
}'
Python SDK Integration
Install the official OpenAI Python library. Set the base URL to our endpoint. Pass your API key as the API key value. This allows you to use existing client code without modification. The model responds to standard prompts.
from openai import OpenAI
client = OpenAI(base_url="https://api.claudensfwpolicy.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 SDK Integration
Use the @anthropic or OpenAI Node SDK. Configure the base URL in your client options. The endpoint accepts standard JSON payloads. This ensures compatibility with your existing Node.js applications. Stream or sync modes work identically.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.claudensfwpolicy.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 and Token Usage
Enable streaming by setting stream to true. Token usage data appears in the final chunk. This allows real-time display of generated text. The API supports Server-Sent Events (SSE) for efficient data transfer. Monitor usage via the response headers.
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)
Rate Limits and Quotas
You have a limit of 300 requests per minute per key. Concurrency is limited to 8 requests at the same time. The request body must not exceed 8 MB. A 401 error means your key is invalid. A 402 error indicates no credit. A 429 error signals rate limiting. The context window is 100,000 tokens for prompt and completion together. Max output is 16,000 tokens per request.