Alibaba · Image

OpenClaw x Qwen 2

Qwen 2 is Alibaba's visual model from the Qwen family, supporting image generation and editing. Through RunAPI, all Qwen 2 endpoints share unified billing and API access.

2 variants from $0.06 / call Commercial OK

Prerequisite: npx runapi mcp install

Prompt

Prompt models

Use qwen-2-edit-image when it matches the task: Targeted region editing from text instructions.

You have access to RunAPI task tools for Qwen 2.

Available Qwen 2 models:
- qwen-2-edit-image: Targeted region editing from text instructions
  endpoints: /api/v1/qwen_2/edit_image
  request fields: model, prompt, source_image_url
- qwen-2-text-to-image: Qwen2 text-to-image with 5 aspect ratios
  endpoints: /api/v1/qwen_2/text_to_image
  request fields: model, prompt

Use the model ID and endpoint that match the user's request.
Example prompt: Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk.
/api/v1/qwen_2/edit_image: Submit the task, poll for its status, then verify the completed output. POST /api/v1/qwen_2/edit_image and save the returned Task id.
GET /api/v1/qwen_2/edit_image/<task-id> until status is completed or failed.
Verify the completed response contains the endpoint-specific output documented in the API reference.
/api/v1/qwen_2/text_to_image: Submit the task, poll for its status, then verify the completed output. POST /api/v1/qwen_2/text_to_image and save the returned Task id.
GET /api/v1/qwen_2/text_to_image/<task-id> until status is completed or failed.
Verify the completed response contains the endpoint-specific output documented in the API reference.

Public Versions and Endpoints

Model ID Endpoints Price Catalog
qwen-2-edit-image
/api/v1/qwen_2/edit_image
$0.06 / call Model detail
qwen-2-text-to-image
/api/v1/qwen_2/text_to_image
$0.06 / call Model detail

Verify

Poll until the task reaches a terminal status

Select <model-id> to generate verification commands.

Configuration

Guide endpoint: <endpoint>

Select <model-id> to generate a request with the endpoint's public input contract.
How it works

Get Started in 3 Steps

  1. Choose a model ID

    Select a public catalog model ID and review its endpoint and current starting price.

  2. Configure RunAPI

    Set RUNAPI_API_KEY before making the endpoint request.

  3. Verify the result

    For asynchronous endpoints, poll the same endpoint until the Task reaches a terminal status.

What to Build with OpenClaw + Qwen 2

  • Multilingual marketing campaigns

    Generate images from prompts written in Chinese, English, or both, 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.

  • Domain-specific image baselines

    Use Qwen 2 Image outputs as baselines or reference sets when building image workflows for product catalogs or branded content.

Why Use Qwen 2 Through RunAPI + OpenClaw

  • 2 variants, one API key

    Use one RunAPI connection to choose among the live model variants without changing your integration.

  • Clear usage pricing

    See current catalog pricing before you send a request, with no subscription or minimum spend required.

  • Automatic task workflows

    Submit, poll, and collect asynchronous results through a consistent task workflow without writing manual polling code.

OpenClaw + Qwen 2 Questions

Can I use Qwen 2 Image in OpenClaw?

Yes. OpenClaw supports custom providers. Add RunAPI with your RunAPI API key, then call the Qwen 2 Image endpoint shown on this page. The same provider handles chat and image generation.

How well does Qwen 2 Image handle Chinese prompts?

Qwen 2 Image understands Chinese prompts natively, so they do not need to be translated to English first. This makes it a good fit for Chinese text or bilingual content.

Is Qwen 2 Image asynchronous?

Yes. The endpoint returns a task ID immediately. Poll the task status or use a callback to know when the image is ready. RunAPI SDKs and the CLI handle polling automatically.

Which model ID should I use?

Choose a public model ID from the version table. Each ID exposes the endpoints shown for that version.

Does this guide configure a chat model?

No. This Model Line uses the endpoint workflow shown here and is not presented as an agent chat model.

Start using Qwen 2 with OpenClaw

Building with a team?

We're here to help with enterprise setup, integrations, and technical questions.

Contact Us