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.
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 https://api.lithovas.com/api/generateCuerpo: { "model": "<slug>", "input": { … } }
Respuesta: { "taskId": "<id>", "state": "waiting" }
Consultar resultado
GET https://api.lithovas.com/api/generate/<taskId>Respuesta: { "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }
state sea success o fail. Las tareas fallidas no se facturan.Endpoints
| Modelo | Tarea | model slug |
|---|---|---|
| Qwen | Text to Image | qwen/text-to-image |
| Qwen | Image to Image | qwen/image-to-image |
| Image Edit | Image Editing | qwen/image-edit |
| Image Edit | Image Editing | qwen2/image-edit |
| Qwen2 | Text to Image | qwen2/text-to-image |
| Qwen Image 3.0 | Text to Image | qwen3/text-to-image |
| Qwen Image 3.0 | Image to Image | qwen3/image-to-image |
| Qwen Image 3.0 Pro | Text to Image | qwen3/pro-text-to-image |
| Qwen Image 3.0 Pro | Image to Image | qwen3/pro-image-to-image |
Qwen · Text to Image
qwen/text-to-imagepromptstringobligatorioThe prompt to generate the image with (max 5000 chars)
image_sizeenum<string>opcionalSize of the generated image
num_inference_stepsnumberopcionalNumber of inference steps (min 2, max 250)
seedintegeropcionalSeed value for reproducible outputs
guidance_scalenumberopcionalCFG scale for prompt adherence (min 0, max 20)
enable_safety_checkerbooleanopcionalEnable safety content filtering
output_formatenum<string>opcionalImage output format
negative_promptstringopcionalNegative prompt for generation (max 500 chars)
accelerationenum<string>opcionalSpeed/quality tradeoff for generation
nsfw_checkerbooleanopcionalDisable content filtering when set to false
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
qwen/image-to-imagepromptstringobligatorioText prompt to guide image generation (max 5000 chars)
image_urlstringobligatorioReference image URL to guide generation (max 10MB)
strengthnumberopcionalDenoising strength: 1.0 fully remakes, 0.0 preserves original
output_formatenum<string>opcionalOutput image format
accelerationenum<string>opcionalSpeed vs quality tradeoff for generation
negative_promptstringopcionalWhat to exclude from generation (max 500 chars)
seedintegeropcionalFixed seed produces consistent results with same prompt
num_inference_stepsnumberopcionalGeneration iterations (2-250 steps)
guidance_scalenumberopcionalCFG scale controlling adherence to prompt (0-20)
enable_safety_checkerbooleanopcionalEnable safety content filtering
nsfw_checkerbooleanopcionalDisable content filtering when set to false
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
qwen/image-editpromptstringobligatorioThe prompt to generate the image with (max 2000 chars)
image_urlstringobligatorioURL of image to edit (jpeg/png/webp, max 10MB)
accelerationenum<string>opcionalAcceleration level balancing speed and quality
image_sizeenum<string>opcionalThe size of the generated image
num_inference_stepsnumberopcionalNumber of inference steps (min 2, max 49)
seedintegeropcionalSame seed with same prompt outputs identical image
guidance_scalenumberopcionalCFG scale controls prompt adherence (min 0, max 20)
sync_modebooleanopcionalWait for generation completion before returning response
num_imagesenum<string>opcionalNumber of images to generate
enable_safety_checkerbooleanopcionalEnable safety checker for content filtering
output_formatenum<string>opcionalFormat of the generated image
negative_promptstringopcionalNegative prompt for generation (max 500 chars)
nsfw_checkerbooleanopcionalDisable content filtering; returns unfiltered results
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
qwen2/image-editpromptstringobligatorioText instruction for image editing (max 800 chars)
image_urlstringobligatorioURL of image to edit (JPEG/PNG/WebP, max 10MB)
image_sizeenum<string>opcionalOutput image aspect ratio
seedintegeropcionalReproducible generation seed for consistent outputs
output_formatenum<string>opcionalGenerated image file format
nsfw_checkerbooleanopcionalEnable/disable content filtering on results
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
qwen2/text-to-imagepromptstringobligatorioThe prompt to generate the image with (max 800 chars)
image_sizeenum<string>opcionalThe size of the generated image
seedintegeropcionalSame seed with same prompt outputs identical image
output_formatenum<string>opcionalThe format of the generated image
nsfw_checkerbooleanopcionalDisable content filtering when set to false
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
qwen3/text-to-imagepromptstringobligatorioPositive prompt in Chinese or English, up to 800 characters.
resolutionenum<string>opcionalOutput resolution tier.
image_sizeenum<string>opcionalOutput aspect ratio.
output_formatenum<string>opcionalGenerated image format.
prompt_extendbooleanopcionalEnable intelligent prompt rewriting.
negative_promptstringopcionalContent that should not appear in the image, up to 5000 characters.
seedintegeropcionalRandom seed from 0 to 2147483647.
nsfw_checkerbooleanopcionalEnable content safety checking.
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
qwen3/image-to-imageimage_urlsarray<string>obligatorioSource image URLs. Supports JPEG, PNG, WEBP, BMP, GIF, and TIFF; up to 3 images, 10 MB each.
promptstringobligatorioPositive prompt in Chinese or English, up to 800 characters.
resolutionenum<string>opcionalOutput resolution tier.
image_sizeenum<string>opcionalOutput aspect ratio.
output_formatenum<string>opcionalGenerated image format.
prompt_extendbooleanopcionalEnable intelligent prompt rewriting.
negative_promptstringopcionalContent that should not appear in the image, up to 5000 characters.
seedintegeropcionalRandom seed from 0 to 2147483647.
nsfw_checkerbooleanopcionalEnable content safety checking.
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
qwen3/pro-text-to-imagepromptstringobligatorioPositive prompt in Chinese or English, up to 800 characters.
resolutionenum<string>opcionalOutput resolution tier.
image_sizeenum<string>opcionalOutput aspect ratio.
output_formatenum<string>opcionalGenerated image format.
prompt_extendbooleanopcionalEnable intelligent prompt rewriting.
negative_promptstringopcionalContent that should not appear in the image, up to 5000 characters.
seedintegeropcionalRandom seed from 0 to 2147483647.
nsfw_checkerbooleanopcionalEnable content safety checking.
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
qwen3/pro-image-to-imageimage_urlsarray<string>obligatorioSource image URLs. Supports JPEG, PNG, WEBP, BMP, GIF, and TIFF; up to 3 images, 10 MB each.
promptstringobligatorioPositive prompt in Chinese or English, up to 800 characters.
resolutionenum<string>opcionalOutput resolution tier.
image_sizeenum<string>opcionalOutput aspect ratio.
output_formatenum<string>opcionalGenerated image format.
prompt_extendbooleanopcionalEnable intelligent prompt rewriting.
negative_promptstringopcionalContent that should not appear in the image, up to 5000 characters.
seedintegeropcionalRandom seed from 0 to 2147483647.
nsfw_checkerbooleanopcionalEnable content safety checking.
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
}
}'