Quickstart: Integrate the Uncensored Text API

Integrate the uncensored text completion API into your content pipeline with a few lines of code. Use the standard OpenAI-compatible chat completions endpoint to generate scripts, captions, or refined prompts without content refusals.

Base URL and Authentication

Start by setting your base URL to https://api.contentmoderationapis.com/v1. This endpoint is compatible with official OpenAI SDKs and any OpenAI-compatible client. You will need an API key, which you can generate immediately after signing up with just an email and password on the Get API key page. The key is displayed once; save it securely. Each account allows one key, which can be regenerated at any time, revoking the old one. No card is required for the trial credit.

First Request

Send a POST request to /v1/chat/completions with your key in the Authorization header. Use the model ID uncensored to access the uncensored large language model. The model handles prompt refinement, script writing, and captioning without the restrictions typical of major providers. It is an open-weight model tuned for lawful adult use, excluding sexual content involving minors. Ensure your request body stays under 8 MB.

curl https://api.contentmoderationapis.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
  }'

Python SDK Integration

Use the official OpenAI Python SDK to interact with the API. Set the base_url and api_key in your client initialization. This approach works seamlessly with existing codebases designed for OpenAI. The model supports tool calling and streaming. Configure the client to point to our base URL to route requests through our uncensored inference engine. This is ideal for post-processing text generated by other modalities or for refining prompts before sending them to image or video models.

from openai import OpenAI

client = OpenAI(base_url="https://api.contentmoderationapis.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.js SDK Example

Initialize the OpenAI Node.js client with the custom base URL and your API key. The uncensored model responds to standard chat completions parameters. You can pass system prompts to guide the tone or format of the output. This is useful for generating structured data or consistent styles for captions and scripts. The API handles the text generation component of your pipeline, allowing you to focus on integrating the output into your image, video, or voice workflows.

import OpenAI from "openai";

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

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) for real-time token delivery. This reduces perceived latency for users waiting for long-form content like scripts or detailed captions. Streaming works with both the raw HTTP client and the SDKs. Monitor the stream for errors or completion events to handle the final response. This method is efficient for large context windows up to 100,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)

Rate Limits, Errors, and Quotas

The API enforces a limit of 300 requests per minute per key. If you exceed this, you will receive a 429 status code. Authentication errors return 401 for invalid keys, and 402 indicates insufficient prepaid credit. Requests are charged based on input tokens ($0.25 per 1M) and output tokens ($1.00 per 1M). Credits are prepaid, never expire, and require no subscription. The model does not offer image, audio, or video generation, nor does it provide embeddings or fine-tuning. Use this API strictly for text generation tasks in your content pipeline.

Under the hood: specs

Use this table to decide whether the API fits your project before you buy credit.

SpecValue
API formatOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
Base URLhttps://api.contentmoderationapis.com/v1
API keyAuthorization: Bearer YOUR_KEY
EndpointsPOST /v1/chat/completions · GET /v1/models
Model IDuncensored
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
StreamingSupported (stream: true), usage included at the end
Other parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Max outputup to 16,000 tokens per request (default 2,048)
Max context100,000 tokens (prompt + completion together)
JSON moderesponse_format: {"type": "json_object"}
Rate limit300/min per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Concurrencyup to 8 in parallel per key
Max body8 MB request body
How you payprepaid credit, charged by real token usage; errors and refusals are free
Trial credit$0.50 for 7 days, no card
Priceinput $0.25 / 1M tokens, output $1.00 / 1M tokens
Bonus credit+5% from $50, +10% from $100
Credit expiryno monthly fee; paid credit does not expire
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $10 to $500
Sign-inGoogle or e-mail and password
Content policyadult content allowed; sexual content involving minors is refused
Keysone active key per account; a new key replaces the old one

Errors and what to do

Errors come back as JSON with a stable type; failed and refused requests are not billed.

StatusTypeReason
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditout of credit; add credit and retry
403content_blockedrefused by the content policy
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

What is the context window size?

The model supports a context window of 100,000 tokens for both prompt and completion combined. This allows for substantial input data and long-form output generation without truncation.

Do you charge for trial credits?

No. Every new account receives $0.50 of trial credit valid for 7 days. No credit card is required to start. Paid prepaid credits never expire and can be topped up from $10.

Is the model trained on my prompts?

No. Prompts sent to the API are not used for training the model. You only need an email and password to create an account, ensuring your content remains private for your specific pipeline needs.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key