Open account

Quickstart: Uncensored API Integration

Connect your existing OpenAI-compatible client to our uncensored model by updating the base URL and API key. This quickstart covers authentication, request structures, streaming, and tool usage for immediate integration.

Open account

Uncensored, OpenAI-compatible API alternative

Authentication and Base URL

Your API key authenticates every request. Replace the standard base URL with our endpoint to route traffic to the uncensored model. This change allows you to use existing SDKs without modifying core logic. Your key is issued immediately after signup via Google or email.

The base URL is HTTPS://api.claudeapikeys.com/v1. Pass your key in the Authorization header as a Bearer token. This setup works with any client that supports OpenAI-compatible endpoints.

Sending Your First Completion Request

Send a standard chat completion POST request to generate text. The model ID is "uncensored" and handles text input and output. This approach eliminates the need for complex proxy configurations. You can start with a simple message to verify connectivity.

  • Use the standard JSON format for messages.
  • Specify the model as "uncensored".
  • Include your API key in the header.
curl https://api.claudeapikeys.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 192.168.1.5"}]
  }'

Configuring Streaming and Tokens

Enable streaming by setting the stream parameter to true. This returns tokens via Server-Sent Events (SSE) as they are generated. You receive token usage details in the final chunk. Adjust temperature and top_p to control creativity. This method reduces perceived latency for long responses.

Set max_tokens to limit output length. The default is 2,048 tokens if not specified. The context window supports up to 100,000 tokens total.

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)

Using Tools and JSON Mode

Integrate function calling by defining tools in your request. The API supports tool_choice and structured outputs. Use response_format set to json_object for strict JSON compliance. This feature ensures reliable parsing for downstream applications. You can define multiple tools in the same request.

Combine tools with streaming for real-time tool execution. The API handles tool invocations and returns results in the expected format. This setup is ideal for automated workflows.

from openai import OpenAI

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

Client Integration Examples

Integrate with Node.js clients using the standard OpenAI package. Update the base URL and API key in your configuration object. This ensures compatibility with existing codebases. The SDK handles request serialization automatically.

Ensure you are using a recent version of the SDK. Older versions may not support all parameters. Test your integration with a simple prompt before scaling.

import OpenAI from "openai";

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

Rate Limits and Error Handling

You are limited to 300 requests per minute per key. Concurrency is capped at 8 simultaneous requests. Request bodies must not exceed 8 MB. Errors like 401 indicate an invalid key, while 402 means insufficient credit. 429 signals rate limit exhaustion.

Context window includes both prompt and completion tokens. Monitor usage to avoid exceeding limits. Credit errors are free, so you only pay for successful tokens.

Common questions

How do I get started with the uncensored API?

Sign up via Google or email to receive your API key instantly. Update your client's base URL to HTTPS://api.claudeapikeys.com/v1. Send a test request with the model ID "uncensored" to verify connectivity.

What are the rate limits for the API?

You can make up to 300 requests per minute per key. Concurrency is limited to 8 simultaneous requests. Request bodies must stay under 8 MB. Exceeding these limits returns a 429 error.

Does the API support streaming?

Yes, set the stream parameter to true for Server-Sent Events. Token usage details are included in the final chunk. This reduces latency for long responses and improves user experience.

Get your key instantly

Register, copy the token, update the endpoint URL. That is all you need.

Open account