MercadoSoporte← Volver a la app

Qwen

Los modelos de Qwen se llaman a través de una API de trabajos asíncrona y unificada. Inicia una tarea con POST /api/generate y luego sondea GET /api/generate/{taskId} hasta que termine. Esta familia expone 9 endpoints.

Resumen

Todos los endpoints comparten la misma envoltura — solo cambian model y los campos input. Ejecuta cualquiera desde el playground del Mercado de modelos.

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.

Autenticación

Crea una API key en /api-keys y luego envíala como token Bearer. Las solicitudes desde el navegador con sesión iniciada también funcionan mediante la cookie de sesión.

Authorization: Bearer <YOUR_API_KEY>

Crear tarea

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

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

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

Consultar resultado

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

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

Asíncrono
Un 200 de Crear tarea solo significa que la tarea fue aceptada — no que haya terminado. Sondea este endpoint hasta que state sea success o fail. Las tareas fallidas no se facturan.

Endpoints

ModeloTareamodel 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
campos input
promptstringobligatorio

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

image_sizeenum<string>opcional

Size of the generated image

num_inference_stepsnumberopcional

Number of inference steps (min 2, max 250)

seedintegeropcional

Seed value for reproducible outputs

guidance_scalenumberopcional

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

enable_safety_checkerbooleanopcional

Enable safety content filtering

output_formatenum<string>opcional

Image output format

negative_promptstringopcional

Negative prompt for generation (max 500 chars)

accelerationenum<string>opcional

Speed/quality tradeoff for generation

nsfw_checkerbooleanopcional

Disable content filtering when set to false

Ejemplo
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
campos input
promptstringobligatorio

Text prompt to guide image generation (max 5000 chars)

image_urlstringobligatorio

Reference image URL to guide generation (max 10MB)

strengthnumberopcional

Denoising strength: 1.0 fully remakes, 0.0 preserves original

output_formatenum<string>opcional

Output image format

accelerationenum<string>opcional

Speed vs quality tradeoff for generation

negative_promptstringopcional

What to exclude from generation (max 500 chars)

seedintegeropcional

Fixed seed produces consistent results with same prompt

num_inference_stepsnumberopcional

Generation iterations (2-250 steps)

guidance_scalenumberopcional

CFG scale controlling adherence to prompt (0-20)

enable_safety_checkerbooleanopcional

Enable safety content filtering

nsfw_checkerbooleanopcional

Disable content filtering when set to false

Ejemplo
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
campos input
promptstringobligatorio

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

image_urlstringobligatorio

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

accelerationenum<string>opcional

Acceleration level balancing speed and quality

image_sizeenum<string>opcional

The size of the generated image

num_inference_stepsnumberopcional

Number of inference steps (min 2, max 49)

seedintegeropcional

Same seed with same prompt outputs identical image

guidance_scalenumberopcional

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

sync_modebooleanopcional

Wait for generation completion before returning response

num_imagesenum<string>opcional

Number of images to generate

enable_safety_checkerbooleanopcional

Enable safety checker for content filtering

output_formatenum<string>opcional

Format of the generated image

negative_promptstringopcional

Negative prompt for generation (max 500 chars)

nsfw_checkerbooleanopcional

Disable content filtering; returns unfiltered results

Ejemplo
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
campos input
promptstringobligatorio

Text instruction for image editing (max 800 chars)

image_urlstringobligatorio

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

image_sizeenum<string>opcional

Output image aspect ratio

seedintegeropcional

Reproducible generation seed for consistent outputs

output_formatenum<string>opcional

Generated image file format

nsfw_checkerbooleanopcional

Enable/disable content filtering on results

Ejemplo
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
campos input
promptstringobligatorio

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

image_sizeenum<string>opcional

The size of the generated image

seedintegeropcional

Same seed with same prompt outputs identical image

output_formatenum<string>opcional

The format of the generated image

nsfw_checkerbooleanopcional

Disable content filtering when set to false

Ejemplo
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
campos input
promptstringobligatorio

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

resolutionenum<string>opcional

Output resolution tier.

image_sizeenum<string>opcional

Output aspect ratio.

output_formatenum<string>opcional

Generated image format.

prompt_extendbooleanopcional

Enable intelligent prompt rewriting.

negative_promptstringopcional

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

seedintegeropcional

Random seed from 0 to 2147483647.

nsfw_checkerbooleanopcional

Enable content safety checking.

Ejemplo
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
campos input
image_urlsarray<string>obligatorio

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

promptstringobligatorio

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

resolutionenum<string>opcional

Output resolution tier.

image_sizeenum<string>opcional

Output aspect ratio.

output_formatenum<string>opcional

Generated image format.

prompt_extendbooleanopcional

Enable intelligent prompt rewriting.

negative_promptstringopcional

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

seedintegeropcional

Random seed from 0 to 2147483647.

nsfw_checkerbooleanopcional

Enable content safety checking.

Ejemplo
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
campos input
promptstringobligatorio

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

resolutionenum<string>opcional

Output resolution tier.

image_sizeenum<string>opcional

Output aspect ratio.

output_formatenum<string>opcional

Generated image format.

prompt_extendbooleanopcional

Enable intelligent prompt rewriting.

negative_promptstringopcional

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

seedintegeropcional

Random seed from 0 to 2147483647.

nsfw_checkerbooleanopcional

Enable content safety checking.

Ejemplo
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
campos input
image_urlsarray<string>obligatorio

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

promptstringobligatorio

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

resolutionenum<string>opcional

Output resolution tier.

image_sizeenum<string>opcional

Output aspect ratio.

output_formatenum<string>opcional

Generated image format.

prompt_extendbooleanopcional

Enable intelligent prompt rewriting.

negative_promptstringopcional

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

seedintegeropcional

Random seed from 0 to 2147483647.

nsfw_checkerbooleanopcional

Enable content safety checking.

Ejemplo
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
  }
}'