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.
| Parameter | Details |
|---|---|
| Protocol | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Base URL | https://api.uncensoredstory.cc/v1 |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Authentication | Bearer token in the Authorization header |
| Model | uncensored |
| Streaming | Yes — server-sent events; the last chunk carries token usage |
| Function calling | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Other parameters | temperature, top_p, stop, seed and the two penalties are passed through |
| Context window | 100,000 tokens (prompt + completion together) |
| Structured output | JSON object mode via response_format json_object |
| Max output | up to the rest of the 100,000-token window; max_tokens optional (no separate cap) |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Requests per minute | 300 requests per minute per key |
| Max body | up to 8 MB per request |
| Concurrency | up 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 pay | prepaid credit, charged by real token usage; errors and refusals are free |
| Top-up | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Credit expiry | no 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 |
| Content | adult content allowed; sexual content involving minors is refused |
| Sign-in | Google or e-mail and password |
| Key management | one 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.
| Code | Type | Meaning |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | out of credit; add credit and retry |
403 | content_blocked | sexual content involving minors — refused, not billed |
404 | not_found | unknown endpoint |
413 | request_too_large | body over 8 MB |
429 | rate_limited · concurrency | over 300/min or 8 parallel — back off and retry |
503 | upstream_busy | model 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.