Image · Alibaba

Qwen 2 API

Qwen 2 supports text-to-image and image editing.

Operationeel · 2 variants · vanaf $0.060
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-text-to-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-text-to-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.",
});
<?php

require __DIR__ . "/vendor/autoload.php";

use RunApi\Qwen2\Qwen2Client;

$client = new Qwen2Client();
$result = $client->editImage->run([
        'model' => 'qwen-2-text-to-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-text-to-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."
)
npx skills add runapi-ai/qwen-2 -g
# Claude Code
claude mcp add runapi -s user -- npx -y @runapi.ai/mcp

# Codex
codex plugin install runapi-mcp@agents

# Cursor / Windsurf / VS Code
npx @runapi.ai/mcp init cursor
@runapi.ai/qwen-2 v1
OVERVIEW

Qwen 2 supports text-to-image and image editing.

  • Meerdere varianten voor verschillende snelheid-/kwaliteitsniveaus
  • Modelskill bevat docs, schema's en setupnotities
  • Werkt met appgerichte codeerworkflows
  • Mislukte generaties worden niet in rekening gebracht
VARIANTS

Vergelijk alle API-varianten

Variant Billing From
qwen-2-edit-image call $0.060 Bekijken →
qwen-2-text-to-image call $0.060 Bekijken →
SKILLS

Installeer de Qwen 2 skill voor appontwikkeling

Laad modeldocs, schema's, prijsnotities en setupstappen in je codeworkspace.

# Install the model skill for app development workflows
npx skills add runapi-ai/qwen-2 -g
Installs docs, schemas, pricing context, and setup notes into your developer workspace.
Or use this setup request in your coding tool:
Install the Qwen 2 skill for this app:

1. Add runapi-ai/qwen-2 with the skills installer.
2. Load SKILL.md in this workspace.
3. Use its docs, schemas, pricing notes, and setup steps when adding model features.
4. Confirm the install path when done.
HOE HET WERKT

Van modelskill naar eerste resultaat in vier stappen

01

Kies het model

Kies het model en de variant die passen bij je outputtype, kwaliteitslat en latencydoel.

02

Configureren

Stel je RunAPI-key in en installeer de modelskill in je codeworkspace.

03

Bouwen

Gebruik de skill-instructies om de modelfeature in je applicatie toe te voegen.

04

Ontvangen

Poll op task-ID, stream wanneer ondersteund of verwerk de webhook-callback.

CONTEXT

Wat is de Qwen 2 API?

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
WAAROM RUNAPI

Waarom de Qwen 2 API via RunAPI gebruiken

Eén auth, elke provider

Met één RunAPI-sleutel ontgrendel je de hele catalogus. Geen aparte accounts, geen sleutelrotatie per integratie.

Uniforme prijzen & billing

Prijs per call in USD, maandelijks gefactureerd. Mislukte generaties worden niet in rekening gebracht.

Skill met schema's

Getypeerde schema's en setupnotities zitten in de modelskill, zodat implementatie start vanuit het juiste contract.

FAQ

Veelgestelde vragen

What endpoints does Qwen 2 support?

Qwen 2 supports text-to-image and image editing.

What is the Tongyi Wanxiang foundation?

Tongyi Wanxiang is Alibaba's visual generation platform that powers Qwen 2. It provides the underlying image understanding and generation capabilities.

How does image editing work?

The image-edit endpoint accepts a source image and text instructions, applying targeted modifications to specific regions while preserving the rest of the image.

Does Qwen 2 handle CJK text in images?

Yes — Qwen 2 has strong multilingual text understanding, including Chinese, Japanese, and Korean, for both prompt interpretation and visual content.

How does Qwen 2 compare to Z Image?

Qwen 2 supports text-to-image and image editing.

Met welke variant moet ik beginnen?

Kies de goedkoopste variant die aan je kwaliteitsnorm voldoet. De meeste teams beginnen met de snelle variant en stappen over op pro voor productie.

Is er een gratis tier?

Nieuwe accounts krijgen de eerste calls gratis op elk model. Daarna betaal je per call.

Streamen jullie resultaten?

Waar streaming beschikbaar is, streamt RunAPI end-to-end.

Hoe worden mislukkingen gefactureerd?

Mislukte generations worden niet in rekening gebracht.

Worden outputs gecachet?

Gegenereerde outputs worden opgeslagen en zijn op te vragen via task-ID. Inputs worden niet gecachet.

Mag ik het commercieel gebruiken?

Ja — commercieel gebruik is inbegrepen voor elke variant, tenzij een modellicentie het expliciet beperkt. Dat staat aangegeven op de variantpagina.

Hoe zit het met rate limits?

Rate limits per key schalen mee met je usage tier. Zie de prijzenpagina voor de actuele limieten.

Waar kan ik problemen melden?

Open een issue in de publieke GitHub-repo of mail support.

VERGELIJKBARE MODELLEN

Als je de Qwen 2 API goed vindt, probeer deze dan eens

NU BEGINNEN

Begin met bouwen met de Qwen 2 API.