vi ▾

Claude api pricing: openai compatible integration

Integrate an uncensored LLM into your existing stack with a standard OpenAI-compatible API. This guide covers the base URL, authentication, and streaming for the /v1/chat/completions endpoint.

Model
uncensored
Base URL
https://api.pricingapiclaude.com/v1

Base URL and authentication setup

The base URL is https://api.pricingapiclaude.com/v1. You must include your API key in the Authorization header for every request. Authentication is straightforward: pass the key as a Bearer token without any additional prefixes or complex signing mechanisms. This setup ensures compatibility with any OpenAI SDK or HTTP client you already use for routing requests.

curl https://api.pricingapiclaude.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "calculate the monthly cost for ten million input tokens"}]
  }'

POST /v1/chat/completions parameters

Send text in and get text out using the standard chat completions endpoint. Specify the model ID as uncensored to access the open-weight model tuned for unrestricted output. You can control the response behavior using parameters like temperature, top_p, stop, and seed. The system supports JSON mode via response_format and tool calling for function execution.

from openai import OpenAI

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

GET /v1/models endpoint

Query available models to verify the endpoint configuration before sending heavy payloads. The GET /v1/models endpoint returns a list of available models, confirming that your API key has the correct permissions. This step helps you debug authentication issues early in the development cycle. It also provides a snapshot of the model IDs supported by the service.

import OpenAI from "openai";

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

Enable streaming by setting stream: true to receive tokens via Server-Sent Events (SSE). The final chunk contains the full token usage statistics, allowing you to track input and output costs accurately. This approach reduces perceived latency for large responses and provides real-time feedback during generation. You can parse these events in any standard HTTP client library.

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 and concurrency rules

Each API key allows 300 requests per minute and supports 8 concurrent requests. The maximum request body size is 8 MB, which fits within the 100,000 token context window. If you exceed these limits, the API returns a 429 Too Many Requests error. Adjust your batching strategy to stay within these boundaries for consistent performance during high-load scenarios.

Errors and context window limits

A 401 error indicates an invalid or missing API key. A 402 error means your prepaid credit is exhausted. The context window allows 100,000 tokens total, including both prompt and completion. If you do not specify max_tokens, the maximum output is 2,048 tokens. Ensure your payloads fit within the 8 MB body limit to avoid truncation or rejection.

Common questions

Is claude API pricing based on subscriptions?

No, there are no monthly subscriptions or usage caps. You pay per token with prepaid credit that never expires. Errors and refusals do not consume your tokens.

Does the uncensored LLM support function calling?

Yes, the API supports function calling via the <code>tools</code> and <code>tool_choice</code> parameters. You can also enforce structured output using JSON mode for reliable integration with your applications.

How does the claude proxy differ from official vendors?

We provide a transparent, prepaid utility API running an open-weight model. Unlike proxy aggregators, we do not mask routing costs. You get direct token arithmetic with no hidden fees or subscription traps.

Unlock your key

Register, copy the token, update the endpoint. Simple.

Try with trial credit