EN ▾

First request in five minutes

Integrate the uncensored API into your existing OpenAI SDK workflows by updating the base URL and key. This guide covers the essential endpoints, streaming, and tool calling for immediate deployment.

Base URL and Authentication

Replace your existing OpenAI base URL with our endpoint to route requests to the uncensored model. You will need an API key obtained from the dashboard. Authentication uses the standard Authorization: Bearer <key> header.

  • Base URL: https://api.claudeuncensored.top/v1
  • Model ID: uncensored

Ensure your SDK client is configured to use this new base URL. No other client changes are required for basic text generation.

First Request

Send a simple text completion to verify connectivity. This request targets the chat-completions endpoint with the uncensored model. The response includes the generated text and token usage statistics.

This confirms the API is accepting requests and that your authentication credentials are valid. If you receive a 401 error, verify your API key is correct and active.

curl https://api.claudeuncensored.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 SDK Integration

Use the official OpenAI Python library to interact with the API. Pass the base URL and your API key during client initialization. This allows you to use the same code structure you would with GPT or Claude.

The client handles the HTTP requests automatically. You can specify parameters like temperature or max_tokens directly in the chat.completions.create() call.

from openai import OpenAI

client = OpenAI(base_url="https://api.claudeuncensored.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 SDK Usage

The Node.js SDK follows the same pattern. Initialize the client with the custom base URL and your secret key. This ensures all subsequent calls route to the uncensored model.

Stream the response if needed, or parse the JSON object for structured data. The SDK handles the underlying HTTP transport, so you can focus on application logic.

import OpenAI from "openai";

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

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) containing incremental chunks of text. This reduces perceived latency for end-users.

The final chunk includes the complete token usage statistics, allowing you to track costs accurately. Parse the delta.content field to accumulate the full response text.

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)

Limits, Errors, and Context Window

The context window supports up to 100,000 tokens total. There is no separate output cap, and if max_tokens is unset the response can run to the end of the window. Requests exceeding the 8 MB body limit will be rejected.

Common errors include 401 for invalid keys, 402 if prepaid credit is exhausted, and 429 for rate limits (300 requests/minute, 8 concurrent requests per key). Errors do not consume credit. Refunds are not issued for credit, but billing issues can be resolved via Support.

Specs at a glance

If your tool speaks the OpenAI API, these are the details that matter.

FeatureSupport
ProtocolOpenAI Chat Completions schema; official openai SDKs work unchanged
MethodsPOST /v1/chat/completions · GET /v1/models
Modeluncensored
API keyBearer token in the Authorization header
Base URLhttps://api.claudeuncensored.top/v1
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Completion lengthup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
SSE streamingYes — server-sent events; the last chunk carries token usage
Structured outputresponse_format: {"type": "json_object"}
Other parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Context window100,000 tokens, input and output combined
Request sizeup to 8 MB per request
Parallel requests8 requests at the same time per key
Requests per minute300/min per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Bonus credit+5% from $50, +10% from $100, +15% from $200
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Trial credit$0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Subscriptionno monthly fee; paid credit does not expire
Billingpay 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
Key managementone active key per account; a new key replaces the old one
Contentadult content allowed; sexual content involving minors is refused
AccountGoogle or e-mail and password

HTTP errors

The type field is stable, the message is for humans. Errors cost nothing.

StatusTypeReason
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
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

Questions and answers

What is the maximum context window?

The total context window is 100,000 tokens, combining both prompt and completion. There is no separate output cap per request. If you do not specify max_tokens, the response can run to the end of the window.

How do I handle streaming responses?

Set the stream parameter to true in your SDK client. The API returns Server-Sent Events (SSE). You should accumulate the text from each chunk's delta.content field. The final chunk contains the full token usage data for billing.

What happens if I exceed my prepaid credit?

Requests will return a 402 error indicating insufficient funds. Errors do not consume credit, so you are not charged for failed attempts. Top up your prepaid balance by crypto (USDT on TRC20, USDC on Base) to resume service. Credit does not expire.

Your key is one form away

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

Get API key