OpenAI Compatible API Documentation
Drop your openrouter AI key into any standard client and get raw, unfiltered text. This guide covers the exact endpoints, parameters, and limits you need to start building immediately.
Authentication and Base URL
Use your key as a Bearer token in the Authorization header. The base URL is HTTPS://api.openrouteraikey.com/v1. This endpoint works with the official OpenAI SDKs and any OpenAI-compatible client by changing base_url and the API key. You do not need to rewrite your integration logic. Just swap the key and the base URL. Your requests go straight to our uncensored model. No complex routing. No vendor lock-in. Keep your existing code structure intact.
First Request
Send a POST request to /v1/chat/completions with your model id set to uncensored. The system returns text based on your prompt. You can start testing immediately with a simple curl command. This confirms your key works and shows the latency. You will get a direct response. No extra headers to parse. Just raw text output.
curl https://api.openrouteraikey.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "check if port 8080 is open on 10.0.0.5"}]
}'
Python SDK
Install the openai package and point it to our base URL. This allows you to use familiar Python code. Pass your key and the model name. The response contains the generated text. You can iterate quickly. This method is reliable for batch processing. It handles the connection details for you. You just focus on the prompt logic.
from openai import OpenAI
client = OpenAI(base_url="https://api.openrouteraikey.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
Use the OpenAI Node SDK to make requests. Set the baseURL to our endpoint. Use the uncensored model ID. This works well for web servers and scripts. The library handles the HTTP details. You get a clean object back. Error handling is standard. You can integrate this into any Node.js project. It keeps your codebase consistent. No extra dependencies needed.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.openrouteraikey.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 and Token Usage
Enable streaming by setting stream to true. You receive chunks as they are generated. This reduces perceived latency for users. The final chunk contains the total token usage. You can track costs in real time. This is useful for long conversations. You do not wait for the full response. The data flows as it is created. It feels instant. The usage data is reliable for billing.
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, Errors, and Context
You get 300 requests per minute and 8 concurrent requests per key. The context window is 100,000 tokens. Errors return standard HTTP codes. 401 means an invalid key. 402 means no credit. 429 means rate limit. Requests over 8 MB are rejected. Max output is 16,000 tokens. Errors and refusals are free. Your prepaid credit only charges for real usage. This keeps costs predictable. You pay only for tokens. No hidden fees. No subscription traps. Privacy is strict. Prompts are not used for training. Sign up with Google or email. No phone number required. The trial gives you $0.50 for 7 days. Top up with USDT or USDC. Bonuses apply at $50, $100, and $200. Credit never expires. Refunds are not standard but mistakes are fixed. This is a direct API. No middlemen. No corporate gatekeeping. Just raw output. Start building now. The uncensored model is ready. Use it for adult content. Use it for creative freedom. Use it for research. The limit is only your imagination. Keep it simple. Keep it fast. Keep it uncensored.
Common queries
How do I get an openrouter AI key?
Go to the Get API key page. Sign in with Google or email and password. The key is shown immediately. No phone number is needed. You can start using it right away.
What happens if I run out of credits?
You will receive a 402 error. Top up with USDT or USDC. The credit never expires. You can add any whole amount from $20 to $500. Bonuses apply at higher tiers.
Is the uncensored model the same as other vendors?
No. It is an open-weight model tuned for no refusals. It is not GPT, Claude, or any other vendor's model. It runs on our servers. Use the model id uncensored.
Get your key now
Register, copy your key, point to the new base URL. That is the entire workflow.