Qwen Image 3.0 Pro API
Alibaba Qwen を搭載した Qwen Image 3.0 Standard および Pro モデルの完全な API リファレンスです。
モデルバリエーション {#}
この API は、4 つのモデルバリエーションに対応しています。
クイック比較
対応アスペクト比
4 つのモデルはすべて、以下のアスペクト比に対応しています。
16:9、9:16、1:1、4:3、3:4、3:2、2:3
エンドポイント
POST /api/v1/image/task
認証
Authorization: Bearer YOUR_API_KEY
テキスト画像生成
Standard モデルには qwen-image-3.0、Pro モデルには qwen-image-3.0-pro を使用します。
リクエストパラメータ
必須
横幅と高さの比率は、16:9、9:16、1:1、4:3、3:4、3:2、2:3 のいずれかである必要があります。
任意
Standard リクエスト例
const response = await fetch('https://api.flaq.ai/api/v1/image/task', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model_name: 'qwen-image-3.0',
prompt: 'A professional product photo with soft studio lighting',
width: 16,
height: 9,
resolution: '1k',
seed: 42
})
});
const { data } = await response.json();
const taskId = data.task_id;
Pro リクエスト例
const response = await fetch('https://api.flaq.ai/api/v1/image/task', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model_name: 'qwen-image-3.0-pro',
prompt: 'A detailed editorial product scene with precise typography and cinematic lighting',
width: 16,
height: 9,
resolution: '2k',
seed: 42
})
});
const { data } = await response.json();
const taskId = data.task_id;
画像編集
Standard Edit モデルには qwen-image-3.0-edit、Pro Edit モデルには qwen-image-3.0-pro-edit を使用します。
リクエストパラメータ
必須
横幅と高さの比率は、16:9、9:16、1:1、4:3、3:4、3:2、2:3 のいずれかである必要があります。
任意
Standard Edit リクエスト例
const response = await fetch('https://api.flaq.ai/api/v1/image/task', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model_name: 'qwen-image-3.0-edit',
prompt: 'Transform the input into a polished editorial portrait with soft studio lighting',
width: 16,
height: 9,
resolution: '1k',
image_url_list: ['https://example.com/image1.jpg'],
seed: 42
})
});
const { data } = await response.json();
const taskId = data.task_id;
Pro Edit 複数画像リクエスト例
const response = await fetch('https://api.flaq.ai/api/v1/image/task', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model_name: 'qwen-image-3.0-pro-edit',
prompt: 'Combine the products from these references into one cohesive campaign image',
width: 16,
height: 9,
resolution: '2k',
image_url_list: [
'https://example.com/image1.jpg',
'https://example.com/image2.jpg',
'https://example.com/image3.jpg'
],
seed: 42
})
});
const { data } = await response.json();
const taskId = data.task_id;
レスポンス形式
初期レスポンス
すべてのモデルは、ポーリング用の task_id を返します。
{
"code": 0,
"data": {
"task_id": "{task_id}",
"task_status": "submitted",
"response_url": "https://api.flaq.ai/api/v1/image/{task_id}"
},
"message": "success"
}
ポーリングレスポンス
タスクのステータスを確認するには、GET /api/v1/image/{task_id} をポーリングします。
{
"code": 0,
"data": {
"task_id": "{task_id}",
"task_status": "succeed",
"task_status_msg": null,
"response_url": "https://api.flaq.ai/api/v1/image/{task_id}",
"task_result": {
"credit": 0.0997,
"images": [
{
"url": "https://example.com/generated-image.jpeg"
}
]
}
},
"message": "success"
}
ステータス値
submitted:タスクが受け付けられました
processing:生成処理中です
succeed:生成が正常に完了しました
failed:生成に失敗しました
ベストプラクティス
テキスト画像生成のヒント
- 具体的に記述する:プロンプトに主題、スタイル、ライティング、構図、テキスト要件を含めます。
- 解像度を選択する:必要な出力解像度に応じて
1k または 2k を選択します。
- アスペクト比を選択する:バナーには 16:9、縦型コンテンツには 9:16 など、用途に合った比率を選択します。
- 再現性のためにシードを使用する:再現可能な生成設定が必要な場合は、固定の
seed を設定します。
画像編集のヒント
- 明確に指示する:変更する内容と維持する内容を説明します。
- 複数の入力を意図的に並べる:1~3 枚の画像を指定し、プロンプト内で各参照画像の役割を説明します。
- 出力解像度を選択する:入力画像のサイズとは関係なく、
1k または 2k を選択します。
- 高品質な入力を使用する:鮮明な元画像を使用すると、一般的に編集結果をより細かく制御できます。