EN ▾

Quickstart for Qwen Image pipelines

Integrate the uncensored LLM API into your image, video, or speech pipelines with this quickstart guide. Use the OpenAI-compatible endpoint to generate prompts, captions, and scripts without corporate safety filters.

Prerequisites: Install the OpenAI SDK

To interact with the qwen image api text endpoint, you need a supported programming language and the official OpenAI SDK. The API follows the standard Chat Completions interface, so you can use the same client libraries you would use for GPT-4 or other OpenAI models. Install the SDK via your package manager. For Python, use pip. For Node.js, use npm. Ensure your environment has an active internet connection and that your firewall allows outbound HTTPS requests to api.qwenimageapi.com. No special authentication libraries are required beyond standard HTTP headers.

Configuration: Set Base URL and API Key

Authentication requires a valid API key obtained from your account dashboard. Create an account using Google or email/password, then retrieve your key from the Get API key page. Set your base URL to https://api.qwenimageapi.com/v1. This allows any OpenAI-compatible client to route requests to our uncensored model. Pass the key in the Authorization: Bearer header. If you switch keys, remember that one active key replaces the old one immediately. Keep your key secure, as it is the sole credential for your prepaid credit.

Basic Request: Send a Prompt

Send a text prompt to generate captions, scripts, or post-processing instructions. The model ID is always uncensored. The endpoint accepts standard chat completions parameters. You can set temperature, top_p, and stop sequences. Requests are charged based on token usage. Errors and refusals (except for the hard minor content limit) do not consume credit. Use the following example to verify connectivity and basic functionality. This confirms your integration with the text engine powering your multimodal pipeline.

Streaming Responses via SSE

For long-form script generation or detailed captioning, enable streaming to receive tokens as they are generated. This reduces perceived latency in your application. Set stream: true in your request body. The server sends Server-Sent Events (SSE). The final chunk contains the total token usage for the request. This is useful for updating UI progress bars in real-time. Ensure your client library handles SSE streams correctly to avoid memory leaks or incomplete responses. Streaming works with all standard parameters, including JSON mode and function calling.

Function Calling & JSON Mode

Extract structured data from text or prepare JSON payloads for other pipeline stages. Use response_format: {"type": "json_object"} to force JSON output. This is critical for parsing image metadata or generating structured prompts. You can also define function schemas for tool use. The model supports tool_choice parameters. Use JSON mode when you need deterministic structures for downstream processing. Function calling is useful when the text output must trigger specific actions in your image or video pipeline. Test thoroughly with your specific schema requirements.

Token Usage & Limits

The context window is 100,000 tokens total. If you omit max_tokens, the response can run to the end of the 100,000-token window. Rate limits are 300 requests per minute and 8 concurrent requests per key. Request bodies must be under 8 MB. HTTP 401 errors indicate an invalid or expired key. HTTP 429 errors mean you have exceeded the rate limit. Errors and refusals are free. Credit never expires. Top up with USDT or USDC. No card is needed for the trial. Ensure your code handles retries for 429s gracefully to maintain pipeline throughput.

cURL

curl https://api.qwenimageapi.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

from openai import OpenAI

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

import OpenAI from "openai";

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

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)

Technical reference

Everything the endpoint can and cannot do, in one place — check it before you top up.

ItemValue
API formatOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
API keyBearer token in the Authorization header
Base URLhttps://api.qwenimageapi.com/v1
Model IDuncensored
MethodsPOST /v1/chat/completions · GET /v1/models
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Sampling parameterstemperature, top_p, stop, seed and the two penalties are passed through
SSE streamingYes — server-sent events; the last chunk carries token usage
JSON modeJSON object mode via response_format json_object
Context window100,000 tokens (prompt + completion together)
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Request sizeup to 8 MB per request
Concurrency8 requests at the same time per key
Requests per minute300/min per key
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Volume bonus+5% from $50, +10% from $100, +15% from $200
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
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
Subscriptionno monthly fee; paid credit does not expire
Contentuncensored for adults; the only hard rule: no sexual content involving minors
Sign-insign in with Google or with e-mail + password
Key managementone key per account, regenerate any time (the old one stops working)

HTTP errors

The type field is stable, the message is for humans. Errors cost nothing.

CodeTypeMeaning
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_creditbalance is empty — top up, requests resume at once
403content_blockedrefused by the content policy
404not_foundunknown endpoint
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busytemporary overload, retry shortly

Questions and answers

How do I top up my credit?

Top up using cryptocurrency only. We accept USDT on the TRC20 network or USDC on the Base network. Minimum top-up is $20, maximum is $500. You receive a 5% bonus for $50+ and a 10% bonus for $100+. No credit cards or PayPal are accepted.

What is the uncensored model?

It is an open-weight model hosted on our servers, tuned to answer without content refusals for lawful adult use. It is not GPT, Claude, or Qwen. It blocks sexual content involving minors but allows other controversial or adult topics. It is designed for prompt engineering and text generation in media pipelines.

Do errors cost credits?

No. Errors and refusals do not consume your prepaid credit. You are only charged for successful token generation. This makes the API cost-effective for debugging and iterative prompt development. Credit also never expires, so you can use it whenever needed.

Your key is one form away

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

Get API key