Qwen 2
Text-to-image, image remix, and image editing from Alibaba's Qwen visual model family.
# Works with Claude Code, Codex, Gemini CLI, Cursor, and 50+ agents
npx skills add runapi-ai/qwen-2 -g
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.
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
- Les générations échouées ne sont pas facturées
Variantes
Use this model from your agent
# 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.',
});
How to call this model
Install the skill
Add the model skill to your agent or install the SDK package.
Authenticate once
Use your RunAPI key for every supported model.
Send a request
Use the unified schema for the endpoint you need.
Receive output
Poll by task ID or handle the callback when the generation completes.
SDK quickstart
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."
)
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.
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.
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?
Les générations échouées ne sont pas facturées
Can agents use it directly?
Yes. Install the model skill and your agent gets the docs, schema, and examples.