OPENCLAW + QWEN 2 IMAGE

Use Qwen 2 Image in OpenClaw.

Qwen 2 Image is Alibaba's image generation and editing model. OpenClaw agents call it through the same RunAPI endpoint used for chat — send a prompt, get an image URL. Supports text-to-image, image editing, and image remixing through three model variants.

one API key · text to image endpoint · async task polling
Use RunAPI to generate an image with Qwen 2 Image.

Requirements:
- Call the RunAPI text_to_image endpoint at https://runapi.ai/api/v1/task/text_to_image.
- Set the model to "qwen-2-text-to-image".
- Read the API key from the RUNAPI_API_KEY environment variable.
- The response returns a task_id. Poll the task status endpoint until the task completes, then retrieve the image URL from the output.
- For image editing, use model "qwen-2-edit-image" and include an image_url field.
- For remixing, use model "qwen-2-remix-image" and include an image_url field.
curl -X POST https://runapi.ai/api/v1/task/text_to_image \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-2-text-to-image",
    "prompt": "A traditional Chinese ink painting of misty mountains at dawn, elegant brushwork"
  }'
{
  "task_id": "tsk_abc123",
  "status": "pending",
  "model": "qwen-2-text-to-image"
}
Copy the curl command to test qwen-2
HOW IT WORKS

Use Qwen 2 Image in OpenClaw in three steps

1

Configure RunAPI

Set your RunAPI API key as an environment variable. If you have not added RunAPI as an OpenClaw provider yet, follow the OpenClaw setup guide first.

export RUNAPI_API_KEY=runapi_xxx
2

Call Qwen 2 Image

Paste the prompt into OpenClaw or call the text_to_image endpoint directly. Set the model field to qwen-2-text-to-image for generation, qwen-2-edit-image for editing, or qwen-2-remix-image for remixing.

text_to_image
3

Get the result

The endpoint returns a task ID. Poll the task status endpoint until the status changes to completed, then read the image URL from the output. RunAPI SDKs handle polling automatically.

task_id: tsk_abc123
PARAMETERS

Qwen 2 Image API parameters

Parameter Type Description
model string Required. qwen-2-text-to-image, qwen-2-edit-image, or qwen-2-remix-image.
prompt string Text description or editing instruction.
image_url string Source image for edit or remix mode.
size string Optional. Output dimensions.

What is Qwen 2 Image on OpenClaw?

Qwen 2 Image is Alibaba's image model that covers generation, editing, and remixing through one API. It is strong at multilingual prompt understanding (especially Chinese and English), handles complex multi-object scenes well, and supports instruction-based editing where you describe what to change in natural language. OpenClaw agents call all three modes through the same RunAPI endpoint.

Qwen 2 Image use cases

Multilingual marketing campaigns

Generate images from prompts written in Chinese, English, or mixed-language text for bilingual marketing materials without translating prompts first.

Instruction-based image editing

Modify existing images by describing the change in plain language -- swap backgrounds, add objects, adjust lighting, or remove elements without opening an editor.

Fine-tuning open-weight models for specific domains

Use Qwen 2 Image outputs as training data or baselines when fine-tuning open-weight Qwen models for domain-specific image tasks like product catalogs or branded content.

FAQ

Qwen 2 Image + OpenClaw questions

OpenClaw general setup

Not configured yet? Start with the RunAPI setup guide for OpenClaw.

OpenClaw setup guide →

Qwen 2 Image model catalog

See all Qwen 2 Image variants, pricing, and API docs.

Qwen 2 Image models →

Try Qwen 2 Image in OpenClaw today.

Get a free RunAPI key, paste the prompt into OpenClaw, and start generating.