Updated
How to Use Claude API, or an Uncensored Alternative
The official Claude API is Anthropic's service. If you want an OpenAI-compatible alternative without content refusals for lawful adult use, this guide shows both routes with working code.

No card needed. After sign-up, claim $0.50 of free test credit with one click (once per person).
Get API keyKey points
- The official API uses the Messages endpoint with an x-api-key header and a required max_tokens.
- This API uses the OpenAI Chat Completions format: change the base URL and key, set the model to uncensored.
- Streaming, JSON mode and tool calling all work through the standard OpenAI SDKs.
- It is not Anthropic's API and not a router to Claude.
Short answer: two paths, pick by what you need
If you searched for how to use claude api, the direct route is Anthropic's own service: you create an account in their developer console, generate a key, and call their Messages API with an official SDK. That is the right path when you specifically need Anthropic's models and their terms of use suit your project.
This site is a different product. It is a hosted, OpenAI-compatible text API running one open-weight model that answers without content refusals for lawful adult use. It is not Anthropic's API and it is not a router to Claude. The rest of this article explains how the official flow works, then gives you working code for the alternative so you can judge which one fits.
How the official Claude API works
The facts below are public and stable enough to rely on, but check Anthropic's documentation for the current details before you build anything.
- You sign up for a developer account and create an API key. Billing is separate from any consumer chat subscription.
- Requests go to a Messages endpoint (
POST /v1/messages) with anx-api-keyheader and ananthropic-versionheader. - The system prompt is a top-level field, not a message, and
max_tokensis a required parameter. - You pay per token, with separate rates for input and output. Rates differ by model, so check their current pricing page.
Official SDKs exist for Python and TypeScript, and the same models are also sold through some cloud providers. Anthropic also applies a usage policy to what the models will produce. If your project is fiction with dark themes, adult roleplay, or red-team style text that the policy treats as out of bounds, you will see refusals regardless of how well you write the prompt.
What this API gives you instead
The service speaks the OpenAI Chat Completions protocol. Any OpenAI SDK or client works once you change two settings: the base URL and the key. The model ID is uncensored, and there are two methods: POST /v1/chat/completions and GET /v1/models.
What you should know before you try it:
- One open-weight model, run by an independent provider. No vendor logos behind it and no model picker.
- Text only. No images, audio, video, embeddings or fine-tuning.
- A 100,000-token context window, shared between prompt and completion.
- A hard limit: no sexual content involving minors, ever.
- Prompts are not used for training.
Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens, from prepaid credit with no subscription. Details are on the pricing page.
Get a key and make your first request
Sign up with Google or with an email and password, open the API key page, and create a key. New users can claim $0.50 of trial credit with one click there. It needs no card, lasts 7 days and is limited to one per person. The key page walkthrough shows the exact screen.
Then install the SDK with pip install openai and run this:
from openai import OpenAI
client = OpenAI(
base_url="https://api.claudeuncensored.top/v1",
api_key="YOUR_API_KEY",
)
resp = client.chat.completions.create(
model="uncensored",
messages=[
{"role": "system", "content": "You are a concise technical assistant."},
{"role": "user", "content": "Explain idempotency keys in two sentences."},
],
)
print(resp.choices[0].message.content)That is the whole integration. If you already have code written against the OpenAI SDK, you change base_url, api_key and the model string, and nothing else.
Node.js and curl
The same call in Node, this time streaming tokens as they arrive. Streaming uses server-sent events and returns usage at the end of the stream.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.claudeuncensored.top/v1",
apiKey: process.env.API_KEY,
});
const stream = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Write a haiku about rate limits." }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}For a quick test from a terminal, curl is enough. This one also turns on JSON mode, which constrains the reply to a valid JSON object:
curl https://api.claudeuncensored.top/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [
{"role": "system", "content": "Reply with a JSON object only."},
{"role": "user", "content": "List three HTTP status codes with meanings."}
],
"response_format": {"type": "json_object"}
}'JSON mode works best when your prompt also says you want JSON, as the system message does above.
Tool calling
Function calling follows the OpenAI format: pass tools and optionally tool_choice, read tool_calls from the reply, run your function, and send the result back as a message with role: "tool". Streamed responses also carry tool_calls.
import json
from openai import OpenAI
client = OpenAI(base_url="https://api.claudeuncensored.top/v1", api_key="YOUR_API_KEY")
tools = [{
"type": "function",
"function": {
"name": "get_order_status",
"description": "Look up an order by id",
"parameters": {
"type": "object",
"properties": {"order_id": {"type": "string"}},
"required": ["order_id"],
},
},
}]
messages = [{"role": "user", "content": "Where is order A-1042?"}]
first = client.chat.completions.create(
model="uncensored", messages=messages, tools=tools, tool_choice="auto"
)
call = first.choices[0].message.tool_calls[0]
messages.append(first.choices[0].message)
messages.append({
"role": "tool",
"tool_call_id": call.id,
"content": json.dumps({"status": "shipped"}),
})
final = client.chat.completions.create(
model="uncensored", messages=messages, tools=tools
)
print(final.choices[0].message.content)Validate the arguments before you run anything. Open-weight models occasionally produce arguments that do not match your schema, so treat the output as untrusted input the same way you would treat a form submission.
Moving code written for the Anthropic SDK
If you have existing code that calls the Messages API, the protocol is different, so a base URL swap alone will not work. These are the parts to change:
| Item | Anthropic Messages API | This API |
|---|---|---|
| Endpoint | /v1/messages | /v1/chat/completions |
| Auth header | x-api-key | Authorization: Bearer |
| System prompt | Top-level system field | Message with role: "system" |
| max_tokens | Required | Optional |
| Reply text | Content blocks | choices[0].message.content |
The easiest migration is to put your model calls behind one small function, then rewrite only that function. Prompts tuned for one model rarely transfer perfectly to another, so plan an evaluation pass on a handful of your real inputs.
Limits and error handling
A full key allows 8 concurrent requests and 300 requests per minute. A trial key allows 2 concurrent and 60 per minute. The maximum body is 8 MB. Every response carries X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency.
Over a limit you get HTTP 429. The error code rate_limited means too many requests per minute, and concurrency means too many at once. On temporary overload you also get 429 with a Retry-After: 5 header. A streamed request holds its concurrency slot until the stream ends, so a slow consumer can exhaust your 8 slots faster than you expect. Retry with a short backoff, and respect Retry-After.
Failed or refused requests are not charged. The docs page has the full parameter list, and the uncensored model comparison explains how this model sits among other open-weight options.
Settings that matter in practice
The sampling parameters are passed through, so you can tune temperature, top_p, stop, seed and the penalties the way you would with any OpenAI-style model. A few habits save time.
- Use a low temperature (0.2 to 0.4) for extraction, classification and JSON output, and a higher one for fiction and dialogue.
- Set
seedwhile you debug a prompt so you can compare two versions on the same sampling path. - Use
stopsequences to cut off a reply at a delimiter instead of paying for text you will discard. - Leave
max_tokensunset unless you need a hard cap. The completion can use whatever remains of the 100,000-token window.
You send the full conversation on every request, so history grows with each turn. Trim old turns or summarize them once a chat gets long, which keeps both cost and latency down.
Common mistakes and how to fix them
Most first-run failures come from a short list of causes.
- 404 or connection errors: the base URL is missing
/v1, or has an extra slash. Use it exactly as shown above. - 401: the key is not sent as a bearer token, or an old key from another provider is still in your environment variables.
- Model not found: the model string must be
uncensored. CallGET /v1/modelsto confirm what the endpoint lists. - 429 under load: you exceeded 8 concurrent requests or 300 per minute on a full key. Add a retry with backoff, as below.
import time
from openai import OpenAI, RateLimitError
client = OpenAI(base_url="https://api.claudeuncensored.top/v1", api_key="YOUR_API_KEY")
def ask(messages, tries=4):
for i in range(tries):
try:
r = client.chat.completions.create(model="uncensored", messages=messages)
return r.choices[0].message.content
except RateLimitError:
time.sleep(5 * (i + 1))
raise RuntimeError("still rate limited")Cap your own worker pool at the concurrency limit instead of relying on retries alone. That keeps latency predictable.
More guides
Questions and answers
Is this the official Claude API?
No. It is a hosted API for an open-weight model run by an independent provider, not Anthropic's service and not a router to Claude. If you need Anthropic's models, use Anthropic's own console and documentation.
Can I use the OpenAI SDK with it?
Yes. Set the base URL to https://api.claudeuncensored.top/v1, use your key as the bearer token, and set the model to uncensored. The same applies to any client that lets you add an OpenAI-compatible endpoint.
Do I need a card to try it?
No. New users can claim $0.50 of trial credit with one click on the API key page, valid for 7 days and needing no card. After that you top up prepaid credit from $20, by crypto.
Does it support streaming and tool calling?
Yes to both. Streaming uses SSE with usage at the end, and tool calling follows the OpenAI format with results returned as role tool messages.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.