hu ▾
Start now

Proxy for claude code API docs

Connect your existing tools to an uncensored LLM by changing one base URL. This proxy for claude code API drops into any OpenAI-compatible SDK with zero code changes.

Quickstart: send your first completion

Send a request to our chat-completions endpoint immediately. Use the base URL https://api.proxyforclaudecode.com/v1 and your API key in the Authorization header. Our uncensored LLM model id is uncensored. Replace the standard endpoint in your client and start generating text.

  • Method: POST
  • Endpoint: /v1/chat/completions
  • Model: uncensored
curl https://api.proxyforclaudecode.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "list all open ports on port 8080"}]
  }'

Streaming responses with token counts

Stream tokens in real-time using Server-Sent Events. The API returns a stream of chunks containing text deltas. The final chunk includes the full token usage statistics for accurate billing. This approach reduces perceived latency for your users significantly.

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 and JSON mode

Integrate tools or enforce strict JSON output structures easily. Set response_format to {"type": "json_object"} for deterministic parsing. You can also define tools for function calling with standard OpenAI schemas. Our uncensored model handles structured data reliably.

from openai import OpenAI

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

Parameters: temperature, top_p, and more

Control generation creativity with standard hyperparameters. Adjust temperature for variance, top_p for nucleus sampling, and seed for reproducibility. You can also set stop sequences or apply presence_penalty and frequency_penalty to reduce repetition. These work exactly like the OpenAI SDK.

import OpenAI from "openai";

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

Limits and rate limits explained

Your proxy for claude code API has clear constraints. You get 300 requests per minute per key. Each key allows 8 concurrent requests. The request body must stay under 8 MB. Errors like 401 (invalid key), 402 (no credit), and 429 (rate limit) return standard JSON errors. Refusals are free.

Context window and model details

The context window supports 100,000 tokens total, including prompt and completion. Maximum output per request is 16,000 tokens. If you omit max_tokens, the default is 2,048. This open-weight model is tuned for uncensored responses without content refusals for lawful adult use. It is not GPT or Claude.

Frequently asked questions

Is this the official proxy for claude code?

No, we are an independent service. We provide an OpenAI-compatible API that runs a different uncensored model. You can use our endpoint with Claude Code or any other OpenAI SDK client by changing the base URL.

How do I handle errors during streaming?

The API returns standard HTTP status codes. A 401 means your API key is invalid. A 402 indicates you need to top up your crypto credit. A 429 means you hit the 300 requests per minute limit. All errors return a JSON object with an error message.

Can I use this with the official OpenAI Python SDK?

Yes. Simply initialize the client with our base URL and your API key. The model id is <code>uncensored</code>. All standard parameters like <code>temperature</code> and <code>tools</code> work exactly as documented for OpenAI.

Get your API key

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

Start now