Compatible AISetup guide
Open ai compatible API documentation
Connect your OpenAI SDK to our uncensored LLM endpoint by updating the base URL and API key. You keep your existing code and get a drop-in compatible experience for local-first or cloud pipelines.
- per 1M input tokens
- $0.15
- Output tokens / 1M
- $0.50
- token context
- 100,000
- trial credit
- $0.50
- requests per minute
- 300
Base URL and Authentication
Start by configuring your client with the correct base URL and API key. The service runs at https://api.compatibleaiopen.com/v1. You obtain a key via the dashboard using Google or email. The key authenticates every request to the endpoint.
First Request
Send a standard chat completion request using the uncensored model ID. The API accepts text input and returns text output. You can adjust parameters like temperature or top_p. The context window supports up to 100,000 tokens combined for prompt and completion.
curl https://api.compatibleaiopen.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List three benefits of local inference"}]
}'
Python SDK Integration
Update the base_url parameter in the OpenAI Python client. This allows you to use the same library you already know. The model ID remains uncensored. Streaming and tool usage work exactly as documented for OpenAI. You do not need to rewrite your application logic.
from openai import OpenAI
client = OpenAI(base_url="https://api.compatibleaiopen.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 SDK Integration
Configure the Node.js client with the new base URL. Pass your API key via the environment or client init. The endpoint supports all standard parameters. Errors return standard HTTP status codes. You can integrate this into existing Express or serverless functions immediately.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.compatibleaiopen.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 Responses
Enable streaming by setting stream to true. The API returns Server-Sent Events (SSE). Token usage data appears in the final chunk. This reduces perceived latency for users. You can parse chunks incrementally. The model handles long contexts without dropping 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)
Limits and Errors
You are limited to 300 requests per minute per key. Concurrent requests are capped at 8 per key. Request bodies must stay under 8 MB. A 401 error indicates an invalid key. A 402 error means you have no credit. A 429 error signals rate limiting. Credit never expires. Errors and refusals are free.
Common questions
Is this a true open AI compatible endpoint?
Yes. It uses the standard /v1/chat/completions path. You only change the base URL and key. The response format matches OpenAI exactly. Tools and streaming work identically.
What happens if I exceed the rate limit?
You receive a 429 Too Many Requests status code. The limit is 300 requests per minute. You can distribute load across multiple keys if needed. Each key allows 8 concurrent requests.
Does the context window include the output?
Yes. The 100,000 token limit covers both the prompt and the completion. You can generate up to 16,000 tokens per request. This allows for long document analysis or code generation tasks.