EN ▾
Open account
  1. AI Coding Uncensored
  2. API Quickstart

API Quickstart

Get started with our uncensored coding AI API in minutes. Use the standard OpenAI-compatible endpoints to integrate raw, refusal-free model responses into your applications immediately.

Base URL and Authentication

Your API key authenticates every request. You must include it in the Authorization header as a Bearer token. The base URL for all endpoints is https://api.aicodinguncensored.com/v1. This URL works with the official OpenAI SDKs and any compatible client by simply updating the base_url configuration.

You receive one active key per account. If you generate a new key, the old one becomes inactive immediately.

Sending Your First Request

Make a standard chat completion call to get a response. The model ID is uncensored. You can send prompts with system instructions or user messages. The API returns text output directly.

Here is a basic cURL example to test your connection.

curl https://api.aicodinguncensored.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Generate a python script to parse the log file"}]
  }'

Ensure your request body includes the model field set to uncensored. If you get a 401 error, your key is invalid. A 402 error means your prepaid credit is exhausted.

Integrating with Python

Use the openai Python package to interact with the API. Set the base URL to our endpoint and provide your API key. This allows you to use familiar methods like chat.completions.create.

from openai import OpenAI

client = OpenAI(base_url="https://api.aicodinguncensored.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)

Pass your messages as a list of dictionaries. The model parameter must be uncensored. The response object contains the generated text in response.choices[0].message.content.

Integrating with Node.js

Use the openai Node.js package for JavaScript or TypeScript projects. Configure the client with our base URL and your API key. This ensures compatibility with existing OpenAI code structures.

import OpenAI from "openai";

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

Call chat.completions.create with the uncensored model. Handle the response to extract the text. This approach works for both server-side and client-side applications that support fetch.

Streaming Responses with SSE

Enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream. Each chunk contains a partial response token.

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)

The final chunk includes the full token usage statistics. This allows you to display text in real-time while accurately tracking costs. Streaming is ideal for long-form code generation or chat interfaces.

JSON Mode and Function Calling

Use response_format: {"type": "json_object"} to force structured output. This is useful for parsing code or data objects. You can also enable function calling with the tools parameter.

Set tool_choice to control how the model uses functions. The API supports standard tool definitions. This enables automated workflows and agent-like behavior without external parsing logic.

Common questions

What is the context window size for the uncensored coding AI API?

The context window is 100,000 tokens for both prompt and completion combined. You can request up to 16,000 tokens per response. If you do not set <code>max_tokens</code>, the default output is 2,048 tokens.

What are the rate limits for the API?

You are limited to 300 requests per minute per key. You can have up to 8 concurrent requests at the same time. The request body size must not exceed 8 MB. Exceeding these limits returns a 429 error.

What do the 401, 402, and 429 errors mean?

A 401 error means your API key is invalid or expired. A 402 error indicates your prepaid credit is exhausted. A 429 error signals that you have exceeded the rate limit of 300 requests per minute or the concurrency limit.

Get your key in seconds

Sign up, copy the key, update the endpoint. Done.

Open account