Switch your client in three lines
Drop-in replacement for any OpenAI-compatible client. Update your base URL and API key, then run your existing code against our uncensored endpoint.
Install the OpenAI SDK
Most modern LLM clients rely on the openai Python library or the official Node SDK. Since our API follows the OpenAI chat-completions contract, you do not need a custom client. Install the package for your language of choice using pip or npm. This gives you the standard ChatCompletion interface that expects a base URL, an API key, and a model name.
We support streaming, function calling, and strict JSON modes out of the box. Because we are an independent service, you are responsible for managing your own dependencies. Ensure your SDK version is recent enough to support the parameters you intend to use, such as response_format or tool_choice. The setup is identical to what you would do for any other compliant provider.
Configure Your Base URL and Key
Authentication is handled via a single API key passed in the Authorization header. You get this key immediately after signing up with Google or email. There is no monthly subscription to manage. Simply set your environment variables or pass them directly into your client constructor. The base URL for all requests is https://api.claudensfw.top/v1.
Use the model ID uncensored when initializing your client. This tells the API which model to route your request to. The system does not perform model routing or choice; it serves one specific open-weight model tuned for adult and unrestricted content. If you are migrating from another provider, just swap the base URL and key. Your existing logic remains intact.
Send Your First Request
Start by sending a simple text prompt to verify connectivity. The API accepts standard chat messages with roles like user and assistant. You can adjust parameters like temperature or top_p to control creativity. The model will return a text response directly in the completion field. This is a raw text-in, text-out interface with no extra fluff.
Keep your prompts within the 100,000 token context window, which includes both input and output tokens. If you exceed limits, the API returns an error. For most use cases, a standard single-turn or short multi-turn conversation works perfectly. This confirms your integration is stable before you scale up to more complex logic.
Enable Streaming for Real-Time Output
For better user experience, enable Server-Sent Events (SSE) streaming. This allows you to receive tokens as they are generated rather than waiting for the full response. The API includes token usage statistics in the final chunk of the stream. This is useful for tracking costs in real-time without storing the entire response in memory.
Streaming is supported by all standard SDKs. Set the stream parameter to true in your request. The client will yield partial responses as they arrive. This is ideal for chat interfaces or applications where latency matters. It also helps with debugging, as you can see the model's reasoning process unfold token by token.
Use JSON Mode for Structured Data
When you need deterministic output, use JSON mode. Set the response_format parameter to {"type": "json_object"}. The model will attempt to return strictly valid JSON. This is critical for building reliable pipelines where the next step depends on parsing specific fields. It reduces the need for post-processing regex or error handling.
While JSON mode improves structure, it is not a guarantee of schema validation. The model still generates text based on its training. If your schema is complex, provide clear instructions in the system prompt. This approach works well for extracting entities, generating config files, or feeding data into other APIs.
Support for Tools and Function Calling
The API supports function calling for agent-like behavior. Define your tools in the request and let the model decide when to call them. You can specify tool_choice to force a specific function or let the model choose. This is useful for building assistants that can interact with external systems or retrieve data dynamically.
Pass the tool definitions in the tools array. The model returns a list of tool calls if needed. You then execute those tools and feed the results back into the conversation. This cycle continues until the model decides to generate a final text response. It is a standard OpenAI-compatible pattern that works seamlessly with our infrastructure.
cURL
curl https://api.claudensfw.top/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.top/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.top/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)Specs at a glance
One table with every limit, feature and price that applies to your key.
| Feature | Support |
|---|---|
| Compatibility | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| API key | Authorization: Bearer YOUR_KEY |
| Base URL | https://api.claudensfw.top/v1 |
| Model ID | uncensored |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Max context | 100,000 tokens, input and output combined |
| Structured output | response_format: {"type": "json_object"} |
| Max output | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| SSE streaming | Yes — server-sent events; the last chunk carries token usage |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Sampling parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Requests per minute | 300 requests per minute per key |
| Concurrency | 8 requests at the same time per key |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Request size | 8 MB request body |
| Subscription | no monthly fee; paid credit does not expire |
| How you pay | pay as you go from prepaid credit; nothing is charged for failed or refused requests |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Bonus credit | +5% from $50, +10% from $100, +15% from $200 |
| 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 |
| Content policy | uncensored for adults; the only hard rule: no sexual content involving minors |
| Keys | one key per account, regenerate any time (the old one stops working) |
| Sign-in | sign 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.
| Status | Type | Reason |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend |
401 | missing_key · invalid_key · key_revoked | no key, wrong key, or a key replaced by a newer one |
402 | no_credit | balance is empty — top up, requests resume at once |
403 | content_blocked | sexual content involving minors — refused, not billed |
404 | not_found | unknown endpoint |
413 | request_too_large | body over 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | temporary overload, retry shortly |
Questions and answers
What happens if I run out of credit?
Requests fail with a 402 error. You can top up instantly using USDT (TRC20) or USDC (Base). There is no subscription lock-in, so you only pay for what you use. Credit never expires, so you can top up whenever it suits you.
How does the context window work?
The total context window is 100,000 tokens, including both the prompt and the completion. If you do not specify a max_tokens value, the response can run to the end of the window. To cap the output, explicitly set max_tokens.
Why am I getting a 429 error?
You have exceeded the rate limit of 300 requests per minute per key, or you have too many concurrent requests. The limit is 8 simultaneous requests per key. Wait a few seconds and retry, or reduce the concurrency in your client.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Get API key