EN ▾
Get API key

Quickstart: Integrate the Uncensored AI Model

Integrate the uncensored ai model into your existing pipelines by swapping the base URL and API key. This guide covers authentication, streaming, and structured output for production use.

Base URL and Authentication

Start by configuring your client to point at the hosted endpoint. The base URL is https://api.uncensoredaimodel.com/v1. You must include your API key in the Authorization header as a bearer token. This key is generated when you sign up via Google or email. Keep it secure, as it grants access to your prepaid credit.

curl https://api.uncensoredaimodel.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
  }'

The service accepts standard OpenAI-compatible requests. If you are migrating from another provider, update the base_url and replace the key. The model identifier is uncensored. No other model IDs are available on this instance.

Chat Completions Endpoint

Send messages to POST /v1/chat/completions. The endpoint accepts a standard chat format with system, user, and assistant roles. It returns text completions. There are no embeddings, image generation, or fine-tuning endpoints. The model is an open-weight large language model tuned to answer without refusals for lawful adult content.

from openai import OpenAI

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

Each request consumes input and output tokens. You are charged only for tokens actually used in the response. Errors and refusals do not consume credit, provided they are not due to insufficient funds.

Streaming Responses (SSE)

Enable streaming by setting stream: true. The API returns Server-Sent Events (SSE). Each chunk contains partial text. The final chunk includes the token usage statistics for the entire request. This is useful for real-time UI updates.

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)

Handle the stream until it closes. Do not assume a specific number of chunks. The context window supports up to 100,000 tokens total. Streaming works within this limit.

Function Calling & Tools

Define tools in your request body. The model supports function calling with tools and tool_choice parameters. It returns structured tool calls when appropriate. You can enforce specific tool usage.

Use this for building agents or automating workflows. The model is designed to follow instructions accurately. It does not hallucinate tool schemas. Define your tools clearly in the request.

import OpenAI from "openai";

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

Parse the tool calls from the response. Execute them locally or in your backend. Then feed the results back into the conversation if needed.

JSON Mode Configuration

Force structured output by setting response_format to {"type": "json_object"}. The model will return valid JSON. This is critical for parsing data in automated pipelines.

Combine JSON mode with function calling for robust tool use. Ensure your schema is strict. The model adheres to the format when requested. Use this for extracting entities or generating configuration files.

Parameters and Limits

Adjust temperature and top_p to control randomness. Higher values increase creativity. Lower values make outputs more deterministic. Use max_tokens to limit output length. If it is not set, the response can run to the end of the window.

The rate limit is 300 requests per minute per key. Concurrent requests are capped at 8. If you exceed these, you receive a 429 error. A 401 error means the key is invalid. A 402 error occurs if your prepaid credit is exhausted. Errors like model refusals are free. Credit does not expire.

Technical specifications

The numbers below are the real limits of this API, not marketing. Compare them with what your app needs.

ParameterDetails
ProtocolOpenAI Chat Completions schema; official openai SDKs work unchanged
EndpointsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.uncensoredaimodel.com/v1
API keyAuthorization: Bearer YOUR_KEY
Modeluncensored
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Structured outputJSON object mode via response_format json_object
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Max context100,000 tokens (prompt + completion together)
StreamingSupported (stream: true), usage included at the end
Max bodyup to 8 MB per request
Rate limit300/min per key
Concurrencyup to 8 in parallel per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Bonus credit+5% on $50+, +10% on $100+, +15% on $200+
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Subscriptionno monthly fee; paid credit does not expire
Price$0.15 per 1M input tokens · $0.50 per 1M output tokens
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
Trial credit$0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Sign-insign in with Google or with e-mail + password
Key managementone key per account, regenerate any time (the old one stops working)
Contentadult content allowed; sexual content involving minors is refused

HTTP errors

Errors come back as JSON with a stable type; failed and refused requests are not billed.

StatusTypeReason
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditout of credit; add credit and retry
403content_blockedrefused by the content policy
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary overload, retry shortly

Questions and answers

What causes a 402 error?

A 402 error indicates that your prepaid credit balance is insufficient to cover the token usage of the request. Errors and refusals do not consume credit, so this error only occurs when the account balance is too low for the requested generation.

Is this an uncensored coding llm?

The model is an uncensored large language model tuned for lawful adult use. It does not refuse controversial or adult topics. It is not specifically branded as a coding llm, though it can generate code like any other LLM.

Does the SDK manage connection pooling?

The API works with official OpenAI SDKs. The SDK behavior for connection pooling and retry logic depends on the specific SDK implementation you choose. The API itself handles the requests and returns standard HTTP responses.