Quickstart: uncensored ai for coding API
Start generating code without content refusals by swapping your base URL and API key. This guide walks you through the uncensored AI for coding API using standard OpenAI-compatible clients.
Prerequisites and base URL
Get your API key from the dashboard. Use this base URL for all requests: https://api.uncensoredaiforcoding.com/v1. It works with any OpenAI SDK.
Install the official SDK
Install the package in your environment. This ensures compatibility with the uncensored coding AI standard.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredaiforcoding.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)
Make your first request
Send a simple completion to test the connection. The model id is uncensored.
curl https://api.uncensoredaiforcoding.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "get current unix timestamp in python"}]
}'
Enable streaming for real-time output
Stream responses to handle long code blocks efficiently. Use the stream flag.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredaiforcoding.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);
Handle errors and usage limits
Expect 429 errors if you hit 300 requests per minute. Context window is 100,000 tokens. Max output is 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)
Use JSON mode for structured data
Force structured output for your code parsers. Set response_format to {"type": "json_object"}.
Common queries
What is the uncensored AI for coding API?
It is an OpenAI-compatible API serving one uncensored large language model. It delivers raw, open-weight output tuned for uncensored code generation.
How do I pay?
We accept crypto only. Top up with USDT (TRC20) or USDC (Base). Prices are $0.15 per 1M input tokens and $0.50 per 1M output tokens.
What are the limits?
You get 300 requests per minute per key. The context window is 100,000 tokens. Max output per request is 16,000 tokens.
Generate your API key
Register, copy the token, update the endpoint. That is all there is to it.