YepAPI
AI Models

Qwen Image 2.1 Pro

Qwen Image 2.1 Pro. Higher-quality AI image generation and editing from Qwen.

POST/v1/media/queue
from $0.10/image

Overview

Higher-quality image generation and editing via Qwen Image 2.1 Pro, the quality tier of the Qwen Image 2.1 series. Async operation — submit a job, poll for completion.

PropertyValue
Model IDqwen/qwen-image-2.1-pro
Aliasqwen-image-2-1-pro
ProviderQwen
CategoryImage Generation
Output Formatspng
Reference ImagesSupported
BillingDynamic (actual cost per job)
Typical Cost~$0.10 per image

Usage

All media models use the async job queue. Submit a job, then poll for the result.

Step 1: Submit Job

Text-to-Image

const res = await fetch('https://api.yepapi.com/v1/media/queue', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: 'qwen/qwen-image-2.1-pro',
    prompt: 'A ceramicist\'s studio at golden hour with shelves of unglazed bowls',
  }),
});
const { data } = await res.json();
// data.jobId — use this to poll for results
curl -X POST https://api.yepapi.com/v1/media/queue \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "qwen/qwen-image-2.1-pro", "prompt": "A ceramicist'\''s studio at golden hour with shelves of unglazed bowls"}'

Image-to-Image (Edit / Transform)

Pass a reference image via imageData alongside your prompt to edit or transform an existing image.

const res = await fetch('https://api.yepapi.com/v1/media/queue', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: 'qwen/qwen-image-2.1-pro',
    prompt: 'Make the sky purple and add northern lights',
    imageData: {
      mimeType: 'image/png',
      base64: '...', // Base64-encoded image
    },
  }),
});

Step 2: Poll for Result

const status = await fetch(`https://api.yepapi.com/v1/media/status/${data.jobId}`, {
  headers: { 'x-api-key': 'YOUR_API_KEY' },
});
const { data: job } = await status.json();
// job.status — "pending" | "processing" | "completed" | "failed"
// job.result.image — { mimeType, base64 } when completed
curl https://api.yepapi.com/v1/media/status/JOB_ID \
  -H "x-api-key: YOUR_API_KEY"

Request Body

ParameterTypeRequiredDescriptionDefault
modelstringYesqwen/qwen-image-2.1-pro or alias qwen-image-2-1-pro—
promptstringYesText description of the image to generate or edit—
options.outputFormatstringNopngpng
imageData.mimeTypestringNoMIME type of input image (image/png, image/jpeg, image/webp)—
imageData.base64stringNoBase64-encoded input image for image-to-image editing—

Features

  • Higher-quality tier of the Qwen Image 2.1 series
  • Text-to-image generation
  • Reference-image editing via imageData
  • PNG output

Pricing

Billing is dynamic — each job is billed from the actual cost of that generation.

MetricCost
Typical cost per image~$0.10
Info

Image jobs typically complete in 5–60 seconds. Results retained for 1 hour.

Under the Hood

Powered by Qwen's Qwen Image 2.1 Pro via our AI provider.

On this page