EN ▾

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.

FeatureSupport
CompatibilityOpenAI Chat Completions schema; official openai SDKs work unchanged
API keyAuthorization: Bearer YOUR_KEY
Base URLhttps://api.claudensfw.top/v1
Model IDuncensored
EndpointsPOST /v1/chat/completions · GET /v1/models
Max context100,000 tokens, input and output combined
Structured outputresponse_format: {"type": "json_object"}
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
SSE streamingYes — server-sent events; the last chunk carries token usage
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Sampling parameterstemperature, top_p, stop, seed and the two penalties are passed through
Requests per minute300 requests per minute per key
Concurrency8 requests at the same time per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Request size8 MB request body
Subscriptionno monthly fee; paid credit does not expire
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Priceinput $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 policyuncensored for adults; the only hard rule: no sexual content involving minors
Keysone key per account, regenerate any time (the old one stops working)
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_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary 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