AIAPIAIAPI API

Qwen Image Edit Spicy

Model ID alibaba/qwen-image-edit-spicy

Overview

Text-guided image editing for adding, removing, or modifying elements, style transfer, and background changes.

Alibaba · image-to-image

Endpoint

POST /v1/images/generations/async

Authentication

Authorization: Bearer <AIAPIAIAPI_API_KEY>

Request Body

ParameterTypeRequiredNullableDefaultConstraintsDescription
modelstringYesNo-values: alibaba/qwen-image-edit-spicyModel ID used to route the request.
promptstringYesNo--Text prompt describing the edit to apply to the input image.
imagestringYesNo-accepts: HTTPS URL, Base64 data URLInput image to edit. Accepts an HTTPS URL or Base64-encoded image data.
seedintegerNoYes-min: 0Random seed. Omit it, use null, or use 0 for random generation; use a positive integer for reproducible output.

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 edit to apply to the input image.

image

Type: string · Required: Yes · Nullable: No

Input image to edit. Accepts an HTTPS URL or Base64-encoded image data.

seed

Type: integer · Required: No · Nullable: Yes

Random seed. Omit it, use null, or use 0 for random generation; use a positive integer for reproducible output.

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": "alibaba/qwen-image-edit-spicy",
      "prompt": "A cinematic camera movement through a forest",
      "image": "https://example.com/reference.jpg"
    }'

JSON

{
  "model": "alibaba/qwen-image-edit-spicy",
  "prompt": "A cinematic camera movement through a forest",
  "image": "https://example.com/reference.jpg"
}

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.