Image · Alibaba

Qwen 2

Text-to-image, image remix, and image editing from Alibaba's Qwen visual model family.

Operational · 3 variants · desde $0.040
# 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.
RESUMEN

Qwen 2 is Alibaba's visual generation model supporting text-to-image, image remix, and image editing. Built on the Tongyi Wanxiang foundation, it delivers detailed outputs with strong language-to-visual alignment.

  • Installable agent skill
  • Unified API key
  • SDK examples included
  • Las generaciones fallidas no se cobran
VARIANTES

Variantes

Variant Billing From
qwen-2-edit-image call $0.040 Ver →
qwen-2-remix-image call $0.040 Ver →
qwen-2-text-to-image call $0.060 Ver →
AGENT USAGE

Use this model from your agent

Prompt + SDK example
# User prompt to the agent
"Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk."
// Code generated by the agent via @runapi.ai/qwen-2
import { Qwen2Client } from '@runapi.ai/qwen-2';

const client = new Qwen2Client();
const result = await client.editImage.run({
  model: 'qwen-2-edit-image',
  prompt: 'Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk.',
});
@runapi.ai/qwen-2 npm
CÓMO FUNCIONA

How to call this model

01

Install the skill

Add the model skill to your agent or install the SDK package.

02

Authenticate once

Use your RunAPI key for every supported model.

03

Send a request

Use the unified schema for the endpoint you need.

04

Receive output

Poll by task ID or handle the callback when the generation completes.

SDK QUICKSTART

SDK quickstart

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
CONTEXTO

Where Qwen 2 fits

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.

Provider
Alibaba
Modality
Image
POR QUÉ RUNAPI

Why use Qwen 2 through RunAPI

One API key

Use the same credentials across models and providers.

Agent-ready

Installable skills include docs and schema for tool calls.

Predictable billing

Usage-based pricing is visible before you call.

FAQ

Frequently asked questions

How do I call this model?

Use the RunAPI SDK, CLI, or REST endpoint shown on this page.

Do failed generations cost money?

Las generaciones fallidas no se cobran

Can agents use it directly?

Yes. Install the model skill and your agent gets the docs, schema, and examples.

EMPEZAR

Start building with Qwen 2.