Claude code nsfw: quickstart & sdk integration
Replace your standard OpenAI base URL with our endpoint to run the same client code against an uncensored model. You get unrestricted text generation without changing your SDK integration.
Installation and configuration
Start by swapping your base URL to point at our dedicated endpoint. This single change allows your existing code to bypass standard refusals instantly. You do not need a new library, just a new destination for your requests.
Configure your API key immediately after signup. The key appears on your dashboard and works with any OpenAI-compatible client. Use this setup to route traffic through our uncensored LLM without touching your application logic.
Basic chat completion example
Send a standard chat completion request to generate unrestricted text. The model accepts your prompt and returns a direct response without filtering for adult themes.
Use the curl command below to verify connectivity. Replace YOUR_API_KEY with your generated token. This endpoint serves the uncensored model optimized for high-context generation.
curl https://api.claudecodensfw.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the steps to restart the system service"}]
}'The response contains the full text of the completion. You can process this string directly in your application. No special parsing is required for standard text output.
Streaming responses and usage
Stream tokens in real-time to reduce perceived latency for users. This method delivers partial results as they are generated. It provides a smoother experience for interactive applications.
Use the Python SDK snippet to handle streaming efficiently. The code captures each chunk as it arrives. You can accumulate these chunks to build the final response or display them live.
from openai import OpenAI
client = OpenAI(base_url="https://api.claudecodensfw.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)Streaming is supported via Server-Sent Events. The final chunk includes token usage details. Track your consumption accurately without extra API calls.
Advanced parameters and modes
Control the creativity and structure of your output using standard parameters. Adjust temperature for variability or top_p for nucleus sampling. These settings work exactly as they do with other models.
Use the Node SDK to send structured JSON responses. Set the response_format to json_object for reliable parsing. This is useful for generating data or code snippets that must follow a strict schema.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.claudecodensfw.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);Function calling is also supported. Define tools in your request and let the model decide when to invoke them. This allows for complex workflows without hardcoding logic.
Error handling and limits
Handle standard HTTP errors gracefully in your application. A 401 status indicates an invalid or missing API key. Check your credentials and ensure the key is active.
A 402 status means your prepaid credit is exhausted. Top up via crypto to resume service. Credits never expire, so you can add funds whenever convenient.
A 429 status signals that you have hit the rate limit. You are allowed 300 requests per minute. Wait briefly before retrying your request.
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)Respect the context window of 100,000 tokens. This limit applies to the sum of prompt and completion tokens. Exceeding this limit will result in an error. Plan your input size accordingly.
Common questions
Is this an official claude code NSFW API?
No, we are an independent provider hosting an open-weight model. We offer an uncensored LLM experience compatible with standard OpenAI endpoints. Check the vendor documentation for details on their specific models.
Does the uncensored model support image generation?
No, this API serves text only. It does not support embeddings, audio, video, or image generation. You can use function calling to integrate with other services if needed.
How do I top up my credit?
Top up is done via crypto only, specifically USDT on TRC20 or USDC on Base. Minimum top-ups start at $20. Your credit never expires and bonuses are applied automatically.
Get your key in seconds
Register, copy the token, update the endpoint URL. That is the entire configuration.