總覽
SeeGen AI 是統一的生成 API:透過一致的端點集合,即可執行多款頂尖 AI 影片與影像模型。只需以 model 參數選擇模型——所有模型的身分驗證、任務提交、狀態查詢與 Webhook 運作方式皆相同。
目前提供的模型:
- 影片 — Seedance 2.5 (
sd2.5)、Seedance 2.0 Pro (sd2)、Fast (sd2-fast)、Mini (sd2-mini)、Wan 3.0 Video Prime (wan3.0-video-prime)、Wan 3.0 Video (wan3.0-video) - 影像:GPT Image 2 (
gpt-image-2)、Nano Banana 2 (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)
基礎網址: 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/點數)
約 781 支 5 秒影片
API-XL Pack
500,000 點數 ($0.004/點數)
約 3,125 支 5 秒影片
Seedance 2.0 / Fast / Mini / 2.5:費用計算
設 out 為 output_seconds,in 為每支輸入影片 ⌈時長⌉ 的總和(各自無條件進位,下限為 out × 2/3)。Seedance 2.5 的計算方式與 Seedance 2.0 相同。套用任務公式前,各對應模型的基礎費率會先乘以 1.5 並取整(1080P 在 sd2.5 上為原生輸出,費率為其 720P 費率的 2.5 倍);與模型無關的升頻附加費維持 2K / 4K 每輸出秒 +30 / +40 點數(僅 sd2-fast / sd2-mini 的 1080P 為 +20)。
| 無影片輸入 | 包含影片輸入 | |
|---|---|---|
| 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 | (60 + 40) × out | 45 × (out + in) + 40 × out |
| 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 | 16 × out | 12 × (out + in) |
| sd2-fast: 720P | 32 × out | 24 × (out + in) |
| sd2-fast: 1080P | (32 + 20) × out | 24 × (out + in) + 20 × out |
| sd2-fast: 2K | (32 + 30) × out | 24 × (out + in) + 30 × out |
| sd2-fast: 4K | (32 + 40) × out | 24 × (out + in) + 40 × out |
| sd2-mini: 480P | 10 × out | 7.5 × (out + in) |
| sd2-mini: 720P | 20 × out | 15 × (out + in) |
| sd2-mini: 1080P | (20 + 20) × out | 15 × (out + in) + 20 × out |
| sd2-mini: 2K | (20 + 30) × out | 15 × (out + in) + 30 × out |
| sd2-mini: 4K | (20 + 40) × out | 15 × (out + in) + 40 × out |
備註: sd2-pro 的 1080P 與 4K 為官方原生輸出(4K = 720P 費率的 5 倍);sd2-pro 的 2K 以及所有 sd2-fast / sd2-mini 的 1080P/2K/4K 皆由 SeeGen AI 升頻產生。sd2.5 原生支援 480P/720P/1080P(1080P 費率為 720P 的 2.5 倍,不加收升頻費),2K/4K 則自動升頻。透過 outputResolution: "4k" 即可請求任一畫質(例如 "2k" / "4k";閘道會自動選擇原生或升頻——差異僅在價格與 Native 標籤)。sd2-mini 定價為 sd2-pro 的 50%,是最低成本的等級。Seedance 2.5 沿用 Seedance 2.0 的單支影片時長進位、最低輸入時長下限與升頻計算方式。任務計算前,各對應模型的基礎費率會先乘以 1.5 並取整(例如含影片的 1080P:75 × 1.5 → 113)。與模型無關的 2K / 4K 升頻附加費維持每輸出秒 +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 點數
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-2 與 nano-banana-pro:每張圖片點數
| 解析度 | nano-banana-2 | nano-banana-pro |
|---|---|---|
| 1k | 2030 | 4060 |
| 2k (預設) | 3045 | 4060 |
| 4k | 4770 | 74110 |
每個任務產生 1 張圖片,需 N 個變化請提交 N 個任務。任務失敗會自動退還點數。
Seedream 5.0:每張圖片點數
| 模型/級別 | 點數 |
|---|---|
| Lite 2k/4k(統一費率) | 710 |
| Pro 1k (預設) | 1015 |
| Pro 2k | 2030 |
每個任務產生 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 金鑰。
快速開始
兩步驟生成影片:建立任務,然後輪詢取得結果。
# 1. Create a text-to-video task
TASK_ID=$(curl -s -X POST \
-H "Authorization: Bearer $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 | jq -r '.taskId')
echo "Task created: $TASK_ID"
# 2. Poll for result
while true; do
RESULT=$(curl -s -H "Authorization: Bearer $API_KEY" \
"https://seegen.ai/api/v1/jobs/queryTask?taskId=$TASK_ID")
STATUS=$(echo $RESULT | jq -r '.status')
echo "Status: $STATUS"
if [ "$STATUS" = "COMPLETED" ] || [ "$STATUS" = "FAILED" ]; then
echo $RESULT | jq .
break
fi
sleep 5
done端點
/api/v1/jobs/createTask建立新的影片生成任務
/api/v1/jobs/queryTask查詢任務狀態與結果
/api/v1/account/credits查詢您的點數餘額
/api/v1/assets/upload上傳素材(圖片/影片/音訊)供審核
/api/v1/assets/status查詢素材審核狀態
/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 | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ | ✓ | 200 點數 |
| sd2-fast | ✓ | ✓ | ✓ | ✓ | — | 升頻 | 升頻 | ✓ | 160 點數 |
| sd2-mini | ✓ | ✓ | ✓ | ✓ | — | 升頻 | 升頻 | ✓ | 100 點數 |
| wan3.0-video-prime | ✓ | ✓ | ✓ | ✓ | — | ✓ | — | ✓ | 225 點數 |
| wan3.0-video | ✓ | ✓ | ✓ | ✓ | — | ✓ | — | ✓ | 160 點數 |
T2V = 文字轉影片 · I2V = 圖片轉影片(首格) · First–Last = 首尾影格 · Multi-Ref = 混合圖片/影片/音訊參考 · 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:480p/720p/1080p/4k;Seedance 2.0 Fast 與 Mini:480p/720p;Seedance 2.5:480p/720p/1080p。超過原生解析度的等級將自動升頻。 |
| 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"], // or "asset://asset-20260326-abc123"
"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:480p/720p/1080p/4k;Seedance 2.0 Fast 與 Mini:480p/720p;Seedance 2.5:480p/720p/1080p。超過原生解析度的等級將自動升頻。 |
| 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:480p/720p/1080p/4k;Seedance 2.0 Fast 與 Mini:480p/720p;Seedance 2.5:480p/720p/1080p。超過原生解析度的等級將自動升頻。 |
| 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:480p/720p/1080p/4k;Seedance 2.0 Fast 與 Mini:480p/720p;Seedance 2.5:480p/720p/1080p。超過原生解析度的等級將自動升頻。 |
| 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:480p/720p/1080p/4k;Seedance 2.0 Fast 與 Mini:480p/720p;Seedance 2.5:480p/720p/1080p。超過原生解析度的等級將自動升頻。 |
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:480p/720p/1080p/4k;Seedance 2.0 Fast 與 Mini:480p/720p;Seedance 2.5:480p/720p/1080p。超過原生解析度的等級將自動升頻。 |
| 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。 |
| 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:// 網址。
注意:真人圖片與影片素材需經官方審核,通常在數秒內完成。審核通過後即可直接作為參考使用。未經審核可能導致生成失敗。
上傳素材
有兩種上傳方式:直接傳送本機檔案(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— 審核通過,可用於任務FAILED— 審核失敗,請查看 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"
}
}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 |
|---|---|---|---|---|---|
| gpt-image-2.5-flare | ✓ | ✓ | 最多 10 張 | 4k | 見價格頁 |
| gpt-image-2.5-sunburst | ✓ | ✓ | 最多 10 張 | 4k | 見價格頁 |
| gpt-image-2 | ✓ | ✓ | 最多 10 張 | 4k | 見價格頁 |
| nano-banana-2 | ✓ | ✓ | 最多 10 張 | 4k | 見價格頁 |
| nano-banana-pro | ✓ | ✓ | 最多 10 張 | 4k | 見價格頁 |
| seedream-v5.0-lite | ✓ | ✓ | 最多 10 張 | 4k | 統一定價 |
| seedream-v5.0-pro | ✓ | ✓ | 最多 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
Nano Banana 2 是高保真圖片模型,長寬比涵蓋範圍比 gpt-image-2 更廣——新增直向/橫向預設(3:2、2:3、4:5、5:4)與電影感 21:9。單一流程即可支援兩種模式——傳入 urls 會自動切換為編輯模式。模型名稱:nano-banana-2。
文字轉圖片
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2",
"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-2",
"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 參數參考
nano-banana-2 模型所有 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
每張圖片的點數依解析度而異——完整表格請見價格章節。
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.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」。 |
影片放大工具
建立任務
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 請求:
// POST to your callBackUrl
{
"taskId": "task_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 秒)重試最多 3 次。
回應格式
createTask 回應
// 200 OK
{ "taskId": "task_abc123" }queryTask 回應
{
"taskId": "task_abc123",
"model": "sd2",
"status": "COMPLETED", // "PENDING" | "PROCESSING" | "COMPLETED" | "FAILED"
"creditsUsed": 200,
"output": [ // null when status is not "COMPLETED"
{
"url": "https://static.seegen.ai/videos/result.mp4",
"width": 1280,
"height": 720
}
],
"error": null, // error message when status is "FAILED"
"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 }),
});
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
while (true) {
const statusRes = await fetch(
`${BASE}/assets/status?assetId=${asset.assetId}`,
{ headers }
);
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}`);
}
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 }),
}),
});
if (!res.ok) throw new Error(`[${res.status}] ${(await res.json()).message}`);
return res.json();
}
// 3. Poll until done
async function waitForResult(taskId, timeoutMs = 300000) {
const start = Date.now();
while (Date.now() - start < timeoutMs) {
const res = await fetch(
`${BASE}/jobs/queryTask?taskId=${taskId}`,
{ headers }
);
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("Timeout waiting for task");
}
// 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);