Base URL & Authentication
Connect to the unfiltered story API using the standard OpenAI-compatible base URL. Every request requires an API key passed in the Authorization header. Ensure your key is valid; invalid keys return a 401 error.
Base URL: https://api.unfilteredstory.cc/v1
Header: Authorization: Bearer YOUR_API_KEY
The API supports a single model ID: uncensored. This is an open-weight model tuned for raw output, distinct from GPT, Claude, or Gemini. It does not route between vendors.
First Request
Send a standard chat completion request to generate text. The endpoint accepts JSON payloads with model, messages, and optional parameters.
Below is a basic cURL example to test connectivity.
curl https://api.unfilteredstory.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 returns a text response. No embeddings or image generation are available on this endpoint. Keep payloads under 8 MB.
Python SDK Integration
Use the official OpenAI Python library to interact with the API. Point the client to our base URL and provide your key. This ensures compatibility with standard OpenAI-style codebases.
Example snippet:
from openai import OpenAI
client = OpenAI(base_url="https://api.unfilteredstory.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)Set max_tokens explicitly to control output length. Without it, the response can run to the end of the window. The uncensored AI API handles context window limits automatically within the 100k total.
Node.js SDK Setup
For JavaScript environments, use the openai npm package. Configure the base URL to direct requests to our servers.
Code example:
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.unfilteredstory.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);Handle errors appropriately. A 402 status indicates insufficient prepaid credit. Top up by crypto (USDT on TRC20, USDC on Base) to continue.
Streaming Responses
Enable streaming by setting stream: true. The API returns Server-Sent Events (SSE). Token usage statistics appear only in the final chunk.
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)Parse the delta.content field to display text in real-time. This is ideal for chat interfaces requiring low latency.
Rate Limits & Context
Respect the hard limits to avoid 429 errors. Each key allows 300 requests per minute and 8 concurrent requests. The context window is 100,000 tokens total (prompt + completion). There is no separate output cap.
Errors like 401 (bad key) or 402 (no credit) are free. Credit never expires. No subscription fees apply.