fr ▾
Start now

Claude code key: quickstart integration

Connect your code to an uncensored LLM using a simple prepaid API key. This guide covers the base URL, authentication, and SDK integration for the 'uncensored' model.

Base URL and endpoint structure

Start every request to the base URL https://api.claudecodekey.com/v1 using the POST /v1/chat/completions endpoint. You only need this single path for text generation, with no extra routes for embeddings or images. We do not offer model routing or fine-tuning endpoints, so your client code targets exactly one backend. The GET /v1/models endpoint lets you verify availability without sending a payload. This structure keeps your integration lightweight and predictable for any OpenAI-compatible SDK.

Authentication: setting your API key

Pass your unique key in the Authorization header as a Bearer token for every request. You receive the key immediately after signing up with Google or an email address, with no phone number required. If you omit the header, you will receive a 401 error indicating an invalid or missing key. The system charges prepaid credit based on actual token usage, so errors do not cost you anything. Keep your key secure since it is the only active credential for your account.

Model ID: sending 'uncensored'

Set the model field to "uncensored" in your JSON payload to route requests to our specific open-weight model. This model runs on our own servers and does not refuse lawful adult content, fiction, or controversial topics. It is not a proxy for GPT, Claude, or any other vendor, ensuring consistent behavior. You cannot switch models mid-request since we only serve this single uncensored LLM. This approach eliminates the guesswork of tiered subscriptions and complex routing logic.

Example: Python SDK integration

Install the standard OpenAI library and point it directly at our base URL for immediate use. The following snippet demonstrates how to initialize the client and send a simple prompt for code generation.

from openai import OpenAI

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

Example: cURL request with streaming

Use cURL to stream responses via Server-Sent Events (SSE) for real-time token display. The stream flag returns chunks until the final delta, which contains the total token usage. This method works well for terminal applications or mobile clients where latency matters. You can bind this to a keybinding like C-c c for quick transient calls.

curl https://api.claudecodekey.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "what is the output of echo hello"}]
  }'

Parameters: temperature, top_p, and tools

Control creativity with temperature and top_p while defining functions using the tools array for structured outputs. You can enforce strict JSON schemas using response_format for reliable parsing in automated pipelines. The model supports seed for reproducibility and penalty parameters to reduce repetition. Function calling works exactly like the standard OpenAI format, so your existing tools require no changes. These parameters give you full control over the model's output style and structure.

Node.js

import OpenAI from "openai";

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

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)

Common questions

What is the context window for the uncensored model?

The model supports a 100,000 token context window for both prompt and completion combined. You can generate up to 16,000 tokens per request, or 2,048 tokens if you do not specify a limit. This allows for extensive codebases or long documents without hitting hard caps.

How do I handle rate limits and errors?

You are limited to 300 requests per minute and 8 concurrent requests per key. A 401 error means your key is invalid, while a 402 error indicates insufficient prepaid credit. If you hit the 429 rate limit, wait a moment before retrying; errors do not consume your token balance.

Does this API support streaming responses?

Yes, setting <code>"stream": true</code> returns Server-Sent Events (SSE) for real-time token display. The final chunk includes the total token usage statistics for billing transparency. This feature works with any standard OpenAI-compatible streaming client or SDK.

Generate your key

Sign up, copy the key, update your base URL. That is the entire process.

Start nowView documentation