EN ▾
Uncensored Story

Uncensored API. Pay per token.

Uncensored Story API Quickstart

Start generating unrestricted narratives immediately with our token-based uncensored llm api. This guide covers the essential endpoints, authentication, and streaming configuration for high-volume story generation.

Authentication and Base URL

Our uncensored ai api uses standard OpenAI-compatible headers. You receive one active API key per account upon signup, which replaces any previous key. Send this key in the Authorization header as a Bearer token. The base URL for all requests is https://api.uncensoredstory.top/v1. We do not offer subscriptions or monthly fees; you simply pay for the tokens you consume. Ensure your client library points to this base URL to avoid routing errors. Authentication is strict: an invalid or expired key will return a 401 error immediately.

First Request

Send a POST request to /v1/chat/completions with the model ID uncensored. This model is tuned specifically for uncensored story generation, meaning it rarely refuses lawful adult or controversial topics. The API accepts standard parameters like messages, temperature, and max_tokens. Keep in mind that the context window is 100,000 tokens total, with no separate output cap. If you do not specify max_tokens, the response can run to the end of the 100,000-token window. This simplicity ensures predictable billing for your narrative projects.
curl https://api.uncensoredstory.top/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."}]
  }'

Python SDK Integration

Using the official openai Python library makes integration straightforward. Initialize the client with your API key and the specific base URL provided by our service. The Python SDK handles JSON serialization automatically, allowing you to pass message arrays directly. This approach is ideal for backend services generating long-form content. Remember that we do not support embeddings or image generation, so stick to text-only inputs and outputs. The SDK will handle retries and error parsing, but you remain responsible for managing your prepaid credit balance.
from openai import OpenAI

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

Node.js SDK Usage

For JavaScript environments, use the openai Node.js package. Configure the basePath to point to our uncensored api endpoint. This ensures that all completions requests are routed correctly to our tuned model. Node developers benefit from async/await patterns for clean code structure. Since we charge per token, efficient handling of response chunks can help you monitor usage in real-time. The SDK supports both synchronous and asynchronous operations, giving you flexibility in how you integrate the uncensored llm api into your application logic.
import OpenAI from "openai";

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

Enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream, delivering tokens as they are generated. This reduces perceived latency for end-users reading generated stories. The final chunk in the stream contains the total token usage statistics, allowing you to update your local balance accurately. Streaming is particularly useful for interactive uncensored chatbot api applications where immediate feedback is preferred. Ensure your client properly handles the stream termination to avoid hanging connections.
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 Error Handling

Our infrastructure enforces strict limits to ensure stability: 300 requests per minute per key and 8 concurrent requests. If you exceed these, you will receive a 429 error. A 401 error indicates an invalid API key, while a 402 error means your prepaid credit is exhausted. Errors and refusals do not consume tokens, so you are not charged for failed requests. The only hard content limit is sexual content involving minors, which is always refused. Keep your request bodies under 8 MB to avoid payload errors. Monitor your usage through the dashboard to maintain consistent delivery of your uncensored story content.

What the API supports

Everything the endpoint can and cannot do, in one place — check it before you top up.

ParameterDetails
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
MethodsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.uncensoredstory.top/v1
Modeluncensored
API keyBearer token in the Authorization header
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Structured outputJSON object mode via response_format json_object
Max context100,000 tokens (prompt + completion together)
StreamingSupported (stream: true), usage included at the end
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Other parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Parallel requestsup to 8 in parallel per key
Request sizeup to 8 MB per request
Requests per minute300 requests per minute per key
Credit expiryno monthly fee; paid credit does not expire
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
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
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
How you payprepaid credit, charged by real token usage; errors and refusals are free
Bonus credit+5% on $50+, +10% on $100+, +15% on $200+
Key managementone active key per account; a new key replaces the old one
Sign-inGoogle or e-mail and password
Contentuncensored for adults; the only hard rule: no sexual content involving minors

Errors and what to do

The type field is stable, the message is for humans. Errors cost nothing.

CodeTypeMeaning
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_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

Does the API support image or audio generation?

No, this is a text-only API. We serve a single large language model optimized for text output. There are no embeddings, image, audio, or video generation endpoints available.

How is billing calculated and when is charge?

We charge $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is deducted in real-time based on actual token usage. Errors and refusals are free, and prepaid credit never expires.

What happens if I exceed the rate limit?

If you exceed 300 requests per minute or 8 concurrent requests, you will receive a 429 Too Many Requests error. You should implement exponential backoff in your client to handle these retries gracefully.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key