da ▾

API Documentation

Get your uncensored API key and start sending requests to our OpenAI-compatible endpoint in minutes. This guide covers authentication, streaming, and structure to help you integrate the cheapest claude API alternative into your stack.

Authentication & Base URL Setup

Start by generating your API key on the Get API Key page using Continue with Google or an email address. Our base URL is HTTPS://api.cheapestclaudeapi.com/v1, which works with any standard OpenAI SDK by updating the base_url configuration. You do not need to add a prefix to your key; just pass it directly in the Authorization header as a Bearer token. This setup ensures your client code routes requests to our uncensored model without needing extra middleware or proxy logic.

The model identifier is simply uncensored. This is an open-weight model running on our own servers, tuned to answer without content refusals for lawful adult use. It is not GPT, Claude, or Gemini. We do not route between vendors or offer image generation. Use the key you receive immediately after signup to authenticate all subsequent requests.

The /v1/chat/completions Endpoint

Send text requests to POST /v1/chat/completions with your messages array and the model name. The endpoint accepts standard parameters like temperature, top_p, and stop sequences to control generation behavior. You can set max_tokens to 16,000 for long outputs, or omit it to default to 2,048 tokens. Each request is processed independently, and you are charged only for the actual tokens consumed.

Errors and refusals are free, so you can experiment with prompt structures without worrying about wasted credits. The context window supports 100,000 tokens total, including both prompt and completion. This allows you to pass extensive conversation history or large documents in a single request. Use the following curl example to verify your connection.

curl https://api.cheapestclaudeapi.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Find the average temperature for July 14 in Berlin"}]
  }'

Python SDK Integration

Install the openai package and initialize the client with our base URL and your API key. This approach lets you reuse existing code written for other APIs by simply changing the base_url and model name. The Python SDK handles retries and encoding automatically, reducing boilerplate in your application. You can stream responses or get full text in one go, depending on your use case.

Set response_format to {"type": "json_object"} if you need structured data for downstream processing. The uncensored model supports function calling tools, allowing you to define custom schemas for your application logic. Use the Python snippet below to send a simple message and receive a response.

from openai import OpenAI

client = OpenAI(base_url="https://api.cheapestclaudeapi.com/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 Configuration

Initialize the Node OpenAI client with our base URL and your secret key. This method is ideal for server-side applications or edge functions that need to generate text asynchronously. The Node SDK supports both promise-based and async/await patterns, making it easy to integrate into modern JavaScript or TypeScript projects. You can pass the model name uncensored to ensure requests go to our dedicated server.

Token usage is tracked in the response headers, allowing you to monitor your prepaid credit balance accurately. Since we charge by real token usage, you can optimize your prompt length to reduce costs. Use the Node example below to make a synchronous request and handle the response object.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.cheapestclaudeapi.com/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 Responses with SSE

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) that deliver tokens as they are generated, reducing perceived latency for users. The final chunk includes the full token usage statistics, so you can track costs in real time. This is crucial for applications that need to display text progressively, like chat interfaces or code editors.

Streaming works with both Python and Node SDKs. You can stop the stream early if the user clicks a stop button, saving compute resources. The uncensored model handles long outputs efficiently, maintaining coherence over the 100,000 token context window. Use the streaming example below to implement a real-time text feed.

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)

Rate Limits, Errors & Context Limits

Each API key is limited to 300 requests per minute and 8 concurrent requests. The request body size must not exceed 8 MB. If you exceed these limits, you will receive a 429 error. Use a 401 error to indicate an invalid or missing key, and a 402 error if your prepaid credit is exhausted. Credits never expire, so you can top up whenever convenient.

The context window is 100,000 tokens total. If you send a large prompt, ensure your max_tokens setting leaves enough room for the response. We do not offer SLA guarantees or on-prem deployment. For errors, check the response body for a detailed message. Use the following structure to handle these scenarios in your client code.

Common questions

What is the cheapest claude API alternative for uncensored text?

Our hosted API offers $0.15 per 1M input tokens and $0.50 per 1M output tokens. It is an OpenAI-compatible endpoint that runs our own uncensored model, providing zero subscription fees and prepaid credit that never expires. This pricing is transparent and based on actual usage.

How do I get started with the uncensored model?

Sign up using Continue with Google or an email address to receive an API key immediately. The key is shown on the screen and requires no phone number. You can then use the base URL HTTPS://api.cheapestclaudeapi.com/v1 with any OpenAI-compatible SDK to start sending requests.

Does the model support function calling and JSON mode?

Yes, the model supports function calling with tools and tool_choice parameters. It also supports JSON mode via <code>response_format: {"type": "json_object"}</code>. This allows you to enforce structured outputs for your applications without needing to parse free-form text.

Get your API key

Register, copy your key, update the base URL. Done.

Get your key