EN ▾

Coding api quickstart

Connect your uncensored coding AI in minutes with our OpenAI-compatible endpoint. Pay only for tokens used, with prepaid credit that never expires.

Base URL and authentication

Point your client to https://api.codingapi.cc/v1 and send your key in the header.

Retrieve your credential from the dashboard after signing in with Google or email. The API expects standard OpenAI authorization. Pass Authorization: Bearer YOUR_KEY with every request. Errors like 401 mean the key is invalid or missing.

Each account holds one active key. Generating a new key revokes the old one immediately. You can manage keys on the dashboard page.

Chat completions endpoint

Send messages to POST /v1/chat/completions and receive text output.

The model ID is uncensored. It answers without filtering for lawful adult content. Use the standard message structure with role and content fields.

curl https://api.codingapi.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Check if python list is sorted"}]
  }'

Requests return JSON. If you need structured data, enable JSON mode via the response_format parameter. The API supports streaming and non-streaming responses.

Python SDK integration

Use the official OpenAI Python library for easy integration.

Set the base URL to our endpoint. The library handles serialization automatically. Pass your API key via environment variables or explicit arguments.

from openai import OpenAI

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

Errors are raised as standard exceptions. Handle 402 payments errors by topping up your crypto credit. The model generates text based on your prompt history. Context is preserved within the window.

Node SDK usage

Install the OpenAI Node.js package for JavaScript projects.

Configure the client with our base URL and your key. The syntax mirrors the Python library. Create a completion call with your system and user messages.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.codingapi.cc/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 contains the generated text and token usage. Check the usage object for input and output token counts. Billing deducts from your prepaid balance. Credits do not expire.

Streaming and tokens

Enable streaming by setting stream: true in your request.

Receive chunks of text as they are generated. The final chunk contains the total token usage for the request. This allows real-time display of code or text.

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)

Parse the SSE events to extract delta content. Aggregate the text to form the complete response. Token counts help you monitor your prepaid credit usage accurately.

Limits, errors and context

The context window is 100,000 tokens for prompt and completion combined.

Maximum output per request is 16,000 tokens. Set max_tokens to control output length. Default output is 2,048 tokens if unspecified. Rate limits are 300 requests per minute per key.

Handle 402 errors by topping up via crypto. 429 indicates rate limiting. Pause and retry with exponential backoff. Request bodies must stay under 8 MB. These constraints ensure stable inference for your coding tasks.

Technical Q&A

What is the coding API base URL?

The base URL is HTTPS://api.codingapi.cc/v1. It is compatible with standard OpenAI SDKs. Change the base URL in your client configuration to point here.

How do I handle errors in the uncensored coding AI?

Use standard HTTP status codes. 401 means invalid authentication. 402 indicates insufficient credit. 429 signals rate limits. Check the response body for error details and retry logic.

Does the uncensored coding AI support streaming?

Yes, enable streaming with the stream parameter. Receive Server-Sent Events with partial text. The final event includes token usage data. This works with all standard OpenAI-compatible clients.

Generate your API key

Register an account, retrieve the key, and update your endpoint URL. That is the entire configuration.

Get your key