API Reference and Quickstart
Start sending requests to our uncensored LLM immediately with this openai compatible API reference. The quickstart below shows how to configure authentication, handle streaming, and manage limits using standard SDKs.
Authentication and Base URL
Generate your credential on the dashboard and point your client at the base URL. The endpoint accepts standard OpenAI headers, so you can swap in your key without changing library code. This cheap LLM API works with any tool that reads the AUTHORIZATION header.
Your key is visible immediately after signup. Keep it secure, as it represents your prepaid balance. Errors and refusals do not consume credit, so you can test safely.
First Request
Send a simple chat completion to verify connectivity and receive an uncensored response. The model id is always uncensored for all requests.
- Base URL:
https://api.keyapicodeclaude.com/v1 - Method:
POST - Model:
uncensoredAdjust the temperature to control creativity or set
max_tokensto cap output length.curl https://api.keyapicodeclaude.com/v1/chat/completions \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "uncensored", "messages": [{"role": "user", "content": "Set the max tokens to five hundred"}] }'Python SDK Integration
Use the official library to interact with the endpoint programmatically. Set the base URL and API key in the client initialization. This approach works for batch processing or complex agent workflows.
The library handles retries and JSON serialization automatically. You can access usage data from the response object for billing transparency.
from openai import OpenAI client = OpenAI(base_url="https://api.keyapicodeclaude.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 Setup
Initialize the client with your credentials and base URL. The Node SDK mirrors the Python behavior, making it easy to switch languages or run in serverless environments.
Pass the message history as an array of objects. The API returns a structured response containing the generated text and token counts. Error handling is standard across all SDKs.
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.keyapicodeclaude.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
Enable streaming by setting
stream: truein your request. The server sends Server-Sent Events (SSE) containing partial tokens. This reduces perceived latency for interactive applications.Parse the chunks to build the full response incrementally. The final chunk includes token usage statistics for billing verification. Streaming is essential for real-time user experiences.
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 and Errors
Monitor your usage to avoid service interruptions. The context window supports 100,000 tokens for prompt and completion combined. Max output is 16,000 tokens per request, or 2,048 if unspecified.
Rate limits enforce 300 requests per minute and 8 concurrent requests per key. Common errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Request bodies must stay under 8 MB.
Common questions
Does the uncensored API key work with Claude Code?
Yes, the endpoint is fully OpenAI-compatible, so you can use it with Claude Code by configuring the base URL and API key. This allows you to use your prepaid credit instead of a subscription. The model handles tool use and function calling just like standard providers.
How do I top up my prepaid credit?
Top up using USDT (TRC20) or USDC (Base) via the dashboard. Minimum top-up is $20, and bonuses apply for larger amounts. Credit never expires, so you can add funds whenever you need them without monthly fees.
Is the model the same as Claude?
No, the model is an independent open-weight uncensored LLM running on our servers. It is not GPT, Claude, Gemini, or any other vendor's model. It provides similar functionality but with different tuning and content policies.
Get your key now
Register, retrieve your key, update the base URL. That is all.