EN ▾
Get API key

Uncensored API for developers

Uncensored API for developers

Quickstart for Claude users

Integrate the uncensored API into your existing stack by swapping the base URL and API key. This guide covers the standard endpoints, streaming, and integration patterns for Python and Node.js clients.

Base URL & Authentication

Start by pointing your client to our dedicated endpoint. The API follows the standard OpenAI chat-completions structure, meaning you only need to update the base_url and provide your unique API key in the authorization header. You receive one key per account, which is displayed immediately after signup via Google or email.

Authentication is handled via the Authorization: Bearer <key> header. If you encounter a 401 Unauthorized error, verify that the key is correct and active. The base URL is: https://api.claudeuncensored.cc/v1

First Request

Test the connection with a simple completion request. This endpoint accepts text input and returns text output. The model identifier is strictly uncensored. Ensure you are sending a valid system or user message to receive a response.

Below is a standard cURL example to verify connectivity and pricing.

curl https://api.claudeuncensored.cc/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."}]
  }'

Check the response body for the generated text. If you receive a 402 Payment Required error, your prepaid credit has been exhausted. Credit is charged by real token usage and never expires.

Python SDK Integration

Use the official OpenAI Python SDK to interact with the API. Initialize the client with your key and the custom base URL. This approach ensures full compatibility with existing client code.

The SDK handles JSON serialization and HTTP requests automatically. You can pass parameters like temperature or top_p directly in the completion call.

from openai import OpenAI

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

This method is ideal for backend services or scripts where you need reliable, synchronous text generation without managing HTTP streams manually.

Node.js SDK Integration

For JavaScript environments, the Node.js SDK works identically to the Python version. Set the baseURL to our endpoint and provide your API key.

This allows you to integrate uncensored responses directly into web servers or Node-based applications. You can control output constraints using standard parameters like max_tokens or response_format for JSON mode.

import OpenAI from "openai";

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

Remember that the model ID must be set to uncensored. The context window supports up to 100,000 tokens combined for prompt and completion.

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns data via Server-Sent Events (SSE). Token usage statistics are included in the final chunk of the stream.

Streaming reduces perceived latency for end-users. It is the recommended approach for chat interfaces where real-time text display is required.

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)

Handle partial responses carefully to ensure smooth user experiences. The stream ends cleanly with a final usage object.

Limits & Errors

Monitor your usage to avoid service interruptions. The API enforces a limit of 300 requests per minute and 8 concurrent requests per key. Request bodies must not exceed 8 MB.

If you exceed the rate limit, you will receive a 429 Too Many Requests error. Wait briefly before retrying. For context, the model supports a 100,000-token context window, with no separate output cap.

If max_tokens is not set, the response can run to the end of the window. Errors and refusals are free, so you are only charged for successful token generation.

Under the hood: specs

Before you integrate, here is exactly what you get with a key.

SpecValue
CompatibilityOpenAI Chat Completions schema; official openai SDKs work unchanged
Base URLhttps://api.claudeuncensored.cc/v1
API keyBearer token in the Authorization header
Modeluncensored
MethodsPOST /v1/chat/completions · GET /v1/models
StreamingYes — server-sent events; the last chunk carries token usage
Max context100,000 tokens (prompt + completion together)
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
JSON modeJSON object mode via response_format json_object
Completion lengthup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Requests per minute300/min per key
Concurrency8 requests at the same time per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Request size8 MB request body
Paymentcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Volume bonus+5% on $50+, +10% on $100+, +15% on $200+
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Free trial$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
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
Credit expiryno monthly fee; paid credit does not expire
Keysone active key per account; a new key replaces the old one
Content policyadult content allowed; sexual content involving minors is refused
Sign-insign in with Google or with e-mail + password

Error codes

Every error is JSON with a type you can switch on. You are never charged for an error.

HTTPTypeWhat to do
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditout of credit; add credit and retry
403content_blockedrefused by the content policy
404not_foundunknown endpoint
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busymodel busy — retry in a few seconds

Questions and answers

Does this API support image or audio generation?

No. This API serves only text input and text output via the chat-completions endpoint. It does not support embeddings, image generation, audio, or video.

How do I top up my credit?

Top-ups are by crypto (USDT on TRC20, USDC on Base). You can top up in whole amounts from $20 to $500. Credit never expires.

What happens if I exceed the rate limit?

You will receive a 429 status code. The limit is 300 requests per minute and 8 concurrent requests per key. Reduce your request frequency or wait for the window to reset.

Your key is one form away

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

Get API key