---
title: "Qwen 2 API — All variants, pricing, code samples | RunAPI"
url: "https://runapi.ai/models/qwen-2.md"
canonical: "https://runapi.ai/models/qwen-2.md"
locale: "en"
model: "Qwen 2"
provider: "Alibaba"
modality: "image"
variant_count: 3
price_from_cents: 4
---

# Qwen 2

Text-to-image, image-to-image, and image editing from Alibaba&#39;s Qwen visual model family.

**Provider:** Alibaba
**Modality:** Image
**Catalog:** 3 variants

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

## Variants

| Version | Variant | Pricing | Billing | URL |
|---|---|---|---|---|
| qwen-2-image-edit | `image-edit` | $0.040 | call | https://runapi.ai/models/qwen-2/image-edit.md |
| qwen-2-image-to-image | `image-to-image` | $0.040 | call | https://runapi.ai/models/qwen-2/image-to-image.md |
| qwen-2-text-to-image | `text-to-image` | $0.040 | call | https://runapi.ai/models/qwen-2/text-to-image.md |


## Install

```sh
npm install @runapi.ai/qwen-2
# or
gem install runapi-qwen_2
```

## Quickstart

```sh
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-image-edit", "prompt": "..." }'
```

## Context

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

## FAQ

### Which variant should I start with?

Pick the cheapest variant that meets your quality bar. Most teams start on the fast variant and graduate to pro for production.

### Is there a free tier?

New accounts get free first calls on every model. After that, pay per call.

### Do you stream results?

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

### How are failures billed?

Failed generations are not charged.

### Are outputs cached?

Generated outputs are stored and retrievable by task ID. Inputs are not cached.

### Can I use commercially?

Yes — commercial use is included for every variant unless a model license explicitly restricts it, which is called out on the variant page.

### What about rate limits?

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

### Where can I report issues?

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

