AIAPIAIAPI API

Qwen Image 3.0 Pro

Model ID qwen-image-3.0-pro/text-to-image

Overview

Image generation with automatic prompt rewriting and prompt-guided output dimensions.

Alibaba · text-to-image

Important: Output URLs are valid for about 24 hours; download promptly.

Endpoint

POST /v1/images/generations/async

Authentication

Authorization: Bearer <AIAPIAIAPI_API_KEY>

Request Body

ParameterTypeRequiredNullableDefaultConstraintsDescription
modelstringYesNo-values: qwen-image-3.0-pro/text-to-imageModel ID used to route the request.
promptstringYesNo--Text prompt describing the desired output.
negative_promptstringNoNo--Content to exclude from the output.
sizestringNoNo--WIDTHxHEIGHT; each edge must be 512–2048 pixels. Omit to select dimensions automatically.
seedintegerNoNo-range: 0-2147483647Seed for reproducible generation; omit for a random seed.
prompt_extendbooleanNoNo`true`-Whether the upstream model should expand or enhance the prompt.
prompt_extend_modestringNoNo`direct`values: direct, agentPrompt rewriting strategy: direct for a single pass, agent for an agentic rewrite pipeline.
nintegerNoNo`1`range: 1-4Number of images generated by one task.

model

Type: string · Required: Yes · Nullable: No

Model ID used to route the request.

prompt

Type: string · Required: Yes · Nullable: No

Text prompt describing the desired output.

negative_prompt

Type: string · Required: No · Nullable: No

Content to exclude from the output.

size

Type: string · Required: No · Nullable: No

WIDTHxHEIGHT; each edge must be 512–2048 pixels. Omit to select dimensions automatically.

seed

Type: integer · Required: No · Nullable: No

Seed for reproducible generation; omit for a random seed.

prompt_extend

Type: boolean · Required: No · Nullable: No

Whether the upstream model should expand or enhance the prompt.

prompt_extend_mode

Type: string · Required: No · Nullable: No

Prompt rewriting strategy: direct for a single pass, agent for an agentic rewrite pipeline.

n

Type: integer · Required: No · Nullable: No

Number of images generated by one task.

Request Example

curl --request POST \
  --url https://aiapiaiapi.com/v1/images/generations/async \
  --header 'Authorization: Bearer $AIAPIAIAPI_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
      "model": "qwen-image-3.0-pro/text-to-image",
      "prompt": "A cinematic camera movement through a forest",
      "prompt_extend": true
    }'

JSON

{
  "model": "qwen-image-3.0-pro/text-to-image",
  "prompt": "A cinematic camera movement through a forest",
  "prompt_extend": true
}

Response

{
  "code": "success",
  "message": "",
  "data": { "task_id": "image_01K2ABC123" }
}

Task Status

Use the task_id from the create response:

GET /v1/images/generations/async/{task_id}

{
  "code": "success",
  "message": "",
  "data": {
    "task_id": "image_01K2ABC123",
    "status": "SUCCESS",
    "progress": "100%",
    "outputs": ["https://cdn.example.com/images/image_01K2ABC123.png"],
    "start_time": 1786960805,
    "finish_time": 1786960900,
    "submit_time": 1786960800,
    "fail_reason": ""
  }
}

Error Responses

Validation errors return HTTP 400 with a stable error code.

{
  "code": "unsupported_parameter",
  "message": "The parameter is not supported by this model.",
  "data": null
}

Documentation Index

Fetch the complete documentation index at:

https://aiapiaiapi.com/llms.txt

Use this file to discover all available API documentation.