ApiRanking/Developer guide: uncensored chat completions API
Developer guide: uncensored chat completions API
This guide shows how to integrate the uncensored LLM API into your application using standard OpenAI-compatible SDKs. You get transparent token pricing, prepaid crypto credit, and a model tuned for unrestricted lawful adult content.
Authentication & base URL configuration
The api ranking endpoint replaces your standard OpenAI base URL. Set your base_url to https://api.apiranking.cc/v1 and pass your key in the Authorization header.
- Sign up with Google or email to receive your key instantly.
- No phone number is required.
- Use the header
Authorization: Bearer YOUR_API_KEY.
Errors and refusals are free. Your prepaid credit is charged only for real token usage.
First request
Send a standard chat.completions request to test connectivity. The model ID is uncensored.
Adjust the model field and your API key in the example below.
curl -X POST https://api.apiranking.cc/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"model": "uncensored", "messages": [{"role": "user", "content": "Hello"}]}'
Python SDK integration
Use the official openai Python library. Point it to our base URL to access the uncensored model.
Install the library with pip install openai.
Set base_url to https://api.apiranking.cc/v1.
Call chat.completions.create() with the uncensored model ID.
This approach works with any OpenAI-compatible client library.
Node SDK integration
Initialize the OpenAI client in Node.js with the custom base URL.
Pass your API key as the apiKey.
Set baseURL to https://api.apiranking.cc/v1.
Request completions using the uncensored model.
This ensures compatibility with your existing Node.js infrastructure.
Streaming SSE and token usage
Enable streaming by setting stream: true in your request.
The API returns Server-Sent Events (SSE).
Token usage details are provided in the last chunk.
This allows real-time output display in your application.
Check the final chunk for total input and output token counts.
Limits, errors, and context window
The context window is 100,000 tokens (prompt + completion together).
Max output is 16,000 tokens per request.
Rate limit is 300 requests per minute per key.
Concurrent requests are limited to 8 per key.
Request body size must not exceed 8 MB.
Handle HTTP 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits.
cURL
curl https://api.apiranking.cc/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Count tokens in this JSON payload accurately."}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.apiranking.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)Node.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.apiranking.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);Streaming
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)Common questions
Is the API ranking uncensored model free for adult content?
Yes, lawful adult content is allowed without refusals. The only hard limit is sexual content involving minors, which is always refused. Credit is charged only for real token usage.
How do I top up my prepaid credit?
Top up using USDT (TRC20) or USDC (Base). Any whole amount from $20 to $500 is accepted. Bonus credit is added: +5% from $50, +10% from $100, and +15% from $200.
Does the uncensored LLM API support function calling?
Yes, the API supports function calling, JSON mode, and streaming. You can use parameters like <code>temperature</code>, <code>top_p</code>, and <code>stop</code> to control generation.
Generate your API key
Register, retrieve your key, and update your base URL. That is the entire configuration.