VARIANT · Alibaba / Qwen 2

Qwen 2 qwen-2-edit-image API

Same API, same SDK — switch variants by changing one parameter.

Operational · image · Commercial OK
# Works with Claude Code, Codex, Gemini CLI, Cursor, and 50+ agents
npx skills add runapi-ai/qwen-2 -g
The -g flag installs globally so every project picks it up.
Or paste this prompt to your AI agent:
Install the Qwen 2 skill for me:

1. Clone https://github.com/runapi-ai/qwen-2
2. Copy the skills/qwen-2/ directory into your
   user-level skills directory (e.g. ~/.claude/skills/
   for Claude Code, ~/.codex/skills/ for Codex).
3. Verify that SKILL.md is present.
4. Confirm the install path when done.
Switch variant
OVERVIEW

qwen-2-edit-image targets the sweet spot of quality and cost within the Qwen 2 family.

  • Pay-per-call pricing in USD
  • Failed generations not charged
  • Streaming when supported by the model
  • Schema-validated tool calls
PRICING

Pricing

Failed generations are not charged
Edit image
$0.04 / image
SPEC SHEET

Technical details

Model ID qwen-2-edit-image
Provider Alibaba
Modality image
Task type asynchronous
Billing unit call
API endpoint /api/v1/qwen_2/edit_image
Commercial license Yes — included via API
Status Operational
QUICKSTART

Quickstart — qwen-2-edit-image

runapi.ai
curl -X POST https://runapi.ai/api/v1/qwen_2/edit_image \
  -H "Authorization: Bearer $RUNAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen-2-edit-image",
  "image_url": "https://cdn.runapi.ai/public/samples/image.jpg",
  "prompt": "Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk."
}'
import { Qwen2Client } from "@runapi.ai/qwen-2";

const client = new Qwen2Client();
const result = await client.editImage.run({
    model: "qwen-2-edit-image",
    image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
    prompt: "Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk.",
});
require "runapi/qwen_2"

client = RunApi::Qwen2::Client.new
result = client.edit_image.run(
    model: "qwen-2-edit-image",
    image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
    prompt: "Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk."
)
@runapi.ai/qwen-2 v1
HOW IT WORKS

Use qwen-2-edit-image in four steps

01

Install

Install the model SDK or agent skill for this model line.

02

Configure

Set the model field to the full model ID shown on this page.

03

Call

Send a typed request with your prompt, inputs, and callback settings.

04

Receive

Read the task response, webhook callback, or cached output URL from RunAPI.

DIFFERENCES

What's different about qwen-2-edit-image

VS QWEN-2-REMIX-IMAGE

Targeted region editing from text instructions

Prompt-guided image remix from a source image

VS QWEN-2-TEXT-TO-IMAGE

Targeted region editing from text instructions

Qwen2 text-to-image with 5 aspect ratios

USE CASES

Best for

Product photography

Auto-generate lifestyle product photos for e-commerce catalogs that lack studio photography.

Game & concept art

Rapidly concept environments and characters before committing to final art.

Editorial illustration

Generate unique cover art and illustrations for blog posts and articles at scale.

FAQ

Frequently asked questions about qwen-2-edit-image

Is the model ID stable across versions?

RunAPI keeps the model ID stable and handles compatible version refreshes without changing your request shape.

What's the rate limit on this variant?

Per-key rate limits scale with usage tier. See pricing page for current limits.

Can I switch variants later?

Yes — variant is a flag. Switch by changing the model parameter.

Does it stream?

Where streaming is available, RunAPI streams end-to-end.

Where do I report quality issues?

Open an issue on the public GitHub repo or email support.

START NOW

Start building with Qwen 2.