Seedream 5.5 API
ByteDance Seedream 5.5 系列模型的完整 API 參考文件。
模型版本
此 API 支援以下兩個模型版本:
快速比較
支援的長寬比
16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 21:9
Seedream 5.5(文字生成影像)
端點
POST /api/v1/image/task
請求參數
必填參數
注意: 長寬比必須為下列值之一: 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 21:9
選填參數
請求範例
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: 'seedream-v5.5',
prompt: 'Editorial fashion portrait, soft window light, muted palette',
resolution: '1.5k',
width: 16,
height: 9,
background: 'auto'
})
});
const { data } = await response.json();
const taskId = data.task_id;
Seedream 5.5 Edit(影像編輯)
端點
POST /api/v1/image/task
請求參數
必填參數
注意: 長寬比必須為下列值之一: 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 21:9
選填參數
請求範例
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: 'seedream-v5.5-edit',
prompt: 'Change the hairstyle',
image_url_list: [
'https://img.bestimage.ai/test/2026/7/1/ad8e011a-3e9b-49f0-9397-282bf51e2e45_162640331.jpeg'
],
resolution: '1.5k',
width: 16,
height: 9,
background: 'auto'
})
});
const { data } = await response.json();
const taskId = data.task_id;
單張影像編輯範例
{
model_name: 'seedream-v5.5-edit',
image_url_list: ['https://img.bestimage.ai/test/2026/7/1/ad8e011a-3e9b-49f0-9397-282bf51e2e45_162640331.jpeg'],
prompt: 'Change the hairstyle',
resolution: '1.5k',
width: 16,
height: 9,
background: 'auto'
}
多張影像編輯範例
{
model_name: 'seedream-v5.5-edit',
image_url_list: [
'https://example.com/image1.jpg',
'https://example.com/image2.jpg'
],
prompt: 'Blend these images into a cohesive composition',
resolution: '1.5k',
width: 16,
height: 9,
background: 'auto'
}
回應格式
初始回應
{
"code": 0,
"message": "success",
"data": {
"task_id": "0ca5f379-327b-4d49-ba19-e38782ceb2f0",
"response_url": "https://api.flaq.ai/api/v1/image/0ca5f379-327b-4d49-ba19-e38782ceb2f0",
"task_status": "submitted"
}
}
輪詢回應
輪詢 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": 200,
"images": [
{
"url": "https://example.com/generated-image.png"
}
]
}
},
"message": "success"
}
錯誤回應
{
"code": 1201,
"message": "[width, height] Invalid parameter (e.g. wrong key or value)",
"data": null
}
狀態值
submitted: 任務已受理
processing: 正在生成影像
succeed: 影像生成完成
failed: 影像生成失敗
處理時間
持續輪詢,直到任務狀態為 succeed 或 failed。已提交或處理中的任務可能尚未傳回影像結果。
最佳實務
- 詳細的提示詞:提示詞描述越具體,生成效果越好
- 長寬比:生成前,請依影像用途選擇合適的比例
- 影像編輯品質:編輯時,請使用解析度高、光線充足的原始影像