MarketSupport← Back to app

Qwen

Qwen models are called through one unified, asynchronous job API. Start a task with POST /api/generate, then poll GET /api/generate/{taskId} until it finishes. This family exposes 9 endpoints.

Overview

Every endpoint shares the same envelope — only model and the input fields change. Run any from the Models Market playground.

Qwen Image 3.0
Supports complex layouts, accurate typography, multilingual visuals, and realistic material detail. Standard text/image-to-image costs 5.04 credits per image at 1K/2K; Pro costs 6.72 credits at 1K and 12.6 at 2K. Image inputs cost 0.53 credits each, up to 3 images.

Authentication

Create an API key at /api-keys, then send it as a Bearer token. Requests from the browser while logged in also work via the session cookie.

Authorization: Bearer <YOUR_API_KEY>

Create Task

POST
POST https://api.lithovas.com/api/generate

Body: { "model": "<slug>", "input": { … } }

Response: { "taskId": "<id>", "state": "waiting" }

Query Result

GET
GET https://api.lithovas.com/api/generate/<taskId>

Response: { "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }

Asynchronous
A 200 from Create Task only means the task was accepted — not finished. Poll this endpoint until state becomes success or fail. Failed tasks are not billed.

Endpoints

ModelTaskmodel slug
QwenText to Imageqwen/text-to-image
QwenImage to Imageqwen/image-to-image
Image EditImage Editingqwen/image-edit
Image EditImage Editingqwen2/image-edit
Qwen2Text to Imageqwen2/text-to-image
Qwen Image 3.0Text to Imageqwen3/text-to-image
Qwen Image 3.0Image to Imageqwen3/image-to-image
Qwen Image 3.0 ProText to Imageqwen3/pro-text-to-image
Qwen Image 3.0 ProImage to Imageqwen3/pro-image-to-image

Qwen · Text to Image

POSTText to Imageqwen/text-to-image
input fields
promptstringrequired

The prompt to generate the image with (max 5000 chars)

image_sizeenum<string>optional

Size of the generated image

num_inference_stepsnumberoptional

Number of inference steps (min 2, max 250)

seedintegeroptional

Seed value for reproducible outputs

guidance_scalenumberoptional

CFG scale for prompt adherence (min 0, max 20)

enable_safety_checkerbooleanoptional

Enable safety content filtering

output_formatenum<string>optional

Image output format

negative_promptstringoptional

Negative prompt for generation (max 500 chars)

accelerationenum<string>optional

Speed/quality tradeoff for generation

nsfw_checkerbooleanoptional

Disable content filtering when set to false

Example
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen/text-to-image",
  "input": {
    "prompt": "A cinematic red panda surfing through neon rain at dusk.",
    "image_size": "square_hd",
    "num_inference_steps": 30,
    "seed": 42,
    "guidance_scale": 2.5,
    "enable_safety_checker": false,
    "output_format": "png",
    "negative_prompt": "example",
    "acceleration": "none",
    "nsfw_checker": false
  }
}'

Qwen · Image to Image

POSTImage to Imageqwen/image-to-image
input fields
promptstringrequired

Text prompt to guide image generation (max 5000 chars)

image_urlstringrequired

Reference image URL to guide generation (max 10MB)

strengthnumberoptional

Denoising strength: 1.0 fully remakes, 0.0 preserves original

output_formatenum<string>optional

Output image format

accelerationenum<string>optional

Speed vs quality tradeoff for generation

negative_promptstringoptional

What to exclude from generation (max 500 chars)

seedintegeroptional

Fixed seed produces consistent results with same prompt

num_inference_stepsnumberoptional

Generation iterations (2-250 steps)

guidance_scalenumberoptional

CFG scale controlling adherence to prompt (0-20)

enable_safety_checkerbooleanoptional

Enable safety content filtering

nsfw_checkerbooleanoptional

Disable content filtering when set to false

Example
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen/image-to-image",
  "input": {
    "prompt": "A cinematic red panda surfing through neon rain at dusk.",
    "image_url": "https://example.com/input.jpg",
    "strength": 0.8,
    "output_format": "png",
    "acceleration": "none",
    "negative_prompt": "example",
    "seed": 42,
    "num_inference_steps": 30,
    "guidance_scale": 2.5,
    "enable_safety_checker": false,
    "nsfw_checker": false
  }
}'

Image Edit · Image Editing

POSTImage Editingqwen/image-edit
input fields
promptstringrequired

The prompt to generate the image with (max 2000 chars)

image_urlstringrequired

URL of image to edit (jpeg/png/webp, max 10MB)

accelerationenum<string>optional

Acceleration level balancing speed and quality

image_sizeenum<string>optional

The size of the generated image

num_inference_stepsnumberoptional

Number of inference steps (min 2, max 49)

seedintegeroptional

Same seed with same prompt outputs identical image

guidance_scalenumberoptional

CFG scale controls prompt adherence (min 0, max 20)

sync_modebooleanoptional

Wait for generation completion before returning response

num_imagesenum<string>optional

Number of images to generate

enable_safety_checkerbooleanoptional

Enable safety checker for content filtering

output_formatenum<string>optional

Format of the generated image

negative_promptstringoptional

Negative prompt for generation (max 500 chars)

nsfw_checkerbooleanoptional

Disable content filtering; returns unfiltered results

Example
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen/image-edit",
  "input": {
    "prompt": "A cinematic red panda surfing through neon rain at dusk.",
    "image_url": "https://example.com/input.jpg",
    "acceleration": "none",
    "image_size": "landscape_4_3",
    "num_inference_steps": 25,
    "seed": 42,
    "guidance_scale": 4,
    "sync_mode": false,
    "num_images": "1",
    "enable_safety_checker": true,
    "output_format": "png",
    "negative_prompt": "example",
    "nsfw_checker": false
  }
}'

Image Edit · Image Editing

POSTImage Editingqwen2/image-edit
input fields
promptstringrequired

Text instruction for image editing (max 800 chars)

image_urlstringrequired

URL of image to edit (JPEG/PNG/WebP, max 10MB)

image_sizeenum<string>optional

Output image aspect ratio

seedintegeroptional

Reproducible generation seed for consistent outputs

output_formatenum<string>optional

Generated image file format

nsfw_checkerbooleanoptional

Enable/disable content filtering on results

Example
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen2/image-edit",
  "input": {
    "prompt": "A cinematic red panda surfing through neon rain at dusk.",
    "image_url": "https://example.com/input.jpg",
    "image_size": "16:9",
    "seed": 42,
    "output_format": "png",
    "nsfw_checker": false
  }
}'

Qwen2 · Text to Image

POSTText to Imageqwen2/text-to-image
input fields
promptstringrequired

The prompt to generate the image with (max 800 chars)

image_sizeenum<string>optional

The size of the generated image

seedintegeroptional

Same seed with same prompt outputs identical image

output_formatenum<string>optional

The format of the generated image

nsfw_checkerbooleanoptional

Disable content filtering when set to false

Example
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen2/text-to-image",
  "input": {
    "prompt": "A cinematic red panda surfing through neon rain at dusk.",
    "image_size": "16:9",
    "seed": 42,
    "output_format": "png",
    "nsfw_checker": false
  }
}'

Qwen Image 3.0 · Text to Image

POSTText to Imageqwen3/text-to-image
input fields
promptstringrequired

Positive prompt in Chinese or English, up to 800 characters.

resolutionenum<string>optional

Output resolution tier.

image_sizeenum<string>optional

Output aspect ratio.

output_formatenum<string>optional

Generated image format.

prompt_extendbooleanoptional

Enable intelligent prompt rewriting.

negative_promptstringoptional

Content that should not appear in the image, up to 5000 characters.

seedintegeroptional

Random seed from 0 to 2147483647.

nsfw_checkerbooleanoptional

Enable content safety checking.

Example
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen3/text-to-image",
  "input": {
    "prompt": "Create a realistic editorial visual with accurate typography, detailed materials, and a clear structured layout.",
    "resolution": "1K",
    "image_size": "16:9",
    "output_format": "png",
    "prompt_extend": true,
    "negative_prompt": "example",
    "seed": 1,
    "nsfw_checker": true
  }
}'

Qwen Image 3.0 · Image to Image

POSTImage to Imageqwen3/image-to-image
input fields
image_urlsarray<string>required

Source image URLs. Supports JPEG, PNG, WEBP, BMP, GIF, and TIFF; up to 3 images, 10 MB each.

promptstringrequired

Positive prompt in Chinese or English, up to 800 characters.

resolutionenum<string>optional

Output resolution tier.

image_sizeenum<string>optional

Output aspect ratio.

output_formatenum<string>optional

Generated image format.

prompt_extendbooleanoptional

Enable intelligent prompt rewriting.

negative_promptstringoptional

Content that should not appear in the image, up to 5000 characters.

seedintegeroptional

Random seed from 0 to 2147483647.

nsfw_checkerbooleanoptional

Enable content safety checking.

Example
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen3/image-to-image",
  "input": {
    "image_urls": [
      "https://example.com/input.jpg"
    ],
    "prompt": "Transform the source image into a polished editorial visual while preserving the subject and composition.",
    "resolution": "1K",
    "image_size": "16:9",
    "output_format": "png",
    "prompt_extend": true,
    "negative_prompt": "example",
    "seed": 1,
    "nsfw_checker": true
  }
}'

Qwen Image 3.0 Pro · Text to Image

POSTText to Imageqwen3/pro-text-to-image
input fields
promptstringrequired

Positive prompt in Chinese or English, up to 800 characters.

resolutionenum<string>optional

Output resolution tier.

image_sizeenum<string>optional

Output aspect ratio.

output_formatenum<string>optional

Generated image format.

prompt_extendbooleanoptional

Enable intelligent prompt rewriting.

negative_promptstringoptional

Content that should not appear in the image, up to 5000 characters.

seedintegeroptional

Random seed from 0 to 2147483647.

nsfw_checkerbooleanoptional

Enable content safety checking.

Example
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen3/pro-text-to-image",
  "input": {
    "prompt": "Create a realistic editorial visual with accurate typography, detailed materials, and a clear structured layout.",
    "resolution": "1K",
    "image_size": "16:9",
    "output_format": "png",
    "prompt_extend": true,
    "negative_prompt": "example",
    "seed": 1,
    "nsfw_checker": true
  }
}'

Qwen Image 3.0 Pro · Image to Image

POSTImage to Imageqwen3/pro-image-to-image
input fields
image_urlsarray<string>required

Source image URLs. Supports JPEG, PNG, WEBP, BMP, GIF, and TIFF; up to 3 images, 10 MB each.

promptstringrequired

Positive prompt in Chinese or English, up to 800 characters.

resolutionenum<string>optional

Output resolution tier.

image_sizeenum<string>optional

Output aspect ratio.

output_formatenum<string>optional

Generated image format.

prompt_extendbooleanoptional

Enable intelligent prompt rewriting.

negative_promptstringoptional

Content that should not appear in the image, up to 5000 characters.

seedintegeroptional

Random seed from 0 to 2147483647.

nsfw_checkerbooleanoptional

Enable content safety checking.

Example
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen3/pro-image-to-image",
  "input": {
    "image_urls": [
      "https://example.com/input.jpg"
    ],
    "prompt": "Transform the source image into a polished editorial visual while preserving the subject and composition.",
    "resolution": "1K",
    "image_size": "16:9",
    "output_format": "png",
    "prompt_extend": true,
    "negative_prompt": "example",
    "seed": 1,
    "nsfw_checker": true
  }
}'