EN ▾
Create key
per 1M input tokens
$0.15
Output tokens / 1M
$0.50
token context
100,000
trial credit
$0.50
requests per minute
300

API Documentation

Start generating unrestricted code with our OpenAI-compatible API. Send prompts, receive tokens, and integrate directly into your workflow without guardrails.

Base URL and Authentication

Use the provided base URL to connect with any OpenAI SDK. The endpoint is https://api.unrestrictedcodingai.com/v1. Pass your API key in the Authorization header as a Bearer token. This ensures compatibility with standard libraries while delivering an uncensored LLM experience.

curl https://api.unrestrictedcodingai.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Explain how the async await pattern works in JavaScript"}]
  }'

Authentication is strict. If the key is missing or invalid, the API returns a 401 error. Ensure your key is active and associated with an account created via Google or email.

POST /v1/chat/completions

Send your coding prompts to the chat completions endpoint. The model ID is uncensored. This single model handles all text generation without content refusals for lawful adult use. You control the context, the style, and the output.

from openai import OpenAI

client = OpenAI(base_url="https://api.unrestrictedcodingai.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 request body with your messages array. The system expects standard OpenAI format. This approach allows you to maintain full autonomy over your prompts and code generation tasks.

GET /v1/models

Verify available models using the GET endpoint. This returns a list containing the uncensored model. Use this to confirm connectivity before sending heavy payloads. It is a quick check for service status.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.unrestrictedcodingai.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);

The response includes the model ID and object type. This metadata helps your application adapt dynamically. No embeddings or other model types are available in this simple API design.

Streaming and Token Usage

Enable streaming by setting stream to true. This delivers tokens via Server-Sent Events (SSE). Token usage details appear in the final chunk. This reduces perceived latency for long code blocks.

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 partial outputs efficiently. The API prioritizes developer autonomy, so you process each token as it arrives. This method is ideal for real-time coding assistants or vibe coding workflows.

Function Calling and JSON Mode

Use function calling for structured outputs. Set response_format to {"type": "json_object"} for strict JSON. This ensures your code parsers receive clean data. Tool definitions are passed in the messages array.

The model supports tool_choice for forced execution. This is critical for agentic coding tasks where reliability matters. Use this for automated workflows that require deterministic structures.

Rate Limits and Constraints

Respect the 300 requests per minute limit. Concurrency is capped at 8 simultaneous requests per key. The request body size cannot exceed 8 MB. These limits prevent abuse while keeping costs low.

A 402 error indicates insufficient prepaid credit. Errors and refusals are free, so you only pay for successful completions. The context window spans 100,000 tokens total, including input and output.

Common questions

What is the unrestricted coding AI context window?

The context window is 100,000 tokens, covering both the prompt and the completion. This allows for extensive codebases and long conversations without immediate truncation.

How do I handle errors like 401 or 402?

A 401 error means your API key is invalid or missing. A 402 error indicates your prepaid credit is exhausted. Top up with crypto to continue using the service immediately.

Is this an openai compatible API?

Yes, it uses the same endpoints and request formats. You only need to change the base URL and API key in your existing OpenAI SDK configurations.

Get your API key instantly

Register, copy your key, update the endpoint URL. That is all.