Developer Quickstart Guide
Connect your existing OpenAI-compatible client to our uncensored LLM API in seconds. This guide covers authentication, request formats, streaming, and tool use for rapid integration.
Authentication & Base URL
Use your API key with the Authorization: Bearer header. Our base URL is https://api.apiclaudecheap.com/v1uncensored. You get one key per account, issued instantly after Google or email signup. No phone number required.
Chat Completions Endpoint
Send text to POST /v1/chat/completions. The model generates text responses without content refusals for lawful adult topics. Requests follow standard JSON structures. Input tokens cost $0.15 per million, output tokens $0.50 per million. Errors and refusals do not consume credit. Start with a simple message to verify connectivity.
curl https://api.apiclaudecheap.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Return only the current UTC timestamp"}]
}'
Python SDK Integration
Override base_url in the OpenAI client. Pass the API key and model name. The client handles serialization automatically. You can stream or parse full responses. This approach lets you reuse existing codebases. Adjust the base URL to point to our endpoint. Keep the model name as uncensored. Test with a short prompt first.
from openai import OpenAI
client = OpenAI(base_url="https://api.apiclaudecheap.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 Integration
Configure the baseUrl option in your Node client. Set the API key in the headers. Use uncensored as the model. This allows you to switch providers without changing your application logic. The SDK manages the HTTP connection. Handle errors gracefully. Check the response status code. Parse the JSON body. This method works for both synchronous and asynchronous requests.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.apiclaudecheap.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 with SSE
Enable streaming by setting stream: true. The server sends Server-Sent Events (SSE). Each chunk contains partial text. The final chunk includes token usage statistics. This reduces perceived latency for long responses. Buffer the chunks in your application. Combine them to form the complete message. Handle connection errors during the stream. Monitor token usage to stay within budget.
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)
Function Calling & JSON Mode
Define tools in the tools array. The model returns structured data when needed. Use response_format: {type: "json_object"} for strict JSON. This ensures predictable outputs for automation. Temperature and top_p control randomness. Lower values make responses more deterministic. Set a seed for reproducibility. Stop sequences halt generation early. Presence and frequency penalties adjust token repetition.
Frequently asked questions
Why is the 429 rate limit triggered?
You have exceeded 300 requests per minute or 8 concurrent requests per key. Each key has a strict limit. Wait a few seconds before retrying. Upgrade your key or distribute load across multiple keys if needed.
What happens on a 402 error?
Your prepaid credit is exhausted. Errors and refusals do not consume credit. Top up with USDT or USDC to continue. Credit never expires, so you can add funds later.
How large is the context window?
The context window is 100,000 tokens for prompt and completion combined. Max output is 16,000 tokens per request. Requests over 8 MB are rejected. Keep payloads concise to avoid errors.
Get your key in seconds
Sign up, retrieve your key, update your base URL. That’s it.