API Documentation
Integrate our uncensored AI app into your workflow using standard OpenAI-compatible endpoints. This quickstart guides you from authentication to streaming responses with a single, unfiltered model.
Base URL and authentication
Connect your application by pointing to our dedicated endpoint and passing your unique API key. The base URL for all requests is https://api.apertusapp.com/v1. You obtain your key immediately after signing up via Google or email on the Get API key page. Include this key in the Authorization header for every request.
curl https://api.apertusapp.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Run curl test with empty headers"}]
}'Each account generates one active key. If you generate a new key, the previous one becomes invalid instantly. This ensures tight control over your access without subscription tiers or idle fees.
First request
Send your first prompt to the chat completions endpoint to receive raw, unfiltered text. Use the model ID uncensored to access our specific open-weight model tuned for lawful adult and controversial topics.
from openai import OpenAI
client = OpenAI(base_url="https://api.apertusapp.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)The API accepts standard parameters like temperature and top_p. Errors and refusals consume no tokens, so you only pay for what actually reaches the model. This approach keeps costs predictable compared to aggregators that charge for routing overhead.
Node SDK integration
Use the official Node SDK to handle JSON mode and function calling efficiently. Set response_format to {"type": "json_object"} for structured outputs or define tools for agent-like behavior.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.apertusapp.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);The model supports tool calls with tool_choice options. You can also set a seed for deterministic results. This flexibility allows you to build complex applications without leaving the OpenAI-compatible ecosystem.
Streaming responses
Stream tokens in real-time using Server-Sent Events (SSE) for low-latency user experiences. Each chunk contains the generated text, and the final chunk includes total token usage statistics.
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)Streaming reduces perceived latency for end-users. You can interrupt the stream if the user changes their mind. The API handles the SSE protocol automatically, requiring minimal code on your side.
Context window and capacity
The model supports a 100,000-token context window for both input and output combined. You can specify up to 16,000 tokens per request, or fall back to 2,048 tokens if you omit max_tokens.
This large window allows for extensive document analysis or long conversation histories. However, keep request bodies under 8 MB. The model is not GPT or Llama; it is a distinct uncensored AI model optimized for your specific use case.
Error handling and limits
Handle standard HTTP errors gracefully to maintain robust application flow. A 401 error indicates an invalid or missing API key. A 402 error means your prepaid credit is exhausted. A 429 error signals that you have exceeded 300 requests per minute or 8 concurrent requests.
Credit never expires, so you can pause usage and resume later. Mistakes like double charges are fixed via the Support page. Prepaid credit is charged only for actual token consumption, ensuring transparent pricing for every byte.
Common questions
How does the apertus app handle payments and credits?
You top up with crypto only (USDT on TRC20 or USDC on Base), with amounts from $20 to $500. Credits never expire, and you receive bonus credit for larger top-ups, starting at +5% for $50.
Is this API compatible with OpenAI SDKs?
Yes, it is an openai compatible API that works with standard clients by changing the base URL to HTTPS://api.apertusapp.com/v1. You can use the same code structure you would use for GPT-4.
What is the context window size?
The context window is 100,000 tokens for prompt and completion combined. You can request up to 16,000 tokens per output, which is useful for long-form content generation.
Your API key is ready
Register, retrieve your key, and update your base URL. That is all.