跳轉到主要內容
POST
/
v1
/
tasks
curl -X POST https://qingbo.dev/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5.0",
    "action": "generate",
    "prompt": "一只柴犬穿宇航服站在月球上",
    "size": "16:9",
    "resolution": "2K",
    "watermark": false
  }'
{
  "task_id": "task-wave1775285160b950328499",
  "model": "seedream-5.0",
  "action": "generate",
  "status": "queued",
  "created_at": 1775285160040,
  "progress": 0
}
非同步處理模式 — 提交請求後回傳任務 ID,透過 查詢任務狀態 介面取得生成結果。圖片連結有效期 24 小時,請及時儲存。
curl -X POST https://qingbo.dev/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5.0",
    "action": "generate",
    "prompt": "一只柴犬穿宇航服站在月球上",
    "size": "16:9",
    "resolution": "2K",
    "watermark": false
  }'
{
  "task_id": "task-wave1775285160b950328499",
  "model": "seedream-5.0",
  "action": "generate",
  "status": "queued",
  "created_at": 1775285160040,
  "progress": 0
}

可用模型

模型 ID說明
seedream-5.0Seedream 5.0,支援組圖、聯網搜尋、串流輸出
seedream-4.5Seedream 4.5,支援組圖、4K 解析度
seedream-4.0Seedream 4.0,支援組圖、1K~4K 解析度

統一參數

model
string
必填
模型組名稱:seedream-5.0seedream-4.5seedream-4.0
action
string
預設值:"generate"
操作類型
prompt
string
必填
文字提示詞,支援中英文,建議不超過 300 個漢字
image_urls
string[]
參考圖片 URL 陣列,最多 14 張,每張不超過 10MB
size
string
預設值:"1:1"
寬高比:1:12:33:23:44:39:1616:921:9
resolution
string
預設值:"2K"
解析度,可選值取決於模型,見各模型 Tab
n
integer
預設值:"1"
生成數量,大於 1 時啟用組圖模式
watermark
boolean
預設值:"true"
是否新增浮水印
callback_url
string
任務完成時的 Webhook 回呼位址
extra
object
透傳給上游的額外參數,詳見各模型 Tab

模型特定參數

resolution 可選值: 2K3Ksize 額外支援: 4:55:4
extra.output_format
string
預設值:"jpeg"
輸出圖片格式:pngjpeg
extra.response_format
string
預設值:"url"
回傳格式:url(下載連結)或 b64_json(Base64)
extra.stream
boolean
預設值:"false"
串流輸出,即時回傳每張圖片結果
extra.optimize_prompt_options
object
提示詞最佳化配置
extra.tools
array
模型工具,支援聯網搜尋提升時效性
"extra": { "tools": [{"type": "web_search"}] }

生成模式

模式參數說明
文生圖prompt純文字生成
單圖生圖prompt + image_urls(1張)參考圖 + 文字
多圖生圖prompt + image_urls(2-14張)多張參考圖融合
組圖n > 1生成一組關聯圖片
組圖模式下,輸入參考圖數量 + 生成圖片數量 ≤ 15。

回應

task_id
string
任務 ID
model
string
使用的模型 ID
action
string
操作類型
status
string
任務狀態:queued
created_at
integer
建立時間(Unix 毫秒時間戳)
progress
integer
進度,初始為 0