Documentation for the Uncensored Inference API
Get started with the uncensored LLM inference API in seconds using standard OpenAI-compatible endpoints and transparent per-token pricing.
Authentication & Base URL
Start by authenticating with your API key at the specified base URL. The endpoint works with any OpenAI-compatible SDK by updating the base URL configuration. You receive your key immediately after signing up with Google or email, with no phone number required. https://api.apiinferencellm.com/v1 is the only base URL you need for all requests.
First Request
Send your first prompt to the chat completions endpoint using a standard HTTP POST request. The model identifier is simply "uncensored" and accepts text input for immediate generation. Replace YOUR_API_KEY with the credential shown on your dashboard.
curl https://api.apiinferencellm.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the top 5 Python libraries for data analysis"}]
}'
This request returns a direct text response without content filters for lawful adult content.
Python SDK Integration
Initialize the OpenAI client with your base URL and API key to interact programmatically. The library handles serialization automatically while preserving all custom parameters like temperature and top_p.
from openai import OpenAI
client = OpenAI(base_url="https://api.apiinferencellm.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)
Configure the client once and reuse it across your application for consistent performance.
Node SDK Integration
Import the OpenAI package and set the base URL to point to our inference provider. This approach works with existing Node.js projects that already use OpenAI-compatible services.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.apiinferencellm.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);
Pass your API key in the configuration object to enable authenticated requests immediately.
Streaming Responses & Tokens
Enable streaming by setting the stream parameter to true for real-time token delivery. Each chunk contains partial text and the final chunk includes total token usage for accurate billing. This method reduces perceived latency for long outputs up to 16,000 tokens.
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)
Handle errors gracefully by checking the response status before processing each chunk.
Limits, Errors & Context
Manage rate limits by adhering to 300 requests per minute and 8 concurrent requests per key. The context window supports 100,000 tokens for both prompt and completion combined. Errors like 401 indicate an invalid key, while 402 means you need more credit. Requests fail instantly if you exceed the 8 MB body limit.
Frequently asked questions
What is the base URL for the inference API?
The base URL is HTTPS://api.apiinferencellm.com/v1. It works with any OpenAI-compatible SDK by changing the base_url parameter.
How many tokens can I send in one request?
You can send up to 100,000 tokens total for prompt and completion. The maximum output per request is 16,000 tokens.
What happens if I get a 429 error?
A 429 error means you hit the rate limit of 300 requests per minute. Wait briefly or reduce concurrent requests to 8 per key.
Generate your key now
Register, copy the token, update the endpoint. That is all.