Qwen
Qwen モデルは統一された非同期ジョブ API で呼び出します。POST /api/generate でタスクを開始し、完了するまで GET /api/generate/{taskId} をポーリングします。このファミリーは 9 個のエンドポイントを提供します。
概要
すべてのエンドポイントは同じ外枠を共有し、変わるのは model と input フィールドだけです。モデルマーケットの playground から任意に実行できます。
認証
/api-keys で API キーを作成し、Bearer トークンとして送信します。ログイン中のブラウザからのリクエストはセッション cookie 経由でも動作します。
Authorization: Bearer <YOUR_API_KEY>タスクの作成
POST https://api.lithovas.com/api/generateボディ:{ "model": "<slug>", "input": { … } }
レスポンス:{ "taskId": "<id>", "state": "waiting" }
結果の照会
GET https://api.lithovas.com/api/generate/<taskId>レスポンス:{ "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }
state が success または fail になるまでこのエンドポイントをポーリングしてください。失敗したタスクは課金されません。エンドポイント
| モデル | タスク | 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-imagepromptstring必須The prompt to generate the image with (max 5000 chars)
image_sizeenum<string>任意Size of the generated image
num_inference_stepsnumber任意Number of inference steps (min 2, max 250)
seedinteger任意Seed value for reproducible outputs
guidance_scalenumber任意CFG scale for prompt adherence (min 0, max 20)
enable_safety_checkerboolean任意Enable safety content filtering
output_formatenum<string>任意Image output format
negative_promptstring任意Negative prompt for generation (max 500 chars)
accelerationenum<string>任意Speed/quality tradeoff for generation
nsfw_checkerboolean任意Disable 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-imagepromptstring必須Text prompt to guide image generation (max 5000 chars)
image_urlstring必須Reference image URL to guide generation (max 10MB)
strengthnumber任意Denoising strength: 1.0 fully remakes, 0.0 preserves original
output_formatenum<string>任意Output image format
accelerationenum<string>任意Speed vs quality tradeoff for generation
negative_promptstring任意What to exclude from generation (max 500 chars)
seedinteger任意Fixed seed produces consistent results with same prompt
num_inference_stepsnumber任意Generation iterations (2-250 steps)
guidance_scalenumber任意CFG scale controlling adherence to prompt (0-20)
enable_safety_checkerboolean任意Enable safety content filtering
nsfw_checkerboolean任意Disable 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-editpromptstring必須The prompt to generate the image with (max 2000 chars)
image_urlstring必須URL of image to edit (jpeg/png/webp, max 10MB)
accelerationenum<string>任意Acceleration level balancing speed and quality
image_sizeenum<string>任意The size of the generated image
num_inference_stepsnumber任意Number of inference steps (min 2, max 49)
seedinteger任意Same seed with same prompt outputs identical image
guidance_scalenumber任意CFG scale controls prompt adherence (min 0, max 20)
sync_modeboolean任意Wait for generation completion before returning response
num_imagesenum<string>任意Number of images to generate
enable_safety_checkerboolean任意Enable safety checker for content filtering
output_formatenum<string>任意Format of the generated image
negative_promptstring任意Negative prompt for generation (max 500 chars)
nsfw_checkerboolean任意Disable 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-editpromptstring必須Text instruction for image editing (max 800 chars)
image_urlstring必須URL of image to edit (JPEG/PNG/WebP, max 10MB)
image_sizeenum<string>任意Output image aspect ratio
seedinteger任意Reproducible generation seed for consistent outputs
output_formatenum<string>任意Generated image file format
nsfw_checkerboolean任意Enable/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-imagepromptstring必須The prompt to generate the image with (max 800 chars)
image_sizeenum<string>任意The size of the generated image
seedinteger任意Same seed with same prompt outputs identical image
output_formatenum<string>任意The format of the generated image
nsfw_checkerboolean任意Disable 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-imagepromptstring必須Positive prompt in Chinese or English, up to 800 characters.
resolutionenum<string>任意Output resolution tier.
image_sizeenum<string>任意Output aspect ratio.
output_formatenum<string>任意Generated image format.
prompt_extendboolean任意Enable intelligent prompt rewriting.
negative_promptstring任意Content that should not appear in the image, up to 5000 characters.
seedinteger任意Random seed from 0 to 2147483647.
nsfw_checkerboolean任意Enable 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>必須Source image URLs. Supports JPEG, PNG, WEBP, BMP, GIF, and TIFF; up to 3 images, 10 MB each.
promptstring必須Positive prompt in Chinese or English, up to 800 characters.
resolutionenum<string>任意Output resolution tier.
image_sizeenum<string>任意Output aspect ratio.
output_formatenum<string>任意Generated image format.
prompt_extendboolean任意Enable intelligent prompt rewriting.
negative_promptstring任意Content that should not appear in the image, up to 5000 characters.
seedinteger任意Random seed from 0 to 2147483647.
nsfw_checkerboolean任意Enable 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-imagepromptstring必須Positive prompt in Chinese or English, up to 800 characters.
resolutionenum<string>任意Output resolution tier.
image_sizeenum<string>任意Output aspect ratio.
output_formatenum<string>任意Generated image format.
prompt_extendboolean任意Enable intelligent prompt rewriting.
negative_promptstring任意Content that should not appear in the image, up to 5000 characters.
seedinteger任意Random seed from 0 to 2147483647.
nsfw_checkerboolean任意Enable 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>必須Source image URLs. Supports JPEG, PNG, WEBP, BMP, GIF, and TIFF; up to 3 images, 10 MB each.
promptstring必須Positive prompt in Chinese or English, up to 800 characters.
resolutionenum<string>任意Output resolution tier.
image_sizeenum<string>任意Output aspect ratio.
output_formatenum<string>任意Generated image format.
prompt_extendboolean任意Enable intelligent prompt rewriting.
negative_promptstring任意Content that should not appear in the image, up to 5000 characters.
seedinteger任意Random seed from 0 to 2147483647.
nsfw_checkerboolean任意Enable 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
}
}'