EN ▾
Get API key

Uncensored Story API Quickstart Guide

This quickstart guide shows you how to integrate our uncensored story API using standard OpenAI-compatible clients. You can be generating unrestricted text in minutes with simple authentication and straightforward parameters.

Authentication & Base URL

To begin, obtain your API key from the Get API key page. Authentication uses a standard Bearer token. Include the header Authorization: Bearer YOUR_API_KEY in every request.

All requests target the base URL https://api.uncensoredstory.cc/v1. This is compatible with official OpenAI SDKs and any OpenAI-compatible client. Simply update your client configuration to point to this base URL and provide your key.

Each account is limited to one active key. Generating a new key immediately replaces the previous one, so ensure you update your application configuration when rotating keys.

Basic Completion Request

The core functionality is text generation via the chat/completions endpoint. Send a POST request with a model ID of uncensored and your desired prompt.

The model is an open-weight large language model tuned for unrestricted content. It does not use vendor models like GPT or Llama. It returns text responses directly.

Here is a basic cURL example to get started:

curl https://api.uncensoredstory.cc/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."}]
  }'

This request sends a simple prompt and returns a text completion. The response includes token usage statistics, which are reflected in your prepaid credit balance.

Python Integration

Using the official OpenAI Python library is the most straightforward way to integrate. Install the library and configure it to use our base URL.

The code structure is identical to standard OpenAI usage. You just need to ensure the client points to our endpoint.

from openai import OpenAI

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

This script sends a request and prints the assistant's reply. The response object contains the full text content in choice.message.content. You can handle exceptions as you would with any other API client.

Node.js Integration

For JavaScript or TypeScript environments, the openai npm package works directly with our API. Initialize the client with your key and the correct base URL.

The usage pattern mirrors the Python example. Call chat.completions.create with the model uncensored.

import OpenAI from "openai";

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

The response provides the generated text. You can pass additional parameters like temperature or top_p to control creativity and randomness. This approach keeps your code clean and compatible with standard SDK patterns.

Streaming Responses (SSE)

For applications that benefit from real-time token delivery, enable streaming by setting stream: true. The API returns a Server-Sent Events (SSE) stream.

Each chunk contains partial text. The final chunk includes the full token usage details, allowing you to track costs accurately.

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)

Consume the stream in your client code. This is ideal for chat interfaces where users see text appearing character by character. Ensure your client handles the stream termination correctly to avoid hanging connections.

Rate Limits, Errors & Context

Your API key is limited to 300 requests per minute and 8 concurrent requests. The request body must not exceed 8 MB. If you exceed these limits, you will receive a 429 rate limit error. Implement exponential backoff in your client.

Common errors include 401 for an invalid key and 402 if your prepaid credit is exhausted. Errors do not consume credit.

The context window is 100,000 tokens total (prompt plus completion). There is no separate output cap, and if max_tokens is not set, the response can run to the end of the window. Plan your prompt length accordingly to avoid truncation.

API facts in one table

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

ParameterDetails
ProtocolOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
Base URLhttps://api.uncensoredstory.cc/v1
EndpointsPOST /v1/chat/completions · GET /v1/models
AuthenticationBearer token in the Authorization header
Modeluncensored
StreamingYes — server-sent events; the last chunk carries token usage
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
Context window100,000 tokens (prompt + completion together)
Structured outputJSON object mode via response_format json_object
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Requests per minute300 requests per minute per key
Max bodyup to 8 MB per request
Concurrencyup to 8 in parallel per key
Bonus credit+5% on $50+, +10% on $100+, +15% on $200+
Price$0.15 per 1M input tokens · $0.50 per 1M output tokens
How you payprepaid credit, charged by real token usage; errors and refusals are free
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Credit expiryno monthly fee; paid credit does not expire
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
Contentadult content allowed; sexual content involving minors is refused
Sign-inGoogle or e-mail and password
Key managementone key per account, regenerate any time (the old one stops working)

HTTP errors

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

CodeTypeMeaning
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
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_busymodel busy — retry in a few seconds

Questions and answers

What happens if I run out of credit?

Your API will return a 402 error until you top up. Credit is charged by real token usage, so errors are free. You can top up by crypto (USDT on TRC20, USDC on Base).

Is the uncensored model trained on my data?

No. Your prompts are not used for training. The model is an open-weight variant tuned for unrestricted content, but it is not GPT, Claude, or any other vendor model.

How do I get started with trial credit?

Sign up with Google or email to receive $0.50 in trial credit. It is valid for 7 days and requires no credit card. Claim this credit with one click on your API key page. This is enough to test basic integration before purchasing crypto top-ups.

Your key is one form away

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