EN ▾
Get API key

Unfiltered AI Image: Quickstart: Integrate the Uncensored Text API

Integrate our uncensored text API into your AI image pipeline with these standard OpenAI-compatible endpoints. Use the provided SDK examples to generate prompts, scripts, or metadata without content filters.

Base URL and Authentication

Our API is fully compatible with the OpenAI protocol. To begin, point your client to the base URL https://api.unfilteredaiimage.cc/v1 and include your API key in the authorization header. You can generate a key instantly on the Get API key page using Google or an email address. The key is displayed immediately and is the only active key for your account; generating a new one invalidates the previous.

Authentication relies on the standard Authorization: Bearer <key> header. If the key is missing or invalid, the server returns a 401 error. This setup allows you to use any existing OpenAI SDK or compatible client library by simply swapping the base URL and API key.

Chat Completions Endpoint

Send your text requests to the POST /v1/chat/completions endpoint. This endpoint handles all text generation tasks, from writing complex prompts for image generators to extracting structured data. The API accepts standard message arrays containing system, user, and assistant roles.

Below is a basic cURL example to verify connectivity and generate a simple response. Ensure your request body includes the model ID and your messages array.

curl https://api.unfilteredaiimage.cc/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."}]
  }'

Model ID: 'uncensored'

When constructing your request, set the model parameter to uncensored. This identifies the specific large language model hosted on our servers, which is tuned to answer without refusals for lawful adult, fictional, or controversial topics. It is an open-weight model distinct from GPT, Claude, or other vendor offerings.

Using the uncensored model ID ensures your pipeline receives text that is not filtered by standard corporate content policies. You can verify available models by sending a GET request to /v1/models, though this API serves only this single model for text completions.

Streaming and Token Usage

Enable streaming by setting stream: true in your request body. The API returns data via Server-Sent Events (SSE), allowing you to process tokens as they are generated. This is particularly useful for long prompt generation or script writing where latency matters.

Token usage statistics are included in the final chunk of the stream. This allows you to track input and output tokens in real-time for billing transparency. Streaming helps keep your application responsive while the uncensored LLM processes your request.

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)

Parameters: Temperature, Top P, and JSON Mode

Control the creativity of the output using temperature and top_p. Higher temperature values increase randomness, which is useful for creative prompt generation. Lower values produce more deterministic results, ideal for structured data extraction.

For strict output formats, use response_format: {"type": "json_object"}. This forces the model to return valid JSON, ensuring your image generation pipeline can parse the results without errors. You can also use stop sequences to truncate output at specific markers. Combine these with function calling tools for advanced orchestration.

from openai import OpenAI

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

Rate Limits and Constraints

Each API key is limited to 300 requests per minute and 8 concurrent requests. The maximum request body size is 8 MB. If you exceed these limits, the API returns a 429 error. Ensure your client handles retries appropriately.

Billing errors (402) occur if your prepaid credit is exhausted. Errors during processing do not consume tokens. The context window supports 100,000 tokens total, with no separate output cap. If you do not specify max_tokens, the response can run to the end of the window. These constraints ensure fair usage for all developers in the uncensored LLM ecosystem.

import OpenAI from "openai";

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

API specifications

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

FeatureSupport
ProtocolOpenAI Chat Completions schema; official openai SDKs work unchanged
Base URLhttps://api.unfilteredaiimage.cc/v1
API keyBearer token in the Authorization header
EndpointsPOST /v1/chat/completions · GET /v1/models
Modeluncensored
JSON modeJSON object mode via response_format json_object
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
StreamingYes — server-sent events; the last chunk carries token usage
Max context100,000 tokens (prompt + completion together)
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Max bodyup to 8 MB per request
Parallel requestsup to 8 in parallel per key
Requests per minute300/min per key
Trial credit$0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
How you paypay as you go from prepaid credit; nothing is charged for failed or refused requests
Credit expiryno monthly fee; paid credit does not expire
Bonus credit+5% from $50, +10% from $100, +15% from $200
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Price$0.15 per 1M input tokens · $0.50 per 1M output tokens
Contentadult content allowed; sexual content involving minors is refused
Keysone active key per account; a new key replaces the old one
AccountGoogle or e-mail and password

When a request fails

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

HTTPTypeWhat to do
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
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_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

Is this the official Midjourney or Flux API?

No. This is an independent uncensored text API. While it can generate prompts for tools like Midjourney or Flux, it does not generate images or video itself. Check the respective vendor documentation for their specific API details.

Do you store or train on my prompts?

No. Your prompts are not used for training. We only require an email for account creation, and your API key is the primary identifier for your usage and billing.

What happens if I get a 401 error?

A 401 error indicates an invalid or missing API key. Verify that you are using the correct key from your account dashboard and that the authorization header is formatted as Bearer <key>.

Your key is one form away

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