Quickstart: uncensored model integration
Integrate our uncensored LLM in minutes using the standard OpenAI interface. This guide covers SDK setup, streaming, and structured output for immediate deployment.
- per 1M input tokens
- $0.15
- Output tokens / 1M
- $0.50
- token context
- 100,000
- trial credit
- $0.50
- requests per minute
- 300
Install the official SDK
Start by adding the library to your environment. The official package works directly with our endpoints. Use your preferred package manager to install the dependency. This ensures you have the latest compatibility for our API calls.
Once installed, you are ready to configure the connection parameters. The setup process takes seconds, not hours.
Set base_url and api_key
Point your client to our dedicated server. Replace the default base URL with our specific endpoint. Use the key generated from your dashboard. Authentication is handled via the standard Bearer header.
Keep your key secure. It grants access to your prepaid credit. The URL structure mirrors the standard format you already know.
Send your first chat completion
Make a POST request to the chat completions endpoint. Pass your system prompt and user message. The model returns text immediately. This confirms your connection is active and credits are deducted correctly.
Errors return standard HTTP codes. Check the response body for details. This step verifies your integration is functional.
cURL
curl https://api.apiaiunlimited.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "list the endpoints for the chat completion endpoint"}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.apiaiunlimited.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)Node.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.apiaiunlimited.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);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)Secure your API key
Register, grab the key, swap the endpoint. That is the entire configuration.