EN ▾

API Reference & Quickstart

Get your uncensored LLM API key in seconds and start sending requests immediately. This quickstart guide covers authentication, code examples, and rate limits for the uncensored AI API.

https://api.uncensoredaipricing.com/v1uncensored

Authentication & Rate Limits

Start by generating your key on the dashboard. The uncensored AI API uses standard bearer tokens for authentication. You get 300 requests per minute and 8 concurrent connections. Errors and refusals consume no credits.

Include your key in the header. The base URL is HTTPS://api.uncensoredaipricing.com/v1. Sign up with Google or email. No phone number required.

Chat Completions Endpoint

Send text to the uncensored LLM API via POST /v1/chat/completions. The model id is "uncensored". It handles prompt + completion together within a 100,000 token context window. Max output is 16,000 tokens.

Set the API key. Here is a curl example:

curl https://api.uncensoredaipricing.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 50 million tokens."}]
  }'

Streaming Responses (SSE)

Receive real-time tokens via Server-Sent Events. Streaming reduces perceived latency for long responses. Use the stream parameter in your request. The last chunk includes final token usage.

Here is a Python example:

from openai import OpenAI

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

JSON Mode & Function Calling

Enforce structured output with response_format json_object. Enable function calling with tools and tool_choice. Parameters like temperature and top_p control randomness. Use stop sequences for clean cuts.

Here is a Node example:

import OpenAI from "openai";

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

Token Limits & Context Window

The context window holds 100,000 tokens total. Requests over 8MB or 300 RPM get rejected. Set max_tokens to 16,000. Default is 2,048. Prepaid credit never expires. Errors are free.

Here is a streaming example:

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)

Error Codes & Refusals

401 means an invalid key. 402 indicates no credit. 429 signals rate limits. Minors in sexual content trigger a hard refusal. Other adult content passes. Check the status code. Fix your key or top up.

Common questions

What is uncensored AI pricing?

It costs $0.15 per 1M input tokens and $0.50 per 1M output tokens. Prepaid credit is charged by real usage. Errors and refusals are free. No monthly fees apply.

How do I get an uncensored AI API key?

Sign up with Google or email on the key page. The key appears immediately. No phone number is needed. You get $0.50 trial credit valid for 7 days.

What is the context window size?

The total context window is 100,000 tokens. This includes both the prompt and the completion. Max output per request is 16,000 tokens. Default output is 2,048 tokens.

Get your API key

Sign up, copy the key, update the endpoint. That is all.

Try with trial credit