it ▾

Your code, your rules, no refusals.

Start with free credits

Simple sign-up. Key displayed instantly.

UncensoredCodeUncensored Code AI: Quickstart
https://api.uncensoredcodeai.com/v1

Uncensored Code AI: Quickstart

Connect your existing tools to our uncensored API in minutes. You get an OpenAI-compatible endpoint with zero vendor lock-in and transparent token pricing.

Prerequisites: SDK and API key

Start by generating your key on the dashboard. We require nothing but an email for signup, and the credential appears immediately. You can authenticate via Google or a standard password entry. This single key controls all access to your prepaid balance. No phone number verification blocks your workflow.

  • Visit the Get API key page.
  • Sign in with Google or email.
  • Copy the generated key string.

You only need one active key per account. Generating a new one instantly revokes the previous token. Keep this string secure because it grants direct access to your credits.

Configure your base URL

Point your SDK client to our specific endpoint to ensure compatibility. We use the standard /v1 path structure for maximum interoperability. You must update the base_url configuration in your client library.

The base URL is https://api.uncensoredcodeai.com/v1. Use the model ID uncensored for all completions. This setup works with any library that supports the OpenAI chat-completions format. You do not need to install custom drivers for basic text generation.

Send your first request

Execute a standard chat completion call to verify connectivity. This request demonstrates how the model responds to a simple prompt. You should receive a text response reflecting the uncensored nature of the model. The response includes token usage details for billing transparency.

curl https://api.uncensoredcodeai.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "What is the status of my API key?"}]
  }'

Check the usage object in the response. This confirms that your prepaid credits were deducted correctly. Errors or refusals do not consume tokens, so you can test freely.

Handle streaming responses

Enable streaming to receive tokens as they are generated. This reduces perceived latency for long outputs. The API uses Server-Sent Events (SSE) to push data incrementally. You must parse the final chunk to get the total token usage.

from openai import OpenAI

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

Stream mode is ideal for real-time displays or interactive chat interfaces. It allows users to see progress while the model constructs complex answers. Ensure your client handles partial text updates gracefully.

Use function calling and JSON mode

Integrate structured data extraction directly into your workflow. The model supports tool definitions for function calling. You can also force strict JSON output using the response_format parameter. This ensures predictable parsing for downstream applications.

import OpenAI from "openai";

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

Define your tools in the request payload. The model will attempt to match arguments to your schema. JSON mode bypasses tool definitions and forces valid JSON syntax. Use these features for reliable data extraction in uncensored contexts.

Monitor token usage and limits

Track your consumption to avoid unexpected service interruptions. The context window supports up to 100,000 tokens combined. Your output is limited to 16,000 tokens per request unless you specify otherwise. Errors and refusals are free, preserving your balance.

  • Rate limit: 300 requests per minute.
  • Concurrency: 8 simultaneous requests per key.
  • Body size: 8 MB maximum.

Watch for HTTP 429 errors when you exceed the rate limit. A 401 error means your key is invalid. A 402 error indicates insufficient credit. Top up via crypto to resume service immediately.

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

How do I top up my uncensored AI API credits?

You can only top up using cryptocurrency. We accept USDT on the TRC20 network or USDC on the Base network. Minimum deposits start at $20, and larger amounts earn bonus credit.

What is the context window for the uncensored LLM?

The model supports a 100,000 token context window for both prompt and completion combined. You can generate up to 16,000 tokens in a single response. Setting the <code>max_tokens</code> parameter allows you to control output length.

Is this an official OpenAI compatible API?

Yes, our endpoint follows the standard OpenAI chat-completions format. You can use the official OpenAI SDKs by simply changing the base URL. However, we serve our own uncensored model, not GPT-4 or GPT-3.5.

Get your API key now

Sign up, grab the key, update the endpoint. That’s it.

Claim trial key