EN ▾

Uncensored API. OpenAI compatible. Code-first.

Start with trial credit

Email and password, key on screen right away.

claudensfw.comQuickstart for Claude NSFW users
https://api.claudensfw.com/v1

Quickstart for Claude NSFW users

Migrate your existing OpenAI client code to claudensfw.com to access an uncensored API with identical endpoints. This guide covers authentication, streaming, and function calling for developers integrating the uncensored model.

Base URL and Authentication

ClauDensFW operates as an OpenAI-compatible endpoint. To route your existing SDK integrations, update your base_url to https://api.claudensfw.com/v1 and provide your unique API key in the authorization header. You can generate a key immediately on the Get API key page using Google or an email/password pair. The system issues one active key per account; generating a new key invalidates the previous one instantly.

Authentication relies on standard bearer tokens. Ensure your client sends the header Authorization: Bearer YOUR_API_KEY with every request. No additional configuration is required for the uncensored model to recognize your credentials.

Chat Completions Endpoint

Send requests to POST /v1/chat/completions using the model identifier uncensored. This endpoint accepts standard chat messages and returns text completions. Unlike consumer chat apps, this is a pure API for automation and code-first workflows.

The model supports a 100,000-token context window for both prompt and completion combined. If you do not specify max_tokens, the response can run to the end of the window. Set max_tokens only if you want to cap the output. Errors and refusals do not consume your prepaid credit.

Streaming Responses

Enable streaming by setting stream: true. The API returns Server-Sent Events (SSE) chunks as the model generates text. This reduces perceived latency for interactive applications.

Token usage statistics (input and output counts) are included only in the final chunk of the stream. This allows you to track costs accurately without buffering the entire response. Use the standard SSE parser in your SDK to handle the stream efficiently.

Function Calling & Tools

Define tools in your request body to enable function calling. The model returns structured arguments that you can parse and execute. Use the tool_choice parameter to control whether the model calls a tool or responds directly.

This feature works identically to the OpenAI tool-use format, ensuring your existing tool definitions require no changes. The uncensored model handles complex tool schemas reliably without unnecessary refusals for standard technical tasks.

JSON Mode

For strict schema compliance, set response_format to {"type": "json_object"}. This forces the model to output valid JSON, which is essential for programmatic pipelines and API integrations.

JSON mode reduces parsing errors and ensures your downstream code receives predictable structures. Combine this with function calling for robust, self-contained API agents that output executable data formats.

Limits, Errors, and Context

Each API key is limited to 300 requests per minute and 8 concurrent requests. The maximum request body size is 8 MB. If you exceed these limits, the API returns a 429 status code. A 401 error indicates an invalid or expired key, while a 402 error means your prepaid credit is exhausted.

Requests that fail due to rate limits or insufficient funds do not consume tokens. The context window sums prompt and completion tokens; ensure your total usage stays within 100,000 tokens to avoid truncation.

cURL

curl https://api.claudensfw.com/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.claudensfw.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.js

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.claudensfw.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

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)

Questions and answers

Does this API support image or audio generation?

No. ClauDensFW provides a text-only chat-completions API. It does not support embeddings, image, audio, or video generation. Focus on text-based automation and function calling.

What happens if I get a 402 error?

A 402 error indicates that your prepaid credit is exhausted. You can top up using USDT (TRC20) or USDC (Base). Errors and refusals do not consume your balance.

Is the trial credit valid forever?

No. New accounts receive $0.50 of trial credit valid for 7 days. Claim this credit with one click on your API key page. Prepaid credits you purchase do not expire, but the initial trial credit has a strict deadline.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key

Technical specifications

Everything the endpoint can and cannot do, in one place — check it before you top up.

FeatureSupport
CompatibilityOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
API keyAuthorization: Bearer YOUR_KEY
Model IDuncensored
MethodsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.claudensfw.com/v1
Structured outputresponse_format: {"type": "json_object"}
Completion lengthup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Context window100,000 tokens (prompt + completion together)
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
SSE streamingSupported (stream: true), usage included at the end
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Max body8 MB request body
Requests per minute300 requests per minute per key
Concurrency8 requests at the same time per key
Free trial$0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Credit expiryno monthly fee; paid credit does not expire
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Bonus credit+5% from $50, +10% from $100, +15% from $200
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Content policyadult content allowed; sexual content involving minors is refused
Key managementone active key per account; a new key replaces the old one
Sign-insign in with Google or with e-mail + password

When a request fails

Errors come back as JSON with a stable type; failed and refused requests are not billed.

StatusTypeReason
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditbalance is empty — top up, requests resume at once
403content_blockedrefused by the content policy
404not_foundunknown endpoint
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busymodel busy — retry in a few seconds