總覽
SeeGen AI 是統一的生成 API:透過一致的端點集合,即可執行多款頂尖 AI 影片與影像模型。只需以 model 參數選擇模型——所有模型的身分驗證、任務提交、狀態查詢與 Webhook 運作方式皆相同。
目前提供的模型:
- 影片 — Seedance 2.5(
sd2.5)、Seedance 2.0 Pro(sd2)、Fast(sd2-fast)、Mini(sd2-mini)、Grok Imagine Video 1.5(grok-imagine-video-1.5)與 Lite(grok-imagine-video-1.5-lite)、Wan 3.0 Video Prime(wan3.0-video-prime)、Wan 3.0 Video(wan3.0-video)。Grok 支援 1–15 秒並包含音訊。Standard 1.5 支援文字或單張圖片輸入的原生 1080p,以及最多 14 張參考圖片;Lite 支援文字或一張圖片輸入,1080p 由 720p 放大而成。 - 圖片 — GPT Image 2 (
gpt-image-2)、Nano Banana 2.1 / 2 (nano-banana-2.1、nano-banana-2)、Nano Banana Pro (nano-banana-pro)、Seedream 5.0 Lite (seedream-v5.0-lite)、Seedream 5.0 Pro (seedream-v5.0-pro) Qwen Image 2.1 Pro 與 Turbo 支援 1K/2K 生成與編輯,最多可使用 10 張參考圖片。
基礎網址: https://seegen.ai/api/v1
模型: 將上述任一別名填入 model 欄位即可(例如 sd2、gpt-image-2)。
為什麼選擇 SeeGen AI?
選擇 SeeGen AI 的更多理由:
- 不只 Seedance 2.0:還有 Wan 3.0、Nano Banana、ChatGPT Image 等更多模型。
- 無需訂閱——按用量付費
- 快速使用最新模型
- 全天候客戶支援
- 提供模型相關的官方諮詢支援
- 提供開發者主控台
- 企業與個人使用者皆可使用
價格
API Pack
125,000 點數 ($0.004/點數)
約 1,136 支 5 秒影片
API-XL Pack
500,000 點數 ($0.004/點數)
約 4,545 支 5 秒影片
Seedance 2.0 / Fast / Mini / 2.5:費用計算
設 out 為輸出秒數,in 為每段輸入影片時長分別向上取整至整秒後的總和,最低為 ⌈2 × out / 3⌉。不含影片輸入時:費用 = out × 費率;含影片輸入時:費用 = (out + in) × 費率。各模型與解析度的費率見下表。
| 無影片輸入 | 包含影片輸入 | |
|---|---|---|
| sd2.5-flash: 480p | 20 × out | 15 × (out + in) |
| sd2.5-flash: 720p | 40 × out | 30 × (out + in) |
| sd2.5: 480P | 30 × out | 23 × (out + in) |
| sd2.5: 720P | 60 × out | 45 × (out + in) |
| sd2.5: 1080P (原生) | 150 × out | 113 × (out + in) |
| sd2.5: 2K | (60 + 30) × out | 45 × (out + in) + 30 × out |
| sd2.5: 4K (原生) | 241 × out | 187 × (out + in) |
| sd2-pro: 480P | 20 × out | 15 × (out + in) |
| sd2-pro: 720P | 40 × out | 30 × (out + in) |
| sd2-pro: 1080P (原生) | 100 × out | 75 × (out + in) |
| sd2-pro: 2K | (40 + 30) × out | 30 × (out + in) + 30 × out |
| sd2-pro: 4K (原生) | 200 × out | 150 × (out + in) |
| sd2-fast: 480P | 11 × out | 8.5 × (out + in) |
| sd2-fast: 720P | 22 × out | 17 × (out + in) |
| sd2-fast: 1080P | (22 + 20) × out | 17 × (out + in) + 20 × out |
| sd2-fast: 2K | (22 + 30) × out | 17 × (out + in) + 30 × out |
| sd2-fast: 4K | (22 + 40) × out | 17 × (out + in) + 40 × out |
| sd2-mini: 480P | 4.5 × out | 3.5 × (out + in) |
| sd2-mini: 720P | 9 × out | 7 × (out + in) |
| sd2-mini: 1080P | (9 + 20) × out | 7 × (out + in) + 20 × out |
| sd2-mini: 2K | (9 + 30) × out | 7 × (out + in) + 30 × out |
| sd2-mini: 4K | (9 + 40) × out | 7 × (out + in) + 40 × out |
注意:sd2 和 sd2.5 均原生生成 1080P 和 4K。它們的 2K,以及 sd2-fast / sd2-mini 的 1080P/2K/4K,均由 720P 自動放大。透過 outputResolution 選擇檔位,例如 "4k"。原生檔位不收放大費;放大檔位按每輸出秒額外收取 1080P +20、2K +30、4K +40 積分。若自動放大失敗,完成的任務會回傳 720P 備用影片,不部分退還積分。
限時優惠:sd2-fast 與 sd2-mini 的基礎費率暫時調降。無影片輸入時,480P / 720P 的 Fast 為每輸出秒 11 / 22 點,Mini 為 4.5 / 9 點。有影片輸入時,Fast 為每計費秒 8.5 / 17 點,Mini 為 3.5 / 7 點,按輸出時長與可計費輸入影片時長之和計算。Fast 與 Mini 的 1080P/2K/4K 使用優惠後的 720P 基礎費率,另加每輸出秒 20 / 30 / 40 點的放大費,放大費維持不變。
若放大失敗,已完成任務將回傳 720P 備援結果,不退還部分點數。
- sd2.5 480P,4 秒輸出、無影片輸入:120 點數
- sd2.5 720P,5 秒輸出、無影片輸入:300 點數
- sd2.5 720P,5 秒輸出 + 3 秒輸入影片(最低輸入時長 4 秒):405 點數
- sd2.5 1080P 原生,5 秒輸出、無影片輸入:750 點數
- sd2.5 1080P 原生,5 秒輸出 + 5 秒輸入影片:1,130 點數
MiniMax H3 / H3 Max / H3 Max Turbo
點數 = 輸出秒數 × 輸出費率 + 每個輸入影片的時長向上取整至整數秒 × 輸入影片費率 + 超過免費額度的圖片數 × 圖片費率。所有輸入圖片都會計入,包括首幀和尾幀。音訊參考免費。收費金額以伺服器測量的影片時長為準;會忽略用戶端提供的時長。失敗的工作會退還預留點數。
Kling 4.0
| 解析度 | 無影片輸入 | 包含影片輸入 |
|---|---|---|
| 720P | 54 | 32 |
| 1080P | 80 | 48 |
不含輸入影片:720p 每輸出秒數需 54 點,1080p 需 80 點。含輸入影片:720p 每可計費秒數需 32 點,1080p 需 48 點。伺服器會測量每段輸入影片,將片長無條件進位至整秒後再加總。可計費秒數 = 輸出秒數 + max(進位後的輸入總秒數、輸出秒數)。最終點數會無條件進位。30 秒輸入限制以進位前的實際片長計算。
在 API Playground 試用 Kling 4.0Grok Imagine Video 1.5
| 解析度 | 點數/秒 |
|---|---|
| 480P | 30 |
| 720P | 50 |
| 1080P | 90 |
輸出費用為每秒 30 / 50 / 90 點額度,分別對應 480p / 720p / 1080p;每張輸入圖片另收 5 點額度。音訊不會改變價格。5 秒、480p 且包含一張輸入圖片的影片需 155 點額度。
urls:公開的 HTTP(S) 圖片網址。提供一張圖片時會選用單張圖片生成影片;提供兩張圖片時會選用首幀/尾幀。設定 videoInputMode: "reference" 可使用 1–14 張參考圖片。首幀/尾幀與多參考圖片輸出支援 480p 和 720p。
Grok Imagine Video 1.5 Lite
| 解析度 | 點數/秒 |
|---|---|
| 480P | 8 |
| 720P | 12 |
| 1080P | 50 |
輸出影片在 480p/720p/1080p 下每秒分別消耗 8/12/50 點數,另加上每張輸入圖片 5 點數。音訊不會改變價格。含一張輸入圖片的 5 秒 480p 影片需消耗 45 點數。
urls:零個或一個公開的 HTTP(S) 圖片網址。一張圖片會選擇圖片生成影片,並沿用其長寬比。不支援多張圖片、參考模式、影片與音訊輸入。
Wan 3.0 Video / Prime — 費用計算
設 out = 輸出秒數,in = 每段參考影片時長無條件進位至整秒後的總和。不含參考影片:credits = out × rate;含參考影片:credits = (out + in) × rate。請依下表選擇對應模型與解析度的費率。
| 模型 | 原生輸出 | 點數/秒 | 2 秒範例 |
|---|---|---|---|
| wan3.0-video-prime | 480P | 22 | 44 |
| 720P | 45 | 90 | |
| 1080P | 90 | 180 | |
| wan3.0-video | 480P | 16 | 32 |
| 720P | 32 | 64 | |
| 1080P | 64 | 128 |
注意:480P、720P、1080P 均為原生輸出,不支援 2K/4K 放大。參考圖片與音訊不增加計費時長,關閉生成音訊不影響價格。參考影片總時長與輸出時長之和不得超過 30 秒。
- wan3.0-video 480P,輸出 2 秒、不含參考影片:2 × 16 = 32 點數
- wan3.0-video-prime 480P,輸出 2 秒、不含參考影片:2 × 22 = 44 點數
- wan3.0-video 720P,輸出 5 秒 + 參考影片 3 秒:(5 + 3) × 32 = 256 點數
- wan3.0-video-prime 720P,輸出 5 秒 + 參考影片 2.2 秒(無條件進位為 3 秒):(5 + 3) × 45 = 360 點數
🎉 限時優惠:所有圖片生成省 33%——以下所有圖片價格已含優惠。
GPT Image 2.5 Flare / Sunburst
| 解析度 | 中等品質 | 高品質 | XHigh 畫質 | Max 畫質 |
|---|---|---|---|---|
| 1k | 35 | 1320 | 2335 | 5075 |
| 2k (預設) | 710 | 2335 | 3755 | 84125 |
| 4k | 1015 | 4060 | 67100 | 154230 |
每個任務產生 1 張圖片,需 N 個變化請提交 N 個任務。任務失敗會自動退還點數。
gpt-image-2:每張圖片點數
| 解析度 | 中等品質 | 高品質 |
|---|---|---|
| 1k | 1015 | 4770 |
| 2k (預設) | 2335 | 84125 |
| 4k | 4060 | 154230 |
每個任務產生 1 張圖片,需 N 個變化請提交 N 個任務。任務失敗會自動退還點數。
Nano Banana — 每張圖片所需點數
| 解析度 | nano-banana-2.1nano-banana-2 | nano-banana-pro |
|---|---|---|
| 1k | 2030 | 4060 |
| 2k (預設) | 3045 | 4060 |
| 4k | 4770 | 74110 |
每個任務產生 1 張圖片,需 N 個變化請提交 N 個任務。任務失敗會自動退還點數。
Seedream 5.5 — 每張圖片積分
| 項目 / 級別 | 點數 |
|---|---|
| 1k | 1015 |
| 2k (預設) | 1725 |
| 參考圖(每張) | 46 |
每個任務產生 1 張圖片,需 N 個變化請提交 N 個任務。任務失敗會自動退還點數。 所有參考圖均單獨計費,包括第一張。
Seedream 5.0:每張圖片點數
| 模型/級別 | 點數 |
|---|---|
| Flash 1k / 1.5k / 2k(固定價格) | 812 |
| Lite 2k/4k(統一費率) | 710 |
| Pro 1k (預設) | 1015 |
| Pro 2k | 2030 |
每個任務產生 1 張圖片,需 N 個變化請提交 N 個任務。任務失敗會自動退還點數。 參考圖片不另計費。
Qwen Image 2.1 Pro / Turbo
| 解析度 | qwen-image-2.1-pro | qwen-image-2.1-turbo |
|---|---|---|
| 1k | 1320 | 58 |
| 2k | 1320 | 58 |
Pro:每張圖片 13 點額度。Turbo:每張圖片 5 點額度。1K 與 2K 費用相同。價格已包含任何目前有效的圖片優惠。
每個任務產生 1 張圖片,需 N 個變化請提交 N 個任務。任務失敗會自動退還點數。 參考圖片不另計費。
查詢您的餘額:GET /api/v1/account/credits
API 帳戶自動儲值
API 金鑰與 SeeGen AI 控制台共用同一個帳戶點數餘額。自動儲值可為 API 工作持續補充餘額,但必須在 Credits 頁面設定;目前沒有獨立的設定 API。
在 Credits 中設定自動儲值:
- 開啟 Credits,設定希望維持的最低餘額,並選擇一個儲值方案。
- 一次性授權付款方式。此步驟只會儲存授權,不會扣款。
- 彈性授權生效後,可直接在 Credits 中修改最低餘額或儲值方案,不必再次授權。仍使用舊版固定金額授權的帳戶可能需要完成一次升級。
API 請求的觸發規則
- API 工作提交成功並扣除點數後,如果餘額從不低於門檻變為低於門檻,SeeGen AI 會以非同步方式將自動儲值加入佇列。工作提交不會等待儲值完成。
- 如果提交前帳戶點數不足,API 會回傳 HTTP 402,且不會建立工作。遭拒的請求不會觸發自動儲值,也不會自動重試;請在點數入帳後自行重試。
- 可透過
GET /api/v1/account/credits查詢目前餘額。自動儲值進度和失敗會顯示在 Credits 與 Payment History 中,重要結果也會寄到該帳戶的帳單信箱。目前沒有提供給客戶的自動儲值 Webhook 或狀態 API。
API 方案自動儲值贈送
- $500.00 API Pack:入帳 127,500 點數(125,000 + 2% 贈送)。
- $2,000.00 API-XL Pack:入帳 525,000 點數(500,000 + 5% 贈送)。
- 手動購買這兩個方案時,仍分別入帳 125,000 和 500,000 點數。
身分驗證
所有 API 請求都需要在 Authorization 標頭中帶上 Bearer token。您可以在帳號設定中建立及管理 API 金鑰。
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://seegen.ai/api/v1/account/credits重要: API 金鑰僅在建立時顯示一次,請妥善保存。每個帳號最多可建立 10 組 API 金鑰。
快速開始
兩步驟生成影片:建立任務,然後輪詢取得結果。
set -eu
# 1. Create once. Save the returned IDs; never blindly retry a timed-out create.
CREATED=$(curl --fail-with-body --silent --show-error --max-time 120 -X POST \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sd2",
"inputs": {
"prompt": "A golden retriever running on the beach at sunset",
"duration": "5s",
"resolution": "1280x720"
}
}' \
https://seegen.ai/api/v1/jobs/createTask)
printf '%s\n' "$CREATED" | jq .
TASK_ID=$(printf '%s' "$CREATED" | jq -er '.taskId')
# 2. Poll for up to 15 minutes. A polling timeout does not cancel the task.
DEADLINE=$(( $(date +%s) + 900 ))
while true; do
RESULT=$(curl --fail-with-body --silent --show-error --max-time 30 \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
"https://seegen.ai/api/v1/jobs/queryTask?taskId=$TASK_ID")
STATUS=$(printf '%s' "$RESULT" | jq -er '.status')
if [ "$STATUS" = "COMPLETED" ]; then
printf '%s\n' "$RESULT" | jq .
break
fi
if [ "$STATUS" = "FAILED" ]; then
printf '%s\n' "$RESULT" | jq .
exit 1
fi
if [ "$(date +%s)" -ge "$DEADLINE" ]; then
echo "Still processing: query taskId=$TASK_ID later" >&2
exit 1
fi
sleep 5
done端點
/api/v1/jobs/createTask建立新的圖片或影片生成任務
/api/v1/jobs/queryTask查詢任務狀態與結果
/api/v1/jobs/relations查詢樣片與正片的關聯
/api/v1/account/credits查詢您的點數餘額
/api/v1/assets/upload上傳素材(圖片/影片/音訊)供審核
/api/v1/assets/status查詢素材審核狀態
/api/v1/assets/review開始或重試平台素材審核
/api/v1/assets/list列出您已上傳的素材
/api/v1/upscale/create提交獨立的影片升頻任務(720p/1080p/2K/4K)
/api/v1/upscale/query輪詢獨立升頻任務的狀態與結果
選擇模型(影片)
可依工作流程、原生解析度、速度與價格選擇影片模型;搭配 價格 章節估算成本。
| 模型 | T2V | I2V | First–Last | Multi-Ref | R2V | 原生 1080p | 原生 4K | 音訊 | 720p / 5秒 |
|---|---|---|---|---|---|---|---|---|---|
| sd2.5 | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | 300 點數 |
| sd2.5-flash | ✓ | ✓ | ✓ | ✓ | — | — | — | ✓ | 200 點數 |
| sd2 | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | 200 點數 |
| sd2-fast | ✓ | ✓ | ✓ | ✓ | — | 升頻 | 升頻 | ✓ | 110 點數 |
| sd2-mini | ✓ | ✓ | ✓ | ✓ | — | 升頻 | 升頻 | ✓ | 45 點數 |
| grok-imagine-video-1.5 | ✓ | ✓ | ✓ | ✓ | — | ✓ | — | ✓ | 250 點數 |
| grok-imagine-video-1.5-lite | ✓ | ✓ | — | — | — | 升頻 | — | ✓ | 60 點數 |
| wan3.0-video-prime | ✓ | ✓ | ✓ | ✓ | — | ✓ | — | ✓ | 225 點數 |
| wan3.0-video | ✓ | ✓ | ✓ | ✓ | — | ✓ | — | ✓ | 160 點數 |
T2V = 文字轉影片 · I2V = 圖片轉影片(首幀) · First–Last = 首幀 + 尾幀關鍵幀 · Multi-Ref = 參考圖片(Seedance 和 Wan 也支援影片/音訊) · R2V = 1–9 張帶有角色標記的參考圖片
Seedance 2.0 / 2.0 Fast / 2.0 Mini / Seedance 2.5
文字轉影片
根據文字提示詞生成影片,無需提供圖片。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sd2",
"inputs": {
"prompt": "A futuristic city with flying cars at night, neon lights reflecting on wet streets",
"duration": "5s",
"resolution": "1280x720"
}
}' \
https://seegen.ai/api/v1/jobs/createTask| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| prompt | string | 是 | 要生成影片的文字描述,最多 20000 字元。 |
| duration | string | 否 | 影片長度:"4s" 到 "15s";sd2.5 最長支援到 "30s"(預設:"5s") |
| resolution | string | 否 | 透過解析度指定長寬比。可選值:auto(預設)、720x720、720x960、960x720、1280x720、720x1280、1280x540 |
| outputResolution | string | 否 | 輸出解析度檔位:"480p"、"720p"(預設)、"1080p"、"2k" 或 "4k"。Seedance 2.0 Pro 和 Seedance 2.5 原生支援 480p/720p/1080p/4k;Fast 和 Mini 原生支援 480p/720p。其餘檔位自動放大。生成樣片時請省略此欄位,固定輸出 480p。 |
| seed | int | 否 | 可重現性種子值:填 -1 或省略即為隨機;填 0–2147483647 之間的數值可固定結果。 |
| generateAudio | boolean | 否 | 是否合成同步音軌。預設為 true;傳入 false 則產生無聲影片。 |
圖片轉影片
將靜態圖片動畫化為影片,提供一個圖片網址作為起始影格。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sd2",
"inputs": {
"urls": ["https://example.com/photo.jpg"],
"prompt": "The woman slowly turns her head and smiles",
"duration": "5s"
}
}' \
https://seegen.ai/api/v1/jobs/createTask| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| urls | string[] | 是 | 包含一個圖片網址(來源影格)的陣列。同時支援 HTTP 網址與資產參照(例如 "asset://asset-20260326-abc123") |
| prompt | string | 否 | 描述所需動態效果的文字說明 |
| duration | string | 否 | 影片長度:"4s" 到 "15s";sd2.5 最長支援到 "30s"(預設:"5s") |
| outputResolution | string | 否 | 輸出解析度檔位:"480p"、"720p"(預設)、"1080p"、"2k" 或 "4k"。Seedance 2.0 Pro 和 Seedance 2.5 原生支援 480p/720p/1080p/4k;Fast 和 Mini 原生支援 480p/720p。其餘檔位自動放大。生成樣片時請省略此欄位,固定輸出 480p。 |
| seed | int | 否 | 可重現性種子值:填 -1 或省略即為隨機;填 0–2147483647 之間的數值可固定結果。 |
| generateAudio | boolean | 否 | 是否合成同步音軌。預設為 true;傳入 false 則產生無聲影片。 |
首尾影格
定義起始與結束影格,模型會生成兩者之間的過渡動畫。需使用 videoInputMode: "keyframe"。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sd2",
"inputs": {
"urls": [
"https://example.com/first-frame.jpg",
"https://example.com/last-frame.jpg"
],
"prompt": "Smooth camera transition from day to night",
"duration": "5s",
"videoInputMode": "keyframe"
}
}' \
https://seegen.ai/api/v1/jobs/createTask| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| urls | string[] | 是 | 剛好包含 2 個圖片網址的陣列:[first_frame, last_frame]。同時支援 HTTP 網址與資產參照(例如 "asset://asset-20260326-abc123") |
| videoInputMode | string | 是 | 必須為 "keyframe" |
| prompt | string | 否 | 引導過渡效果的文字描述 |
| duration | string | 否 | 影片長度:"4s" 到 "15s";sd2.5 最長支援到 "30s"(預設:"5s") |
| outputResolution | string | 否 | 輸出解析度檔位:"480p"、"720p"(預設)、"1080p"、"2k" 或 "4k"。Seedance 2.0 Pro 和 Seedance 2.5 原生支援 480p/720p/1080p/4k;Fast 和 Mini 原生支援 480p/720p。其餘檔位自動放大。生成樣片時請省略此欄位,固定輸出 480p。 |
| seed | int | 否 | 可重現性種子值:填 -1 或省略即為隨機;填 0–2147483647 之間的數值可固定結果。 |
| generateAudio | boolean | 否 | 是否合成同步音軌。預設為 true;傳入 false 則產生無聲影片。 |
多重參考
使用多張參考圖片、影片與音訊檔案來引導生成。需使用 videoInputMode: "reference"。對 sd2.5 而言,這是預設的參考子任務;若要編輯或延續現有影片,請參閱下方的「影片編輯與延伸」。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sd2",
"inputs": {
"urls": [
"https://example.com/ref1.jpg",
"https://example.com/ref2.jpg"
],
"videoUrls": ["asset://asset-motion-video"],
"audioUrls": ["https://example.com/audio.mp3"],
"prompt": "Character walks through a garden",
"duration": "5s",
"videoInputMode": "reference",
"resolution": "1280x720"
}
}' \
https://seegen.ai/api/v1/jobs/createTask| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| urls | string[] | 否 | 參考圖片網址(最多 9 張)。同時支援 HTTP 網址與資產參照(例如 "asset://asset-20260326-abc123") |
| videoUrls | string[] | 否 | 參考影片的 asset:// URI——需先透過 /api/v1/assets/upload 上傳,外部網址一律拒絕。sd2:最多 3 支影片,每支 ≤15s。sd2.5:最多 10 支影片,每支 2–30s 且 ≤200MB,參考總時長 ≤30s,支援 480p–4K 輸入。 |
| audioUrls | string[] | 否 | 參考音訊輸入。sd2 / sd2-fast / sd2-mini:最多 3 個音訊檔案,每個 2–15s,總長 ≤15s——這些模型不支援僅以音訊作為參考(須至少加入一張圖片或一支影片)。sd2.5:最多 10 個檔案,每個 ≤15MB 且 2–30s,總長 ≤30s,且支援僅音訊輸入。 |
| videoInputMode | string | 是 | 必須為 "reference" |
| prompt | string | 否 | 文字描述 |
| duration | string | 否 | 影片長度:"4s" 到 "15s";sd2.5 最長支援到 "30s"(預設:"5s") |
| resolution | string | 是 | 參考模式下必填。可選值:720x720、720x960、960x720、1280x720、720x1280、1280x540 |
| outputResolution | string | 否 | 輸出解析度檔位:"480p"、"720p"(預設)、"1080p"、"2k" 或 "4k"。Seedance 2.0 Pro 和 Seedance 2.5 原生支援 480p/720p/1080p/4k;Fast 和 Mini 原生支援 480p/720p。其餘檔位自動放大。生成樣片時請省略此欄位,固定輸出 480p。 |
| seed | int | 否 | 可重現性種子值:填 -1 或省略即為隨機;填 0–2147483647 之間的數值可固定結果。 |
| generateAudio | boolean | 否 | 是否合成同步音軌。預設為 true;傳入 false 則產生無聲影片。 |
參考限制
- 最多 9 張圖片、3 支影片、3 個音訊檔案
- 所有類型合計最多 12 個檔案
- 每支影片/每個音訊檔案須 ≤ 15 秒
- 圖片最短邊須至少 400px
- sd2.5:最多 30 張圖片、10 支影片、10 個音訊檔案,總數上限 50;影片與音訊各自總長皆 ≤ 30 秒
影片編輯與延伸
sd2.5 將基於參考素材的生成拆分為三個子任務。一般參考生成請省略 mode;編輯現有影片請設定 mode: "edit";延續影片請設定 mode: "extend"。兩者都需要 videoUrls 中至少一支影片,且輸出始終沿用來源影片的長寬比。
請將要操作的影片放在 videoUrls 的第一個位置,並在提示詞中稱它為「Video 1」。edit 會強制輸出長度與該第一支(來源)影片一致,其長度須為 4–30 秒,因此您傳入的任何 duration 都會被忽略;計費以來源影片長度作為輸出長度,並將所有參考影片計入輸入。extend 接受依序串接的 1–3 段影片,您所要求的 duration 即為本次生成的輸出長度(與來源長度無關)——計費方式與一般參考生成相同。
2.0 系列模型(sd2 / sd2-fast / sd2-mini)同樣接受 mode: "edit" 與 mode: "extend":它們會從您的提示詞推斷操作內容(請明確描述編輯或延續方式),長寬比沿用來源影片,duration 則仍由您自行控制,計費方式為一般計費。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sd2.5",
"inputs": {
"mode": "edit",
"videoInputMode": "reference",
"videoUrls": ["asset://asset-source-video"],
"urls": ["https://example.com/annotation-at-1.2s.png"],
"source_frame_timestamps_ms": [1200],
"prompt": "Replace the marked object with a red umbrella",
"outputResolution": "720p"
}
}' \
https://seegen.ai/api/v1/jobs/createTask| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| mode | string | 否 | 「edit」或「extend」。一般參考生成請省略此項。 |
| videoUrls | string[] | 是 | 至少一支影片;第一支為來源(「Video 1」)——編輯的輸出長度與計費皆以它為準。之後的影片則作為額外參考(edit)或依序串接的附加片段(extend,最多 3 支)。 |
| urls | string[] | 否 | 選填的標註/參考圖片。 |
| source_frame_timestamps_ms | number[] | 否 | 僅限 mode「edit」使用。urls 中每張圖片對應一個非負的來源影片時間戳(毫秒)。 |
| outputResolution | string | 否 | 輸出解析度檔位:"480p"、"720p"(預設)、"1080p"、"2k" 或 "4k"。Seedance 2.0 Pro 和 Seedance 2.5 原生支援 480p/720p/1080p/4k;Fast 和 Mini 原生支援 480p/720p。其餘檔位自動放大。生成樣片時請省略此欄位,固定輸出 480p。 |
Seedance 2.5:從樣片到正片
提交 inputs.draft: true 的 sd2.5 任務即可生成原生 480P 樣片。請勿傳入 outputResolution 或 upscaleResolution:API 會將樣片輸出固定為 480P;只要傳入任一欄位,即使 outputResolution 為 "480p",也會被拒絕。支援文字、關鍵影格和參考素材生成,不支援編輯或延長。樣片和正片分別計費。
# 1. Create a 480P draft. Save both taskId and orderId from the response.
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"sd2.5","inputs":{"prompt":"A blue cube slowly rotates on a white background","duration":"4s","draft":true}}'
# 2. Poll by taskId until status is COMPLETED, then review the draft output.
curl -H "Authorization: Bearer $API_KEY" \
"https://seegen.ai/api/v1/jobs/queryTask?taskId=YOUR_DRAFT_TASK_ID"
# 3. Within 7 days of draft creation, generate the 1080P final from its SeeGen orderId.
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"sd2.5","inputs":{"draftSourceOrderId":"YOUR_DRAFT_ORDER_ID"}}'儲存 createTask 傳回的 orderId(也可透過 queryTask 取得),等待樣片狀態變為 COMPLETED。接著提交第二個 sd2.5 任務,將該 orderId 傳入 inputs.draftSourceOrderId。伺服器會驗證樣片已完成且屬於目前帳號,重用原始輸入和 seed,生成原生 1080P 正片。正片請求中的其他輸入會被忽略。構圖預期相近,但不保證逐像素一致。
重要規則
- 使用哪個 ID? 使用 createTask 或 queryTask 傳回的 SeeGen orderId,而不是 taskId。SeeGen 會在內部查找樣片的閘道任務 ID;呼叫本 API 時不要傳送 draft_task.id 欄位。
- 為什麼欄位與火山方舟不同? 上游 API 的 resolution 表示輸出畫質,content[].draft_task.id 指向樣片。SeeGen 的 resolution 是長寬比預設,普通任務用 outputResolution 選擇畫質。生成樣片時省略 outputResolution;生成正片時傳送 draftSourceOrderId。不要原樣複製上游請求到本 API。
- 何時生成? 樣片必須已完成且屬於目前帳號。樣片自建立起 7 天內可用於生成正片;過期後請重新生成樣片。
- 重用哪些內容? 正片自動重用樣片的提示詞、參考素材、時長、長寬比、seed、音訊設定和任務類型。正片的 inputs 只需傳送 draftSourceOrderId;其他生成參數會被忽略。可為正片另外設定頂層 callBackUrl。
- 如何計費? 樣片與正片是兩筆獨立付費任務:樣片按 480P 費率,正片按原生 1080P 費率。若樣片使用了輸入影片,正片仍按那些原始輸入影片的時長計費;樣片影片本身不作為額外輸入影片計費。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| draft | boolean | 否 | 僅限 sd2.5。設為 true 可生成原生 480P 樣片。請勿傳入 outputResolution 或 upscaleResolution,API 會固定為 480P;不支援編輯、延長和超解析。 |
| draftSourceOrderId | string | 否 | 目前帳號已完成的 sd2.5 樣片的 orderId,由 createTask 或 queryTask 傳回。根據該樣片生成原生 1080P 正片。 |
查詢樣片與正片的關聯
使用 orderId 呼叫 GET /api/v1/jobs/relations。傳入樣片訂單會列出由它生成的正片;傳入正片訂單會返回來源樣片。只能查詢 API Key 所屬帳號的訂單。
# A draft orderId returns its finals, oldest first (including queued and failed tasks).
curl -H "Authorization: Bearer $API_KEY" \
"https://seegen.ai/api/v1/jobs/relations?orderId=YOUR_DRAFT_ORDER_ID&limit=20"
# A final orderId returns its source draft.
curl -H "Authorization: Bearer $API_KEY" \
"https://seegen.ai/api/v1/jobs/relations?orderId=YOUR_FINAL_ORDER_ID"回應包含 kind(draft 或 final)、sourceDraft、finals、totalCount 和 nextCursor。每筆關聯任務包含 orderId、taskId、status、createTime,完成後還包含 URL。查詢樣片時,可將 nextCursor 作為 cursor 載入更多正片(limit 為 1–50);已刪除或封存的訂單不會顯示。
{
"orderId": "YOUR_DRAFT_ORDER_ID",
"kind": "draft",
"sourceDraft": null,
"finals": [
{
"orderId": "FINAL_ORDER_ID",
"taskId": "FINAL_TASK_ID",
"status": "COMPLETED",
"createTime": 1790192800000,
"url": "https://example.com/final.mp4"
}
],
"totalCount": 1,
"nextCursor": null
}Seedance 參數參考
sd2 / sd2-fast / sd2-mini / sd2.5 模型全部 inputs 參數的完整參考。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| prompt | string | 否 | 文字描述(文字轉影片為必填,其他模式為選填)。最多 20000 個字元。 |
| urls | string[] | 否 | 圖片網址。支援 HTTP 網址與素材參考(例如 "asset://asset-20260326-abc123")。內部對應至 uploadedUrls。 |
| videoUrls | string[] | 否 | 影片參考的 asset:// URI(僅限參考模式)。須先透過 /api/v1/assets/upload 上傳——外部網址會被拒絕。 |
| audioUrls | string[] | 否 | 音訊參考網址(僅限參考模式)。sd2.5 支援僅音訊輸入;sd2 / sd2-fast / sd2-mini 除音訊外,還須搭配至少一張圖片或一支影片。 |
| duration | string | 否 | 一般為 "4s" 至 "15s";sd2.5 最高支援 "30s"。預設值:"5s" |
| resolution | string | 否 | 長寬比:auto(預設)| 720x720 | 720x960 | 960x720 | 1280x720 | 720x1280 | 1280x540 |
| outputResolution | string | 否 | 輸出解析度檔位:"480p"、"720p"(預設)、"1080p"、"2k" 或 "4k"。Seedance 2.0 Pro 和 Seedance 2.5 原生支援 480p/720p/1080p/4k;Fast 和 Mini 原生支援 480p/720p。其餘檔位自動放大。生成樣片時請省略此欄位,固定輸出 480p。 |
| videoInputMode | string | 否 | "keyframe"(預設)或 "reference" |
| mode | string | 否 | 參考模式子任務(適用所有 Seedance 模型):一般參考生成請省略;"edit" 表示編輯 videoUrls 中的第一支影片;"extend" 表示延續 1–3 段影片。詳見「影片編輯與延伸」。 |
| source_frame_timestamps_ms | number[] | 否 | 僅限 sd2.5 影片編輯:每張標註圖片對應一個非負的時間戳(毫秒)。 |
| seed | int | 否 | 用於重現結果的隨機種子。設為 -1 或省略即由伺服器隨機產生。相同種子加相同輸入會得到高度相近的結果(因 GPU 的非確定性,並非位元級完全相同)。範圍:-1 至 2147483647。 |
| draft | boolean | 否 | 僅限 sd2.5。設為 true 生成 480P 樣片;參閱「從樣片到正片」。 |
| draftSourceOrderId | string | 否 | 僅限 sd2.5。目前 API 帳號擁有的已完成樣片的 orderId;生成原生 1080P 正片。 |
| generateAudio | boolean | 否 | 是否合成與影片同步的音軌(語音、音效、背景音樂)。預設為 true。設為 false 可產生無聲影片——速度稍快,適合日後另行配音的情境。 |
| bitrateMode | string | 否 | 同解析度下的輸出位元率等級:"standard"(預設)或 "high"。「high」能保留更多細節、減少色帶/區塊瑕疵,檔案大小約為原本的 3-5 倍——不會改變解析度或價格。 |
| upscaleResolution | string | 否 | (已淘汰)舊版拆分欄位,為向下相容仍可使用。新串接建議改用 outputResolution,現已可直接傳入 "2k" / "4k"。若兩者同時傳入,以 upscaleResolution 為準——但在原生支援 1080p 的模型(Seedance2 Pro / Seedance 2.5)上,upscaleResolution:"1080p" 會解析為原生 1080p(依原生費率計費)。 |
頂層請求欄位:model(必填)、inputs(必填)、callBackUrl(選填的 webhook 網址)。
Seedance 素材
Seedance 素材是圖片、影片與音訊檔案,在用於 Seedance 影片生成任務前須先經過字節火山審核流程。上傳素材後,等待其狀態變為 ACTIVE,接著即可在 Seedance 任務中使用其 asset:// 網址。
注意:真人圖片與影片素材需經官方審核,通常在數秒內完成。審核通過後即可直接作為參考使用。未經審核可能導致生成失敗。
平台內容預審
當您的帳戶啟用素材審核後,SeeGen 也會針對所有生成模型審核上傳內容。上傳、狀態與列表回應會包含獨立的 contentReview 物件。此物件不會取代原始供應商 status。
只有 ALLOW 或 DISABLED 才允許在平台政策下使用;原始模型與供應商的要求仍然適用。PROCESSING 表示請等待並輪詢素材狀態。PENDING 表示需要申請審核。BLOCK 或 NEEDS_REPHRASE 表示需要替換素材。SERVICE_UNAVAILABLE 表示審核無法完成,可重試。因這項預審而遭拒的生成不會扣除點數。
若要審核較早上傳的素材,或重試暫時性的審核失敗,請將其數字型 assetId 傳送至 POST /api/v1/assets/review。此端點會回傳 assetId 與 contentReview;不會重試或變更供應商審核。
{ "assetId": 123, "contentReview": { "status": "PROCESSING", "reviewId": "review-id" } }上傳素材
有兩種上傳方式:直接傳送本機檔案(multipart/form-data),或提交可公開存取的 HTTPS 網址。無論哪種方式,系統都會自動處理並審核該素材。
方法 A:直接上傳檔案(multipart/form-data)
傳送本機檔案,無需圖床。媒體類型會依檔案位元組偵測(不採信檔名副檔名)。允許類型:圖片(jpg/png/webp/gif/bmp/tiff/heic)、影片(mp4/mov)、音訊(wav/mp3)。單檔最大 50MB(圖片 ≤30MB、影片 ≤50MB、音訊 ≤15MB)。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-F "file=@/path/to/photo.jpg" \
-F "name=my-photo" \
https://seegen.ai/api/v1/assets/upload| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| file | file | 是 | 本機檔案(multipart 表單欄位)。媒體類型依內容偵測。 |
| name | string | 否 | 素材名稱(最多 64 個字元) |
方法 B:透過網址(application/json)
適用於檔案已託管於公開 HTTPS 網址的情況。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/photo.jpg",
"type": "IMAGE",
"name": "my-photo"
}' \
https://seegen.ai/api/v1/assets/upload| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| url | string | 是 | 要上傳檔案的公開可存取 HTTPS URL |
| type | string | 是 | 「IMAGE」、「AUDIO」或「VIDEO」 |
| name | string | 否 | 素材名稱(最多 64 個字元) |
上傳回應
{
"assetId": 123,
"volcAssetId": "asset-20260326-abc123",
"type": "IMAGE",
"status": "PROCESSING",
"failReason": null,
"url": "https://example.com/photo.jpg",
"name": "my-photo",
"createdAt": 1711234567890
}查詢素材狀態
輪詢素材的審核狀態。當狀態為 PROCESSING 時,此端點會自動向審核系統查詢最新狀態。
# Query by asset ID (numeric)
curl -H "Authorization: Bearer $API_KEY" \
"https://seegen.ai/api/v1/assets/status?assetId=123"
# Query by volcAssetId (string)
curl -H "Authorization: Bearer $API_KEY" \
"https://seegen.ai/api/v1/assets/status?assetId=asset-20260326-abc123"素材狀態值
PROCESSING— 審核中,尚無法使用ACTIVE— 供應商審核已通過;使用前也請確認平台 contentReviewFAILED— 審核失敗,請查看 failReason
列出素材
列出您已上傳的素材,可依類型與狀態選擇性篩選,支援游標分頁。
# List all assets
curl -H "Authorization: Bearer $API_KEY" \
"https://seegen.ai/api/v1/assets/list"
# Filter by type and status
curl -H "Authorization: Bearer $API_KEY" \
"https://seegen.ai/api/v1/assets/list?type=IMAGE&status=ACTIVE&limit=10"
# Paginate with cursor
curl -H "Authorization: Bearer $API_KEY" \
"https://seegen.ai/api/v1/assets/list?cursor=100&limit=20"| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| type | string | 否 | 依類型篩選:「IMAGE」、「AUDIO」或「VIDEO」 |
| status | string | 否 | 依狀態篩選:「NONE」、「PROCESSING」、「ACTIVE」或「FAILED」 |
| cursor | number | 否 | 分頁用游標(使用上一次回應中的 nextCursor) |
| limit | number | 否 | 每頁筆數,1-50(預設:20) |
列表回應
{
"items": [
{
"assetId": 123,
"volcAssetId": "asset-20260326-abc123",
"type": "IMAGE",
"status": "ACTIVE",
"failReason": null,
"url": "https://example.com/photo.jpg",
"name": "my-photo",
"width": 1920,
"height": 1080,
"size": 245000,
"duration": null,
"createdAt": 1711234567890
}
],
"nextCursor": 122
}在任務中使用素材
當素材狀態為 ACTIVE 後,即可在任務的 URL 中以 asset:// 協定搭配其 volcAssetId 使用:
{
"model": "sd2",
"inputs": {
"urls": ["asset://asset-20260326-abc123"],
"prompt": "The person slowly looks up and smiles",
"duration": "5s"
}
}MiniMax H3 / H3 Max / H3 Max Turbo
使用 minimax-h3、minimax-h3-max 或 minimax-h3-max-turbo 搭配 POST /api/v1/jobs/createTask。使用回傳的 taskId 輪詢 /api/v1/jobs/queryTask,直到狀態為 COMPLETED 或 FAILED。請儲存 taskId 和 orderId;若查詢逾時,請勿建立第二個工作。頂層的 callBackUrl 為選填;SeeGen 會在本機處理完成後傳送最終結果。
使用 POST /api/v1/assets/upload?model=minimax-h3 上傳本機參考檔案(或所選的 Max / Turbo ID),並設定 Authorization: Bearer <API_KEY> 及 multipart 表單欄位 file。將回傳的 url 傳入 inputs.urls、videoUrls 或 audioUrls。參考檔案必須屬於你的帳戶;不接受外部 URL 和 asset:// 識別碼。
每種模式都必須提供提示詞。H3 支援 768p 或 2K、4–15 秒的整數秒數;Max 和 Turbo 支援 480p 或 768p、5–15 秒。影片會同步產生原生音訊。H3 和 Max 最多接受 9 張參考圖片、3 部影片和 3 段音訊,總數上限為 12 個檔案。影片和音訊參考各自有 15 秒的總時長上限,且每段限制為 2–15 秒。音訊參考至少需要一張圖片或一部影片。Turbo 僅支援文字、首幀,以及首尾幀。
圖片:JPEG、PNG、WEBP,大小上限 30 MB,每邊 256–5760 像素,長寬比 0.4–2.5。影片:MP4/MOV,大小上限 50 MB,每邊 256–5760 像素,23.976–60 fps。音訊:MP3/WAV,大小上限 15 MB。上傳時會驗證檔案內容,並在產生前記錄中繼資料。
點數 = 輸出秒數 × 輸出費率 + 每個輸入影片的時長向上取整至整數秒 × 輸入影片費率 + 超過免費額度的圖片數 × 圖片費率。所有輸入圖片都會計入,包括首幀和尾幀。音訊參考免費。收費金額以伺服器測量的影片時長為準;會忽略用戶端提供的時長。失敗的工作會退還預留點數。
文字轉影片
MiniMax H3
開啟 API Playgroundcurl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3",
"inputs": {
"videoInputMode": "keyframe",
"prompt": "Dark cinematic VFX title sequence beginning with a single drop of glossy black liquid falling onto polished metal. Instead of splashing normally, the fluid violently spreads outward in branching organic tendrils. The camera tracks the liquid at macro scale as it races across the surface, splitting, reconnecting and forming increasingly complex structures. Thousands of black droplets suddenly leap upward against gravity and spiral into a living fluid vortex. The viscous material stretches into sharp ribbons and rapidly constructs the word \"VENON\", every letter constantly moving beneath a wet reflective surface as if the typography itself were alive. The camera performs a sinister close orbit while black tendrils whip between the letters and droplets float around the lens. The title suddenly loses structural stability and violently liquefies, exploding toward the camera as an enormous black fluid splash. Hyper-realistic viscosity, organic procedural motion, glossy reflections, dark premium theatrical VFX.",
"duration": "15s",
"outputResolution": "768p",
"ratio": "16:9",
"videoWorkflowTab": "text-to-video"
}
}'MiniMax H3 Max
開啟 API Playgroundcurl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3-max",
"inputs": {
"videoInputMode": "keyframe",
"prompt": "High-speed chase shot through an abandoned post-apocalyptic city in daylight. The camera races backward ahead of a lone runner while a gigantic dust tornado destroys the avenue behind them. Cars roll through the air, windows explode and debris fills the sky. The tornado suddenly tears an entire building facade apart. Thousands of concrete, steel and glass fragments are sucked upward, rotating violently inside the vortex. From above, the debris unexpectedly aligns into enormous floating letters spelling “SURVIVE.” The runner passes underneath as the tornado instantly destroys the word again. Massive disaster-movie VFX, intense speed, photorealistic debris and atmospheric destruction.",
"duration": "15s",
"outputResolution": "768p",
"ratio": "16:9",
"videoWorkflowTab": "text-to-video"
}
}'MiniMax H3 Max Turbo
開啟 API Playgroundcurl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3-max-turbo",
"inputs": {
"videoInputMode": "keyframe",
"prompt": "Cinematic 15-second 16:9 historical travel film of Angkor Wat, Cambodia, at sunrise. Create 15 rapid one-second shots with clean cuts and consistent visual continuity.Ultra-realistic Khmer architecture: five lotus-shaped towers, sandstone galleries, bas-relief carvings, monumental gates, stone corridors, reflecting pools, tropical gardens, palms, jungle, and moats. Golden-orange sunrise with pink-purple skies, morning mist, soft sun rays, and mirror-like water reflections.Shot sequence: aerial temple reveal; entrance glide; symmetrical five-tower hero shot; carved sandstone close-up; pond reflection tilt-up; orbit around the central sanctuary; bas-relief tracking; side view of towers; corridor glide; low-angle central tower; tropical garden pan; sunlight through temple openings; high aerial complex view; texture push-in; final aerial pull-back over Angkor Wat and the sunrise horizon.Smooth drone, push, pan, tilt, slide, and orbit movements. Stable architecture, realistic water, natural mist, cinematic depth of field, HDR documentary style, consistent warm color grading. No warping, flicker, text, or people.",
"duration": "15s",
"outputResolution": "768p",
"ratio": "16:9",
"videoWorkflowTab": "text-to-video"
}
}'圖片轉影片
MiniMax H3
開啟 API Playgroundcurl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3",
"inputs": {
"videoInputMode": "keyframe",
"ratio": "adaptive",
"prompt": "Four adult men cross the tree-lined street together, then continue walking toward the park entrance at the end of the road. The camera follows them from behind as they move naturally, with gentle wind through the trees and parked cars along the street. Keep the same hand-drawn animated style, daytime lighting, and calm cinematic mood. No text or watermark.",
"duration": "15s",
"outputResolution": "768p",
"videoWorkflowTab": "image-to-video",
"urls": [
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_1.webp"
]
}
}'MiniMax H3 Max
開啟 API Playgroundcurl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3-max",
"inputs": {
"videoInputMode": "keyframe",
"ratio": "adaptive",
"prompt": "15-second, 16:9 realistic 3D animated action-comedy. Use @Image1 as the only reference. Keep the same black cat rider, dinosaur mount, long bread loaf, saddle, reins, canyon desert, harsh afternoon sunlight, and character scale. No text, subtitles, watermark, extra characters, scene changes, fades, or black ending.The dinosaur runs continuously from left-rear to right-front along a flat desert track. The cat stays in the saddle area throughout. The cat holds the bread against its chest; after the jump, the bread flies in a clear arc toward the dinosaur’s mouth, and the dinosaur catches and eats it.0–3s: Low side tracking shot. The dinosaur runs fast, kicking up dust. The cat grips the bread and shouts, “Slow down! My bread is gonna fly off!”3–5s: Close-up of the dinosaur giving a secret mischievous smile. The cat notices and says, “Don’t you dare—”5–10s: The dinosaur deliberately jumps high on the flat path. The cat is thrown upward, and the bread slips free. In brief slow motion, the cat reaches for it as crumbs trail behind; the dinosaur catches it with a crisp “CHOMP!”10–13s: The dinosaur lands heavily. The cat falls back onto the saddle, crawls forward angrily, and yells, “You did that on purpose!” The dinosaur chews innocently.13–15s: Dynamic split-screen close-up: the cat is shocked while the dinosaur grins. A final crumb lands on the cat’s nose; the cat cross-eyes at it.Natural high-speed footfalls, wind, leather creaks, reins, dust impacts, bread crunching, and dialogue. No music.",
"duration": "15s",
"outputResolution": "768p",
"videoWorkflowTab": "image-to-video",
"urls": [
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_1.webp"
]
}
}'MiniMax H3 Max Turbo
開啟 API Playgroundcurl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3-max-turbo",
"inputs": {
"videoInputMode": "keyframe",
"ratio": "adaptive",
"prompt": "The pale crust turning golden brown.",
"duration": "15s",
"outputResolution": "768p",
"videoWorkflowTab": "image-to-video",
"urls": [
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_1.webp"
]
}
}'首尾幀
MiniMax H3
開啟 API Playgroundcurl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3",
"inputs": {
"videoInputMode": "keyframe",
"ratio": "adaptive",
"prompt": "15-second, 16:9 hyper-realistic dark science-fantasy naval battle. Stormy ocean, black cliffs, a massive coastal fortress, realistic water physics, violent explosions, and blockbuster cinematic scale.0–2s: Extreme wide shot. Three armored battleships fire at the ocean below the fortress. Explosions send water high into the air as a huge shadow moves beneath the waves.2–4s: A single colossal humanoid water giant erupts beside the lead ship and smashes it in half.4–6s: The same water giant sweeps one arm through the remaining two ships, forcing them into a catastrophic collision and explosion. No other water figures appear.6–9s: The water giant collapses into the sea. An enormous ancient armored leviathan rises from the ocean, dwarfing the fortress.9–12s: The leviathan tears the fortress from the cliff with one armored forelimb and crushes it, sending debris into the sea.12–15s: A huge wave swallows the last debris. At 13 seconds, the water settles around the shattered empty coastline. At 14 seconds, sunlight breaks through the storm clouds and illuminates the victorious leviathan. Hold the final shot.Audio: thunderous artillery, waves, steel destruction, orchestral percussion and brass; at 13 seconds, percussion stops and one deep sustained chord remains.One water giant only, one leviathan only. Keep scale, ships, geography, and lighting consistent. No dialogue, subtitles, text, logos, cartoon style, or abrupt ending.",
"duration": "15s",
"outputResolution": "768p",
"videoWorkflowTab": "first-last-frame",
"urls": [
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_1.webp",
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_2.webp"
]
}
}'MiniMax H3 Max
開啟 API Playgroundcurl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3-max",
"inputs": {
"videoInputMode": "keyframe",
"ratio": "adaptive",
"prompt": "A smooth cinematic time-lapse from daytime to night. The sun slowly moves across the sky as clouds drift naturally overhead. Ships pass through the water in the distance. As the sky darkens, streetlights and building windows gradually illuminate one by one, creating a warm evening city glow. Keep the camera static, with realistic lighting transitions and natural continuous motion.",
"duration": "15s",
"outputResolution": "768p",
"videoWorkflowTab": "first-last-frame",
"urls": [
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_1.webp",
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_2.webp"
]
}
}'MiniMax H3 Max Turbo
開啟 API Playgroundcurl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3-max-turbo",
"inputs": {
"videoInputMode": "keyframe",
"ratio": "adaptive",
"prompt": "A cinematic seaside scene. The little girl holds a camera and takes photos of a young seagull near the shore. A larger mother seagull then swoops down, and the young seagull follows her into the sky. The girl runs along the rocky beach after them, holding her camera.Keep the same 3D anime character, lavender twin-tail hair, black gothic outfit, sunny ocean, and bright blue sky. Smooth camera tracking, natural bird flight, no text or watermark.",
"duration": "15s",
"outputResolution": "768p",
"videoWorkflowTab": "first-last-frame",
"urls": [
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_1.webp",
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_2.webp"
]
}
}'多重參考
MiniMax H3
開啟 API Playgroundcurl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3",
"inputs": {
"videoInputMode": "reference",
"prompt": "Use @Image1 as the first frame. The camera slowly pushes forward through the Japanese city street toward the giant white cat. The cat remains still at first, with subtle wind moving debris and clouds overhead.Then transition to @Image2: the cat opens its mouth as a bright cyan-blue energy glow builds inside, lighting its face and the nearby buildings.Transition to @Image3: the cat fires a powerful blue energy beam toward the right side of the street. The beam creates swirling shockwave rings and electric arcs. The building hit by the beam cracks, shakes, and collapses realistically into dust and debris. Keep the cat, city layout, anime style, lighting, and camera direction consistent throughout. No text, subtitles, or watermark.",
"duration": "15s",
"outputResolution": "768p",
"ratio": "16:9",
"videoWorkflowTab": "multi-reference",
"urls": [
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_1.webp",
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_2.webp",
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_3.webp"
]
}
}'MiniMax H3 Max
開啟 API Playgroundcurl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3-max",
"inputs": {
"videoInputMode": "reference",
"prompt": "Create a 15-second Japanese anime comedy in one ordinary living room. Modern polished 2D animation, clean line art, vivid cel shading, cinematic lighting. Keep the same two characters, costumes, faces, room, and normal household vacuum cleaner throughout@Image1. No text, subtitles, logos, UI, or extra characters.0–5s: Character A stands dramatically as an enormous anime aura erupts around them: glowing energy, particles, flowing light, and wind in their hair and clothes. Character B watches calmly, holding a vacuum [email protected]–10s: From a closer side angle, Character B silently turns on the vacuum and points it at A@Image3. Only A’s aura is visibly sucked into the nozzle as a continuous stream of light and particles. A becomes confused; B remains unimpressed. Do not pull A’s body, hair, or clothes.10–15s: Wide static shot. A stands with no aura, devastated. B turns off the vacuum. After a short pause, the vacuum begins vibrating and the same huge supernatural aura erupts around it.@Image4 Keep the vacuum completely normal—no transformation. Both characters slowly stare at the awakened vacuum cleaner. Hold the final absurd image.Maximum three shots, stable character consistency, minimal camera movement, no dialogue.",
"duration": "15s",
"outputResolution": "768p",
"ratio": "16:9",
"videoWorkflowTab": "multi-reference",
"urls": [
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_1.webp",
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_2.webp",
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_3.webp",
"https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_4.webp"
]
}
}'參數
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| prompt | string | 是 | 所有模式都必須提供非空的場景描述。 |
| videoWorkflowTab | string | 否 | text-to-video、image-to-video、first-last-frame 或 multi-reference。Turbo 不支援 multi-reference。省略時,會根據輸入內容推斷模式。 |
| duration | string | integer | 否 | 預設為 5s。H3:4–15 秒的整數秒數。Max 和 Turbo:5–15 秒的整數秒數。 |
| outputResolution | string | 否 | 預設為 768p。H3:768p 或 2k。Max 和 Turbo:480p 或 768p。這些是模型直接輸出的畫質等級;請省略 upscaleResolution。 |
| ratio | string | 否 | 16:9、9:16、1:1、4:3、3:4、21:9 或 adaptive。文字轉影片需要固定長寬比。首尾幀產生會依循圖片長寬比。 |
| urls | string[] | 否 | 圖片轉影片時需提供恰好一個首幀 URL;幀模式需依序提供恰好兩個首幀/尾幀 URL;多重參考最多提供 9 個參考圖片。 |
| videoUrls / audioUrls | string[] | 否 | 僅適用於多重參考,每種類型最多 3 個檔案。請使用呼叫者擁有的已上傳素材 URL。 |
| promptExpansionMode | string | 否 | Max/Turbo:balanced(預設)或 quality。 |
Kling 4.0
在 API Playground 試用 Kling 4.0生成 3–30 秒的 720p 或 1080p 影片。五種工作流程共用同一模型:文字、圖片、首尾影格、多關鍵影格,以及圖片/影片參考。模型會根據提示詞原生生成音訊。
先使用 multipart POST /api/v1/assets/upload?model=kling-4.0 上傳參考素材。將回傳的 url 用於 media[].url。參考素材必須屬於你的帳戶。請將下方範例 URL 替換為已上傳的素材 URL。
使用大小不超過 30 MB 的 JPG/PNG 圖片,且兩邊至少為 300 px。影片必須為 MP4/MOV,大小不超過 300 MB、長度 3–30 秒、24–60 fps,且每邊為 700–4553 px,總像素最多 8294400。參考素材共用上限為 10 張圖片、5 部影片、15 個檔案,以及 30 秒輸入影片。請保持參考 ID 唯一,並在提示詞中使用 @Image1 或 @Video1。
不含輸入影片:720p 每輸出秒數需 54 點,1080p 需 80 點。含輸入影片:720p 每可計費秒數需 32 點,1080p 需 48 點。伺服器會測量每段輸入影片,將片長無條件進位至整秒後再加總。可計費秒數 = 輸出秒數 + max(進位後的輸入總秒數、輸出秒數)。最終點數會無條件進位。30 秒輸入限制以進位前的實際片長計算。
多關鍵影格使用 first_frame、middle_frame 和 last_frame。陣列順序會控制中間影格的順序。系統不提供明確的關鍵影格時間戳欄位;請在提示詞中描述時間安排。
文字轉影片
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-4.0",
"inputs": {
"videoWorkflowTab": "text-to-video",
"prompt": "A cinematic scene. Use the supplied references to guide the action and visual style.",
"duration": "10s",
"outputResolution": "1080p",
"ratio": "16:9",
"media": []
}
}'多關鍵影格
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-4.0",
"inputs": {
"videoWorkflowTab": "multi-keyframe",
"prompt": "A cinematic scene. Use the supplied references to guide the action and visual style.",
"duration": "10s",
"outputResolution": "1080p",
"media": [
{
"id": "Image1",
"type": "first_frame",
"url": "https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_1.png"
},
{
"id": "Image2",
"type": "middle_frame",
"url": "https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_2.png"
},
{
"id": "Image3",
"type": "last_frame",
"url": "https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_3.png"
}
]
}
}'圖片轉影片
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-4.0",
"inputs": {
"videoWorkflowTab": "image-to-video",
"prompt": "A cinematic scene. Use the supplied references to guide the action and visual style.",
"duration": "10s",
"outputResolution": "1080p",
"media": [
{
"id": "Image1",
"type": "first_frame",
"url": "https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_1.png"
}
]
}
}'首尾影格
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-4.0",
"inputs": {
"videoWorkflowTab": "first-last-frame",
"prompt": "A cinematic scene. Use the supplied references to guide the action and visual style.",
"duration": "10s",
"outputResolution": "1080p",
"media": [
{
"id": "Image1",
"type": "first_frame",
"url": "https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_1.png"
},
{
"id": "Image2",
"type": "last_frame",
"url": "https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_2.png"
}
]
}
}'多參考
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-4.0",
"inputs": {
"videoWorkflowTab": "multi-reference",
"prompt": "A cinematic scene. Use the supplied references to guide the action and visual style.",
"duration": "10s",
"outputResolution": "1080p",
"ratio": "adaptive",
"media": [
{
"id": "Image1",
"type": "refer_image",
"url": "https://static.seegen.ai/materials/YOUR_UPLOADED_IMAGE_1.png"
},
{
"id": "Video1",
"type": "feature_video",
"url": "https://static.seegen.ai/materials/YOUR_UPLOADED_VIDEO.mp4"
}
]
}
}'參數
使用 videoWorkflowTab 選擇工作流程,使用 prompt 輸入指示,使用 duration 設定整數或秒數字串(預設 10s),使用 outputResolution 設定 720p 或 1080p(預設 1080p),並將 media 設為包含 id、type 和 url 的物件。對於文字轉影片,ratio 接受 16:9、9:16、1:1 和 21:9;多參考模式另外接受 adaptive。圖片/關鍵影格工作流程請省略 ratio。語音和元素參考尚未啟用。
Grok Imagine Video 1.5 / Lite
使用 grok-imagine-video-1.5 或 grok-imagine-video-1.5-lite 搭配 createTask 與 queryTask。兩者皆支援文字轉影片,以及含同步音訊的單張圖片轉影片。僅 1.5 支援首幀/尾幀與多重參考生成。
Grok Imagine Video 1.5: 輸出費用為每秒 30 / 50 / 90 點額度,分別對應 480p / 720p / 1080p;每張輸入圖片另收 5 點額度。音訊不會改變價格。5 秒、480p 且包含一張輸入圖片的影片需 155 點額度。
Grok Imagine Video 1.5 Lite: 輸出影片在 480p/720p/1080p 下每秒分別消耗 8/12/50 點數,另加上每張輸入圖片 5 點數。音訊不會改變價格。含一張輸入圖片的 5 秒 480p 影片需消耗 45 點數。
將 SEEGEN_API_KEY 設為您的 API 金鑰。請將 example.com 圖片 URL 替換為您自己的公開可存取 HTTP(S) 圖片。建立後,儲存 taskId,並使用 queryTask 或 Webhook 回呼 接收最終結果。建立操作會回傳非同步任務,而非已完成的結果。
文字轉影片
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video-1.5",
"inputs": {
"prompt": "A blue toy cube slowly rotates on a white table",
"duration": "5s",
"outputResolution": "480p",
"ratio": "16:9",
"generateAudio": true
}
}'圖片轉影片
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video-1.5",
"inputs": {
"prompt": "A blue toy cube slowly rotates on a white table",
"duration": "5s",
"outputResolution": "480p",
"generateAudio": true,
"urls": [
"https://example.com/first.png"
]
}
}'首尾影格僅限 1.5
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video-1.5",
"inputs": {
"prompt": "A blue toy cube slowly rotates on a white table",
"duration": "5s",
"outputResolution": "480p",
"ratio": "16:9",
"generateAudio": true,
"urls": [
"https://example.com/first.png",
"https://example.com/last.png"
]
}
}'多重參考僅限 1.5
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video-1.5",
"inputs": {
"prompt": "A blue toy cube slowly rotates on a white table",
"duration": "5s",
"outputResolution": "480p",
"ratio": "16:9",
"generateAudio": true,
"urls": [
"https://example.com/reference.png"
],
"videoInputMode": "reference"
}
}'參數
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| prompt | string | 條件式 | prompt:文字生成影片時為必填;提供圖片時可省略。 |
| duration | string | integer | 否 | duration:1 至 15 秒的整數,例如 "5s"(預設值)。outputResolution:480p(預設值)、720p 或 1080p。 |
| outputResolution | string | 否 | 480p(預設)、720p 或 1080p。1.5 支援文字或單張圖片輸入的原生 1080p;首幀/尾幀與多重參考支援 480p 和 720p。Lite 的 1080p 由 720p 放大而來。 |
| ratio | string | 否 | ratio:16:9(預設值)、9:16、1:1、4:3、3:4、3:2、2:3、21:9 或 5:2。單張圖片生成影片會依循輸入圖片的比例。 |
| urls | string[] | 否 | 公開的 HTTP(S) 圖片網址。文字轉影片時省略;提供一張圖片會選擇單張圖片轉影片。Lite 最多接受一張圖片。使用 1.5 時,提供兩張圖片會選擇首幀/尾幀;提供 1–14 張參考圖片時,請設定 videoInputMode: "reference"。 |
| videoInputMode | "keyframe" | "reference" | 否 | 僅限 1.5:keyframe(預設)或 reference。Lite 請省略。 |
| generateAudio | boolean | 否 | generateAudio:布林值,預設為 true。設定為 false 可輸出無聲影片。 |
Wan 3.0 Video 與 Wan 3.0 Video Prime
Wan 3.0 支援文字生影片、首幀圖片生影片、首尾幀過渡、圖片/影片/音訊混合參考、影片編輯和影片延長。wan3.0-video-prime 與 wan3.0-video 接受相同輸入,並針對生成速度進行了最佳化。
兩個別名都使用 SeeGen 的非同步 API:POST /api/v1/jobs/createTask 會回傳 taskId;輪詢 GET /api/v1/jobs/queryTask?taskId=...,或提供 callBackUrl 取得最終結果。
支援的輸出:固定 2–30 秒,原生 480p、720p 或 1080p,無浮水印。不支援自動時長(duration: -1)、2K/4K 輸出或自訂 watermark 設定。請先上傳參考素材,再使用介面回傳的 HTTPS URL。
文字生成影片
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video-prime",
"inputs": {
"prompt": "A red paper boat glides across a calm pond at sunrise, locked camera, no text.",
"duration": "5s",
"outputResolution": "720p",
"ratio": "16:9",
"generateAudio": true,
"promptExtend": true,
"seed": 12345
}
}' \
https://seegen.ai/api/v1/jobs/createTask圖片生成影片(首幀)
請透過 multipart POST /api/v1/assets/upload?model=wan3.0-video(或 Prime 別名)上傳 Wan 素材,並在生成輸入中使用介面回傳且歸目前使用者所有的 HTTPS url。回傳的 assetId 只是 SeeGen 素材記錄 ID,請勿將它傳入生成請求。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-F "file=@/path/to/first-frame.webp" \
"https://seegen.ai/api/v1/assets/upload?model=wan3.0-video"{
"assetId": 123,
"type": "IMAGE",
"status": "ACTIVE",
"url": "https://static.seegen.ai/materials/api/.../first-frame.webp"
}curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"inputs": {
"urls": ["https://static.seegen.ai/materials/api/.../first-frame.webp"],
"videoInputMode": "keyframe",
"prompt": "The subject looks toward the camera as morning mist drifts past.",
"duration": "5s",
"outputResolution": "1080p",
"generateAudio": true
}
}' \
https://seegen.ai/api/v1/jobs/createTask首幀與尾幀
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"inputs": {
"urls": [
"https://static.seegen.ai/materials/api/.../first-frame.webp",
"https://static.seegen.ai/materials/api/.../last-frame.webp"
],
"videoInputMode": "keyframe",
"prompt": "A smooth continuous transition from sunrise to night.",
"duration": "8s",
"outputResolution": "720p"
}
}' \
https://seegen.ai/api/v1/jobs/createTask多重參考(圖片、影片與音訊)
設定 videoInputMode: "reference",並透過 urls、videoUrls 或 audioUrls 傳入至少一種支援的媒體;提示詞為選填。依順序使用 Image1、Image2、Video1 或 Audio1 引用媒體。請先透過 Wan multipart 介面上傳每項參考素材,再使用回傳且歸目前使用者所有的 HTTPS URL。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video-prime",
"inputs": {
"videoInputMode": "reference",
"urls": ["https://static.seegen.ai/materials/api/.../reference-image.webp"],
"videoUrls": ["https://static.seegen.ai/materials/api/.../source-video.mp4"],
"audioUrls": ["https://static.seegen.ai/materials/api/.../reference-audio.mp3"],
"prompt": "Use Image1 for identity, Video1 for motion, and Audio1 for timing.",
"duration": "10s",
"outputResolution": "720p",
"ratio": "16:9",
"generateAudio": true,
"promptExtend": true
}
}' \
https://seegen.ai/api/v1/jobs/createTask影片編輯
先上傳待編輯影片,再設定 mode: "edit" 和 videoInputMode: "reference"。提示詞為必填,用於描述如何編輯 Video1,即 videoUrls 中的第一個影片。畫面比例為自動,輸出時長由你選擇。編輯和延長均適用下方的參考素材限制與計費規則。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"inputs": {
"mode": "edit",
"videoInputMode": "reference",
"videoUrls": ["https://static.seegen.ai/materials/api/.../source-video.mp4"],
"prompt": "Transform Video1 into clay animation, keeping the characters and camera movement.",
"duration": "5s",
"outputResolution": "720p",
"ratio": "adaptive"
}
}' \
https://seegen.ai/api/v1/jobs/createTask影片延長
設定 mode: "extend",提供原始影片和延長指令,例如「將 Video1 向後延長」,並描述後續內容。設定 ratio: "adaptive"。所選 duration 是本次產生的影片長度,不是原影片與延長部分的總長度。暫不支援檔案生影片和網頁生影片。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video-prime",
"inputs": {
"mode": "extend",
"videoInputMode": "reference",
"videoUrls": ["https://static.seegen.ai/materials/api/.../source-video.mp4"],
"prompt": "Extend Video1 forward, continuing the motion of the character and keeping the scene consistent.",
"duration": "5s",
"outputResolution": "720p",
"ratio": "adaptive"
}
}' \
https://seegen.ai/api/v1/jobs/createTaskWan 3.0 參數參考
兩個 Wan 3.0 模型接受相同的 inputs 欄位。輸出時長可選 2–30 秒,以整秒為單位。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| prompt | string | 否 | 影片描述或指令,最多 20,000 字元。文字生影片、影片編輯和影片延長為必填;圖片生影片、首尾幀和多參考模式為選填。編輯和延長還必須提供影片。依素材順序使用 Image1 / Video1 / Audio1 標記。 |
| mode | string | 否 | 一般生成可省略或使用 "normal"。使用 "edit" 或 "extend" 時,必須提供影片和指令提示詞。兩者均使用參考模式、自動畫面比例及 2–30 秒的固定輸出時長。 |
| urls | string[] | 否 | Wan 上傳介面回傳且歸目前使用者所有的圖片 HTTPS URL。文字生成影片時省略;傳入恰好 1 張首幀、恰好 2 張首幀/尾幀,或在參考模式中最多 10 張參考圖片。直接傳入不屬於目前使用者的外部 URL 或 Seedance 素材協定地址會遭拒絕。 |
| videoUrls | string[] | 否 | 參考模式下最多傳入 5 個由 Wan 上傳介面回傳且歸目前使用者所有的參考影片 HTTPS URL。每段影片須為 1–15 秒,參考影片總時長不超過 15 秒,參考影片與輸出時長之和不超過 30 秒。直接傳入不屬於目前使用者的外部 URL 或 Seedance 素材協定地址會遭拒絕。 |
| audioUrls | string[] | 否 | 參考模式下最多傳入 5 個由 Wan 上傳介面回傳且歸目前使用者所有的參考音訊 HTTPS URL。支援 WAV 或 MP3;每段音訊須為 1–15 秒,參考音訊總時長不超過 15 秒。直接傳入不屬於目前使用者的外部 URL 或 Seedance 素材協定地址會遭拒絕。 |
| videoInputMode | string | 否 | 文字生成影片時省略;單一首幀或首幀/尾幀兩張影格使用 "keyframe";混合圖片/影片/音訊參考使用 "reference"。 |
| duration | string | 否 | 從 "2s" 到 "30s" 的整數秒字串。預設值:"5s"。 |
| outputResolution | string | 否 | 原生 "480p"、"720p"(預設)或 "1080p"。不支援 2K/4K 輸出。 |
| ratio | string | 否 | "auto" 或 "adaptive"(均為自動比例)、"16:9"、"9:16"、"1:1"、"4:3" 或 "3:4"。適用於文字生影片和多參考模式。編輯和延長一律使用自動比例;圖片生影片和首尾幀模式的輸出比例由關鍵幀圖片決定。 |
| generateAudio | boolean | 否 | 生成同步語音、音效與音樂。預設為 true。設定為 false 可輸出靜音影片;價格不變。 |
| promptExtend | boolean | 否 | 讓模型在生成前擴充提示詞。預設為 true。 |
| seed | int | 否 | 0–2147483647。使用相同 seed 與輸入可進行高度相似的重試。 |
參考媒體需求
- 圖片:最多 10 張;JPEG/JPG/PNG(不含透明度)/BMP/WebP;每張 ≤20MB;各邊 240–8000px;長寬比最多 8:1
- 影片:最多 5 段 MP4/MOV 片段;每段 ≤100MB;每段 1–15 秒、輸入合計 ≤15 秒,且輸入 + 要求的輸出 ≤30 秒;各邊 240–4096px;長寬比最多 8:1
- 音訊:最多 5 個由 Wan 上傳介面回傳的 WAV/MP3 HTTPS URL;每個 ≤15MB;每個 1–15 秒,合計 ≤15 秒
- 首幀/尾幀模式不得與參考圖片、影片或音訊陣列混用
選擇模型(圖片)
圖片模型接收提示詞(可選擇附上參考圖片),每個任務回傳一張圖片。每次請求依所選模型的等級計費(Seedream Lite 為統一定價)。失敗的任務會自動退款。沒有批次參數——若要產生多個變化版本,請針對每張圖片各呼叫一次 createTask。
| 模型 | T2I | I2I(編輯) | 多參考圖 | 最大解析度 | 2k / medium |
|---|---|---|---|---|---|
| seedream-v5.5 | ✓ | ✓ | 最多 10 張 | 2k | 見價格頁 |
| seedream-v5.0-flash | ✓ | ✓ | 最多 10 張 | 2k | 統一定價 |
| gpt-image-2.5-flare | ✓ | ✓ | 最多 10 張 | 4k | 見價格頁 |
| gpt-image-2.5-sunburst | ✓ | ✓ | 最多 10 張 | 4k | 見價格頁 |
| gpt-image-2 | ✓ | ✓ | 最多 10 張 | 4k | 見價格頁 |
| nano-banana-2.1 | ✓ | ✓ | 最多 14 張 | 4k | 見價格頁 |
| nano-banana-2 | ✓ | ✓ | 最多 10 張 | 4k | 見價格頁 |
| nano-banana-pro | ✓ | ✓ | 最多 10 張 | 4k | 見價格頁 |
| seedream-v5.0-lite | ✓ | ✓ | 最多 10 張 | 4k | 統一定價 |
| seedream-v5.0-pro | ✓ | ✓ | 最多 10 張 | 2k | 見價格頁 |
| qwen-image-2.1-pro | ✓ | ✓ | 最多 10 張 | 2k | 統一定價 |
| qwen-image-2.1-turbo | ✓ | ✓ | 最多 10 張 | 2k | 統一定價 |
GPT Image 2.5 Flare / Sunburst
GPT Image 2.5 Flare 著重快速生成與編輯圖片,Sunburst 則著重細緻的圖片生成與精準編輯。兩者皆可使用文字提示詞及參考圖片。
現已支援工作台、Playground 和 API。兩個模型均支援以下參數:medium/high/xhigh/max 畫質、1K/2K/4K 預設及 PNG/JPEG/WebP 輸出。實際尺寸可能與預設不同。JPEG 和 WebP 由生成的 PNG 轉換,不調整尺寸。每個 API 任務生成一張圖片。
文字轉圖片
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.5-flare",
"inputs": {
"prompt": "A neon-lit cyberpunk alley at midnight, photoreal",
"quality": "medium",
"resolution": "2k",
"aspectRatio": "16:9"
}
}' \
https://seegen.ai/api/v1/jobs/createTask圖片轉圖片(編輯)
透過 urls 傳入 1–10 張參考圖片。模型會將其作為 prompt 所述編輯內容的視覺參考。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.5-sunburst",
"inputs": {
"urls": ["https://example.com/portrait.jpg"],
"prompt": "Restyle as oil painting",
"quality": "medium",
"resolution": "1k",
"aspectRatio": "1:1"
}
}' \
https://seegen.ai/api/v1/jobs/createTaskGPT Image 2.5 參數參考
gpt-image-2.5-flare 模型所有 inputs 參數的完整參考。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| prompt | string | 是 | 欲生成圖片的文字描述,或在提供 urls 時所要套用的編輯指示。 |
| urls | string[] | 否 | 圖片轉圖片(編輯)模式的參考圖片 URL(1–10 張)。文字轉圖片模式請省略。僅接受公開 HTTPS URL。 |
| quality | string | 否 | 「medium」/「high」/「xhigh」/「max」。預設值:「medium」。點數依等級計費(見價格頁)。 |
| resolution | string | 否 | 「1k」/「2k」/「4k」。預設值:「2k」。點數依等級計費(見價格頁)。 |
| aspectRatio | string | 否 | 「1:1」/「16:9」/「9:16」/「4:3」/「3:4」。預設值:「1:1」。 |
| outputFormat | string | 否 | 「png」/「jpeg」/「webp」。預設值:「png」。 |
輸入圖片要求(圖片轉圖片模式)
- 每個任務最多 10 張參考圖片
- 每張圖片檔案大小上限 50 MB
- 最短邊 ≥ 256px
- 長寬比介於 1:3 至 3:1 之間
- 格式:JPEG、JPG、PNG、WEBP
每張圖片的點數依解析度與品質而異——完整表格請見價格章節。
GPT Image 2
OpenAI 的 GPT Image 2 模型,適用於高品質文字轉圖片與圖片轉圖片編輯。單一流程即可支援兩種模式——傳入 urls 會自動切換為編輯模式。輸出結果會以您指定的格式(PNG / JPEG / WEBP)透過 R2 提供。模型名稱:gpt-image-2。
文字轉圖片
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"inputs": {
"prompt": "A neon-lit cyberpunk alley at midnight, photoreal",
"quality": "medium",
"resolution": "2k",
"aspectRatio": "16:9"
}
}' \
https://seegen.ai/api/v1/jobs/createTask圖片轉圖片(編輯)
透過 urls 傳入 1–10 張參考圖片。模型會將其作為 prompt 所述編輯內容的視覺參考。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"inputs": {
"urls": ["https://example.com/portrait.jpg"],
"prompt": "Restyle as oil painting",
"quality": "medium",
"resolution": "1k",
"aspectRatio": "1:1"
}
}' \
https://seegen.ai/api/v1/jobs/createTaskGPT Image 2 參數參考
gpt-image-2 模型所有 inputs 參數的完整參考。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| prompt | string | 是 | 欲生成圖片的文字描述,或在提供 urls 時所要套用的編輯指示。 |
| urls | string[] | 否 | 圖片轉圖片(編輯)模式的參考圖片 URL(1–10 張)。文字轉圖片模式請省略。僅接受公開 HTTPS URL。 |
| quality | string | 否 | 「medium」/「high」。預設值:「medium」。點數依等級計費(見價格頁)。 |
| resolution | string | 否 | 「1k」/「2k」/「4k」。預設值:「2k」。點數依等級計費(見價格頁)。 |
| aspectRatio | string | 否 | 「1:1」/「16:9」/「9:16」/「4:3」/「3:4」。預設值:「1:1」。 |
| outputFormat | string | 否 | 「png」/「jpeg」/「webp」。預設值:「png」。 |
輸入圖片要求(圖片轉圖片模式)
- 每個任務最多 10 張參考圖片
- 每張圖片檔案大小上限 50 MB
- 最短邊 ≥ 256px
- 長寬比介於 1:3 至 3:1 之間
- 格式:JPEG、JPG、PNG、WEBP
每張圖片的點數依解析度與品質而異——完整表格請見價格章節。
Nano Banana 2.1 / 2
Nano Banana 2.1 與 2 皆支援文字生圖與圖片編輯、1K / 2K / 4K 輸出,以及 10 種長寬比。預設輸出:2K、正方形(1:1)。選取版本即可更新下方的模型 ID、範例與參考圖片限制。現有的 nano-banana-2 請求仍受支援。
版本 2.1:使用模型 nano-banana-2.1,最多可提供 14 張參考圖片。版本 2.1 支援 14 張參考圖片;版本 2 支援 10 張。
每個 API 任務會回傳一張圖片,並依解析度計費。
在 API Playground 中試用 Nano Banana 2.1文字轉圖片
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2.1",
"inputs": {
"prompt": "A neon-lit cyberpunk alley at midnight, photoreal",
"resolution": "2k",
"aspectRatio": "16:9"
}
}' \
https://seegen.ai/api/v1/jobs/createTask圖片轉圖片(編輯)
透過 urls 傳入 1–14 張參考圖片。於 prompt 中描述要變更的內容,以及需要保留的細節。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2.1",
"inputs": {
"urls": ["https://example.com/portrait.jpg"],
"prompt": "Restyle as oil painting",
"resolution": "2k",
"aspectRatio": "1:1"
}
}' \
https://seegen.ai/api/v1/jobs/createTaskNano Banana 2.1 參數參考
nano-banana-2.1 模型所有 inputs 參數的完整參考。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| prompt | string | 是 | 欲生成圖片的文字描述,或在提供 urls 時所要套用的編輯指示。 |
| urls | string[] | 否 | 用於編輯的 1–14 個公開 HTTP(S) 參考圖片網址。文字生圖時省略此欄位。 |
| resolution | string | 否 | 「1k」/「2k」/「4k」。預設值:「2k」。點數依等級計費(見價格頁)。 |
| aspectRatio | string | 否 | 「1:1」/「16:9」/「9:16」/「4:3」/「3:4」/「3:2」/「2:3」/「4:5」/「5:4」/「21:9」。預設值:「1:1」。 |
輸入圖片要求(圖片轉圖片模式)
- 每個任務最多 14 張參考圖片
- 每張圖片檔案大小上限 50 MB
- 最短邊 ≥ 256px
- 長寬比介於 1:3 至 3:1 之間
- 格式:JPEG、JPG、PNG、WEBP
每張圖片的點數依解析度而異——完整表格請見價格章節。
Nano Banana Pro
Nano Banana Pro 是高保真圖片模型,長寬比涵蓋範圍比 gpt-image-2 更廣——新增直向/橫向預設(3:2、2:3、4:5、5:4)與電影感 21:9。單一流程即可支援兩種模式——傳入 urls 會自動切換為編輯模式。模型名稱:nano-banana-pro。
文字轉圖片
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-pro",
"inputs": {
"prompt": "A neon-lit cyberpunk alley at midnight, photoreal",
"resolution": "2k",
"aspectRatio": "16:9"
}
}' \
https://seegen.ai/api/v1/jobs/createTask圖片轉圖片(編輯)
透過 urls 傳入 1–10 張參考圖片。模型會將其作為 prompt 所述編輯內容的視覺參考。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-pro",
"inputs": {
"urls": ["https://example.com/portrait.jpg"],
"prompt": "Restyle as oil painting",
"resolution": "2k",
"aspectRatio": "1:1"
}
}' \
https://seegen.ai/api/v1/jobs/createTaskNano Banana Pro 參數參考
nano-banana-pro 模型所有 inputs 參數的完整參考。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| prompt | string | 是 | 欲生成圖片的文字描述,或在提供 urls 時所要套用的編輯指示。 |
| urls | string[] | 否 | 圖片轉圖片(編輯)模式的參考圖片 URL(1–10 張)。文字轉圖片模式請省略。僅接受公開 HTTPS URL。 |
| resolution | string | 否 | 「1k」/「2k」/「4k」。預設值:「2k」。點數依等級計費(見價格頁)。 |
| aspectRatio | string | 否 | 「1:1」/「16:9」/「9:16」/「4:3」/「3:4」/「3:2」/「2:3」/「4:5」/「5:4」/「21:9」。預設值:「1:1」。 |
輸入圖片要求(圖片轉圖片模式)
- 每個任務最多 10 張參考圖片
- 每張圖片檔案大小上限 50 MB
- 最短邊 ≥ 256px
- 長寬比介於 1:3 至 3:1 之間
- 格式:JPEG、JPG、PNG、WEBP
每張圖片的點數依解析度而異——完整表格請見價格章節。
Seedream 5.5
支援 1K、2K 圖片生成與編輯、15 種長寬比和最多 10 張參考圖。模型名稱:seedream-v5.5。每個任務生成一張圖片。
文字轉圖片
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-v5.5",
"inputs": {
"prompt": "Photorealistic close-up of a young adult woman with a short black bob, wispy bangs, dark brown eyes, and naturally rosy cheeks. She holds a bitten red-and-yellow apple against her slightly parted lips, looking directly into the camera with a curious, candid expression. Pink-and-white gingham blouse with delicate white lace ruffles and a small pale pink hair bow.\nHer face fills the center-right of the frame, with her hand and apple prominent in the lower-left foreground. Softly blurred pastel interior with colorful decorations and glowing round pendant lights. Gentle natural daylight, warm creamy tones, subtle film grain, visible skin texture, shallow depth of field, nostalgic Japanese lifestyle photography, intimate snapshot composition. no text or watermark.",
"resolution": "2k",
"aspectRatio": "16:9"
}
}'圖片轉圖片(編輯)
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-v5.5",
"inputs": {
"prompt": "Replace the brown tabby cat with an orange tabby cat. Preserve its pose, expression, size, and position. Keep the fish, water splashes, lighting, background, and composition unchanged.",
"resolution": "2k",
"aspectRatio": "16:9",
"urls": [
"https://static.seegen.ai/web-static/public/api-playground/seedream-5-5/v1/seedream-5-5-original-image.webp"
]
}
}'Seedream 5.5 參數參考
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| prompt | string | 是 | 圖片描述或編輯指示。 |
| urls | string[] | 否 | 1–10 個公開 HTTPS 參考圖片 URL。文字轉圖片模式請省略。 |
| resolution | "1k" | "2k" | 否 | "1k" 或 "2k",預設 "2k",不支援 4K。 |
| aspectRatio | string | 否 | 「1:1」、「1:2」、「2:1」、「1:3」、「3:1」、「2:3」、「3:2」、「3:4」、「4:3」、「4:5」、「5:4」、「9:16」、「16:9」、「9:21」或「21:9」。 |
1K:每張圖片 10 積分;2K:每張圖片 17 積分。每張參考圖另收 4 積分,包括第一張。
Seedream 5.5Seedream 5.0 Flash
支援 1K、1.5K、2K 文字生圖與圖像編輯,提供 15 種比例,最多使用 10 張參考圖。模型名稱:seedream-v5.0-flash。每個任務生成一張圖片。
文字轉圖片
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-v5.0-flash",
"inputs": {
"prompt": "A single plain cobalt blue ceramic mug centered on a light gray studio background, soft natural lighting, product photography, no text.",
"resolution": "1.5k",
"aspectRatio": "1:1",
"outputFormat": "png"
}
}'圖片轉圖片(編輯)
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-v5.0-flash",
"inputs": {
"prompt": "Change only the blue mug to bright red. Preserve the composition, shape, background, shadows and lighting.",
"resolution": "2k",
"aspectRatio": "1:1",
"outputFormat": "png",
"urls": [
"https://static.seegen.ai/web-static/public/api-playground/seedream-v5-flash/v1/text-to-image.webp"
]
}
}'Seedream 5.0 Flash 參數參考
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| prompt | string | 是 | 圖片描述或編輯指示。 |
| urls | string[] | 否 | 1–10 個公開 HTTPS 參考圖片 URL。文字轉圖片模式請省略。 |
| resolution | "1k" | "1.5k" | "2k" | 否 | "1k"、"1.5k" 或 "2k",預設 "2k"。不支援 4K。 |
| aspectRatio | string | 否 | 「1:1」、「1:2」、「2:1」、「1:3」、「3:1」、「2:3」、「3:2」、「3:4」、「4:3」、「4:5」、「5:4」、「9:16」、「16:9」、「9:21」或「21:9」。 |
| outputFormat | "png" | "jpeg" | 否 | "png" 或 "jpeg",預設 "png"。 |
各解析度均為每張生成圖片 8 積分,參考圖免費。
Seedream 5.0 FlashSeedream 5.0 Lite
以 2K 或 4K 快速生成文字轉圖片與圖片轉圖片,支援 15 種長寬比。模型名稱:seedream-v5.0-lite。
文字轉圖片
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-v5.0-lite",
"inputs": {
"prompt": "A cinematic product photograph, soft studio light",
"resolution": "2k",
"aspectRatio": "1:1"
}
}' \
https://seegen.ai/api/v1/jobs/createTask圖片轉圖片(編輯)
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-v5.0-lite",
"inputs": {
"prompt": "Restyle the references as a premium fashion campaign",
"urls": ["https://example.com/reference.png"],
"resolution": "4k",
"aspectRatio": "3:4"
}
}' \
https://seegen.ai/api/v1/jobs/createTaskSeedream 5.0 Lite 參數
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| prompt | string | 是 | 圖片描述或編輯指示。 |
| urls | string[] | 否 | 1–10 個公開 HTTPS 參考圖片 URL。文字轉圖片模式請省略。 |
| resolution | string | 否 | 「2k」或「4k」。預設值:「2k」。 |
| aspectRatio | string | 否 | 「1:1」、「1:2」、「2:1」、「1:3」、「3:1」、「2:3」、「3:2」、「3:4」、「4:3」、「4:5」、「5:4」、「9:16」、「16:9」、「9:21」或「21:9」。 |
Seedream 5.0 Pro
以 1K 或 2K 進行高保真生成與編輯。模型名稱:seedream-v5.0-pro。
文字轉圖片
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-v5.0-pro",
"inputs": {
"prompt": "Editorial portrait with dramatic rim lighting",
"resolution": "2k",
"aspectRatio": "3:4"
}
}' \
https://seegen.ai/api/v1/jobs/createTask圖片轉圖片(編輯)
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-v5.0-pro",
"inputs": {
"prompt": "Turn the reference into a cinematic poster",
"urls": ["https://example.com/reference.png"],
"resolution": "2k",
"aspectRatio": "1:2"
}
}' \
https://seegen.ai/api/v1/jobs/createTaskSeedream 5.0 Pro 參數
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| prompt | string | 是 | 圖片描述或編輯指示。 |
| urls | string[] | 否 | 1–10 個公開 HTTPS 參考圖片 URL。文字轉圖片模式請省略。 |
| resolution | string | 否 | 「1k」或「2k」。預設值:「1k」。不支援 4k。 |
| aspectRatio | string | 否 | 「1:1」、「1:2」、「2:1」、「1:3」、「3:1」、「2:3」、「3:2」、「3:4」、「4:3」、「4:5」、「5:4」、「9:16」、「16:9」、「9:21」或「21:9」。 |
Qwen Image 2.1 Pro / Turbo
使用 qwen-image-2.1-pro 或 qwen-image-2.1-turbo。兩者皆可透過相同端點支援文字生成圖片與圖片編輯,每項任務輸出一張圖片。
Pro:每張圖片 13 點額度。Turbo:每張圖片 5 點額度。1K 與 2K 費用相同。價格已包含任何目前有效的圖片優惠。
將 SEEGEN_API_KEY 設為您的 API 金鑰。請將 example.com 圖片 URL 替換為您自己的公開可存取 HTTP(S) 圖片。建立後,儲存 taskId,並使用 queryTask 或 Webhook 回呼 接收最終結果。建立操作會回傳非同步任務,而非已完成的結果。
文字轉圖片
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-2.1-pro",
"inputs": {
"prompt": "A blue glass cube on a white table",
"resolution": "1k",
"aspectRatio": "1:1"
}
}'圖片轉圖片
curl -X POST https://seegen.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SEEGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-2.1-pro",
"inputs": {
"prompt": "Restyle the reference image as a watercolor painting",
"resolution": "1k",
"aspectRatio": "1:1",
"urls": [
"https://example.com/reference.png"
]
}
}'參數
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| prompt | string | 是 | prompt:必填。描述圖片內容,或說明要對參考圖片進行的變更。 |
| resolution | "1k" | "2k" | 否 | resolution:1k(預設值)或 2k。aspectRatio:1:1(預設值)、16:9、9:16、4:3、3:4、3:2、2:3、4:5、5:4 或 21:9。解析度代表像素面積級別,因此矩形輸出的兩側尺寸可能不同。 |
| aspectRatio | string | 否 | resolution:1k(預設值)或 2k。aspectRatio:1:1(預設值)、16:9、9:16、4:3、3:4、3:2、2:3、4:5、5:4 或 21:9。解析度代表像素面積級別,因此矩形輸出的兩側尺寸可能不同。 |
| urls | string[] | 否 | urls:選填,最多 10 個公開 HTTP(S) 圖片 URL。每張圖片大小上限為 10 MB,長寬皆須介於 1 至 8000 像素,且長寬比介於 1:10 至 10:1。支援格式:JPEG、PNG、BMP、TIFF、WebP 和 GIF。瀏覽器檔案上傳支援 JPEG、PNG、BMP、WebP 和 GIF;TIFF 請使用公開 URL,瀏覽器可能無法顯示預覽。 |
如有需要,請在提示詞中要求透明背景。PNG 透明度會獲得保留。如要建立多個輸出,請分別提交任務;Playground 可批次提交 1–4 項任務。
試用 Qwen Image 2.1Qwen Image 2.1 Turbo影片放大工具
建立任務
POST /api/v1/upscale/create
# source.url accepts ANY https video URL — your own CDN, OR a file you first
# uploaded to us via /api/v1/assets/upload (pass the r2Url it returns). No need
# to declare which: we detect it. External URLs are validated; our own are trusted.
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": { "type": "url", "url": "https://your-cdn.com/video.mp4" },
"targetResolution": "2k",
"callBackUrl": "https://your-server.com/webhook"
}' \
https://seegen.ai/api/v1/upscale/create| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| source.type | string | 是 | 任何來源都使用 "url"。("uploadId" 是為了向下相容而保留的舊版別名。) |
| source.url | string | 否 | 搭配 type="url" 使用。任何 https 影片網址皆可——您自己的 CDN,或 /api/v1/assets/upload 回傳的 r2Url。外部網址若使用 http 或私有/內部 IP 會被拒絕(SSRF 防護);我們自家素材主機上的網址則會略過此檢查。 |
| source.r2Url | string | 否 | 舊版欄位——僅搭配 type="uploadId" 使用(向下相容)。新串接請改用 type="url"。 |
| targetResolution | string | 是 | "720p"、"1080p"、"2k" 或 "4k"。必須高於來源解析度。 |
| callBackUrl | string | 否 | 任務進入最終狀態(完成或失敗)時觸發一次的 Webhook 網址。 |
建立回應
{
"taskId": "n770mo4sh6rpi690ff3gwymx",
"orderId": "ord_2026...",
"status": "validating"
}查詢狀態
GET /api/v1/upscale/query?taskId=...
狀態流程為 validating → processing → completed / failed。
curl -H "Authorization: Bearer $API_KEY" \
"https://seegen.ai/api/v1/upscale/query?taskId=n770mo4sh6rpi690ff3gwymx"完成回應
{
"taskId": "n770mo4sh6rpi690ff3gwymx",
"status": "completed",
"targetResolution": "2k",
"creditsConsumed": 900,
"result": {
"url": "https://static.seegen.ai/standalone-upscale/results/...mp4",
"probedDurationSeconds": 30,
"probedSourceResolution": "1280x720"
},
"error": null,
"createdAt": "2026-04-29T01:23:45.000Z",
"finishedAt": "2026-04-29T01:35:01.000Z"
}失敗回應
{
"taskId": "n770mo4sh6rpi690ff3gwymx",
"status": "failed",
"creditsConsumed": null,
"result": null,
"error": {
"code": "SOURCE_RESOLUTION_TOO_HIGH",
"message": "Source 3840x2160 is not below target 4k"
}
}限制
- 來源:https 網址或您先前上傳的 R2 網址
- 長度最多 600 秒(未滿 5 秒的片段按 5 秒計費)
- 檔案大小 ≤ 200 MB
- 格式:MP4 / MOV / WebM
- 來源解析度必須低於目標解析度
價格
- 720P:17 點數/秒(5 秒 = 85,30 秒 = 510)
- 1080P:25 點數/秒(5 秒 = 125,30 秒 = 750)
- 2K:38 點數/秒(5 秒 = 190,30 秒 = 1140)
- 4K:50 點數/秒(5 秒 = 250,30 秒 = 1500)
- 最低收費 5 秒;失敗會自動退還點數
錯誤代碼
以下是可直接處理的常見錯誤。其他失敗會回傳意義清楚的 message 欄位——在假設是以下代碼之前,請先讀取該欄位。
| 代碼 | 意義 |
|---|---|
| INVALID_URL | 網址格式錯誤或非 https |
| URL_NOT_REACHABLE | 無法取得該網址——請確認網址公開且可存取 |
| UNSUPPORTED_MEDIA_TYPE | 檔案並非影片,或格式不是 MP4 / MOV / WebM |
| FILE_TOO_LARGE | 來源檔案超過 200 MB |
| DURATION_EXCEEDS_LIMIT | 來源長度超過 600 秒 |
| SOURCE_RESOLUTION_TOO_HIGH | 來源解析度已達到或超過目標——請選擇更高的目標解析度 |
| INSUFFICIENT_CREDITS | 點數不足——請儲值後再試 |
| ACCOUNT_FROZEN | 帳戶目前無法扣點數 — 請聯絡客服 |
Webhook 回呼
除了輪詢之外,您也可以提供 callBackUrl,在任務完成或失敗時自動接收結果。
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sd2",
"callBackUrl": "https://your-server.com/webhook/callback",
"inputs": {
"prompt": "A cat playing piano",
"duration": "5s"
}
}' \
https://seegen.ai/api/v1/jobs/createTask回呼內容
任務完成時,我們會以與 queryTask 回應相同的格式,向您的網址發送 POST 請求:
{
"taskId": "task_abc123",
"orderId": "order_abc123",
"model": "sd2",
"status": "COMPLETED",
"creditsUsed": 200,
"output": [
{
"url": "https://static.seegen.ai/videos/result.mp4",
"width": 1280,
"height": 720
}
],
"error": null,
"createTime": 1711234567890,
"completeTime": 1711234612345
}重試政策:首次嘗試後,如收到非 2xx 回應或發生網路錯誤,系統最多會在 1 秒、5 秒及 30 秒後各重試一次。請依 taskId 以冪等方式處理重複回呼;若未收到回呼,請使用 queryTask 作為備援。重試次數耗盡後,不保證一定能成功傳遞。
回應格式
createTask 回應
{ "taskId": "task_abc123", "orderId": "order_abc123" }queryTask 回應
{
"taskId": "task_abc123",
"orderId": "order_abc123",
"model": "sd2",
"status": "COMPLETED",
"creditsUsed": 200,
"output": [
{
"url": "https://static.seegen.ai/videos/result.mp4",
"width": 1280,
"height": 720
}
],
"error": null,
"createTime": 1711234567890,
"completeTime": 1711234612345
}credits 回應
{
"credits": 5000,
"availableCredits": 4800
}錯誤處理
| 狀態碼 | 含義 | 處理方式 |
|---|---|---|
| 400 | 參數無效 | 檢查錯誤訊息並修正您的請求 |
| 401 | API 金鑰無效或缺失 | 檢查 Authorization 標頭格式 |
| 402 | 點數不足 | 開啟 Credits 購買點數或啟用自動儲值,然後重試請求 |
| 403 | 存取被拒 | 您只能查詢自己的任務 |
| 404 | 找不到任務 | 確認 taskId 是否正確 |
| 500 | 伺服器內部錯誤 | 重試建立請求前,請先檢查錯誤與任務記錄;即使回應遺失,仍可能已建立任務。 |
提交前驗證(附錯誤碼的 HTTP 400)
Seedance 與 Wan 3.0 要求會在扣除點數前依 SeeGen 產品規則驗證。驗證失敗時,createTask 回傳 HTTP 400 與 { "message": "...", "code": "..." };Wan 錯誤還可能包含 path。不會建立任務或扣除點數。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| EMPTY_CONTENT | code | 否 | 沒有提示詞,也沒有參考圖片/影片/音訊。 |
| AUDIO_ONLY_NOT_SUPPORTED | code | 否 | 在 sd2 / sd2-fast / sd2-mini 上,音訊不能作為唯一參考。請加入圖片或影片,或改用 sd2.5(支援純音訊)。 |
| UNSUPPORTED_MODEL | code | 否 | 不支援此模型別名。Wan 3.0 僅可使用確切的 "wan3.0-video-prime" 或 "wan3.0-video"。 |
| UNSUPPORTED_RESOLUTION | code | 否 | 所選輸出層級無法使用。Wan 3.0 上線版本僅支援原生 480P/720P/1080P;2K/4K 和 upscaleResolution 會被拒絕。 |
| DURATION_OUT_OF_RANGE | code | 否 | duration 必須是符合模型範圍的整數(Wan 3.0「2s」至「30s」、sd2 系列「4s」至「15s」、sd2.5「4s」至「30s」)。不提供 Wan 智慧時長(-1)。 |
| INVALID_MEDIA_COMBINATION | code | 否 | 媒體內容與所選模式不符(例如關鍵幀數量錯誤、文字轉影片模式包含媒體、多重參考模式沒有媒體,或混用關鍵幀與參考輸入)。 |
| EDIT_SOURCE_VIDEO_REQUIRED / EXTEND_SOURCE_VIDEO_REQUIRED | code | 否 | 請求了 "edit" / "extend" 模式,但 videoUrls 中沒有影片。 |
| EDIT_SOURCE_DURATION_INVALID | code | 否 | sd2.5 Video Edit:請求中的某個影片短於 4 秒或長於 30 秒(ARK 對編輯任務的每個影片都套用 4–30 秒的限制)。 |
| TOO_MANY_REFERENCES | code | 否 | 參考圖片/影片/音訊片段數量超過模型接受的上限(Wan 3.0 為 10/5/5,sd2 系列為 9/3/3,sd2.5 為 30/10/10;最多可延長 3 部影片)。 |
| REFERENCE_VIDEO_DURATION_INVALID | code | 否 | 某部參考影片超過單段上限、合計參考影片輸入超過模型上限,或輸入與輸出的組合無效。Wan 3.0:每段 1–15s,輸入總長度 ≤15s,且輸入加上要求的輸出長度 ≤30s(15+15 有效;15+16 會被拒絕)。 |
| REFERENCE_AUDIO_DURATION_INVALID | code | 否 | 已知的 Wan 3.0 參考音訊時長超出每段 1–15 秒範圍,或使參考音訊輸入合計超過 15 秒。 |
| REFERENCE_IMAGE_INVALID | code | 否 | Wan 3.0 圖片不存在、不屬於目前使用者、媒體類型不符,或違反已知的檔案大小、格式、尺寸、長寬比或不得含透明區域要求。 |
| REFERENCE_VIDEO_INVALID | code | 否 | 為 Wan 3.0 上傳的影片不符合檔案大小、MP4/MOV 格式、尺寸或長寬比要求。 |
| REFERENCE_AUDIO_INVALID | code | 否 | 為 Wan 3.0 上傳的音訊檔案不符合檔案大小或 WAV/MP3 格式要求。 |
| ASSET_NOT_FOUND / EXTERNAL_URL / READ_TIMEOUT / READ_FAILED | code | 否 | videoUrls 中的某個項目無法對應到您已上傳的素材,或無法讀取其時長。 |
完整範例
完整流程:上傳素材、等待審核、以已核准的素材建立任務,並輪詢結果。
const API_KEY = process.env.API_KEY;
const BASE = "https://seegen.ai/api/v1";
const headers = {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json",
};
// 1. Upload asset and wait for review
// (To upload a LOCAL file instead of a URL, POST multipart/form-data with a "file"
// field — no Content-Type header, no "type" — see the Upload Asset section above.)
async function uploadAndWaitForAsset(url, type = "IMAGE") {
const res = await fetch(`${BASE}/assets/upload`, {
method: "POST",
headers,
body: JSON.stringify({ url, type }),
signal: AbortSignal.timeout(120_000),
});
if (!res.ok) throw new Error(`Upload failed: ${(await res.json()).message}`);
const asset = await res.json();
console.log(`Asset uploaded: ${asset.assetId}, status: ${asset.status}`);
// Poll until review completes
const deadline = Date.now() + 15 * 60_000;
while (true) {
const statusRes = await fetch(
`${BASE}/assets/status?assetId=${asset.assetId}`,
{ headers, signal: AbortSignal.timeout(30_000) }
);
if (!statusRes.ok) throw new Error(`Asset query failed (${statusRes.status}): ${await statusRes.text()}`);
const status = await statusRes.json();
if (status.status === "ACTIVE") {
console.log(`Asset approved: asset://${status.volcAssetId}`);
return status.volcAssetId;
}
if (status.status === "FAILED") {
throw new Error(`Asset review failed: ${status.failReason}`);
}
if (Date.now() >= deadline) throw new Error(`Review pending: query assetId=${asset.assetId} later`);
await new Promise((r) => setTimeout(r, 3000));
}
}
// 2. Create a task
async function createTask(inputs, callBackUrl) {
const res = await fetch(`${BASE}/jobs/createTask`, {
method: "POST",
headers,
body: JSON.stringify({
model: "sd2",
inputs,
...(callBackUrl && { callBackUrl }),
}),
signal: AbortSignal.timeout(120_000),
});
if (!res.ok) throw new Error(`[${res.status}] ${(await res.json()).message}`);
return res.json();
}
// 3. Poll until done
async function waitForResult(taskId, timeoutMs = 900000) {
const start = Date.now();
while (Date.now() - start < timeoutMs) {
const res = await fetch(
`${BASE}/jobs/queryTask?taskId=${taskId}`,
{ headers, signal: AbortSignal.timeout(30_000) }
);
if (!res.ok) throw new Error(`Query failed for ${taskId} (${res.status}): ${await res.text()}`);
const result = await res.json();
if (result.status === "COMPLETED") return result;
if (result.status === "FAILED") throw new Error(result.error);
await new Promise((r) => setTimeout(r, 5000));
}
throw new Error(`Still processing: query taskId=${taskId} later`);
}
// Full workflow: upload → review → generate → result
async function main() {
// Upload image and wait for review
const volcAssetId = await uploadAndWaitForAsset(
"https://example.com/photo.jpg", "IMAGE"
);
// Create task with approved asset
const { taskId } = await createTask({
urls: [`asset://${volcAssetId}`],
prompt: "The person slowly looks up and smiles",
duration: "5s",
});
console.log(`Task: ${taskId}`);
// Wait for video
const result = await waitForResult(taskId);
console.log(`Video: ${result.output[0].url}`);
}
main().catch(console.error);