限时优惠:最高立省 55%,Seedance 低至 $0.02/秒。立即体验

SeeGen AI API

欢迎使用 SeeGen AI API —— 一个 API,即可调用多款顶尖模型生成电影级视频与高保真图像。

概览

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 张参考图。

基础 URL: https://seegen.ai/api/v1

模型: 将上述任一别名传入 model 字段即可(例如 sd2、gpt-image-2)。

为什么选择 SeeGen AI?

选择 SeeGen AI 的更多理由:

  • 不止 Seedance 2.0:还有 Wan 3.0、Nano Banana、ChatGPT Image 等更多模型。
  • 无需订阅 —— 按量付费
  • 第一时间接入最新模型
  • 全天候客户支持
  • 支持官方模型相关咨询
  • 面向开发者的控制台访问权限
  • 企业与个人用户均可使用

价格

40% OFF

API Pack

$500$833

125,000 积分 ($0.004/积分)

约 1,136 个 5 秒视频

40% OFF

API-XL Pack

$2,000$3,332

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: 480p20 × out15 × (out + in)
sd2.5-flash: 720p40 × out30 × (out + in)
sd2.5: 480P30 × out23 × (out + in)
sd2.5: 720P60 × out45 × (out + in)
sd2.5: 1080P (原生)150 × out113 × (out + in)
sd2.5: 2K(60 + 30) × out45 × (out + in) + 30 × out
sd2.5: 4K (原生)241 × out187 × (out + in)
sd2-pro: 480P20 × out15 × (out + in)
sd2-pro: 720P40 × out30 × (out + in)
sd2-pro: 1080P (原生)100 × out75 × (out + in)
sd2-pro: 2K(40 + 30) × out30 × (out + in) + 30 × out
sd2-pro: 4K (原生)200 × out150 × (out + in)
sd2-fast: 480P11 × out16 × out8.5 × (out + in)12 × (out + in)
sd2-fast: 720P22 × out32 × out17 × (out + in)24 × (out + in)
sd2-fast: 1080P(22 + 20) × out(32 + 20) × out17 × (out + in) + 20 × out24 × (out + in) + 20 × out
sd2-fast: 2K(22 + 30) × out(32 + 30) × out17 × (out + in) + 30 × out24 × (out + in) + 30 × out
sd2-fast: 4K(22 + 40) × out(32 + 40) × out17 × (out + in) + 40 × out24 × (out + in) + 40 × out
sd2-mini: 480P4.5 × out10 × out3.5 × (out + in)7.5 × (out + in)
sd2-mini: 720P9 × out20 × out7 × (out + in)15 × (out + in)
sd2-mini: 1080P(9 + 20) × out(20 + 20) × out7 × (out + in) + 20 × out15 × (out + in) + 20 × out
sd2-mini: 2K(9 + 30) × out(20 + 30) × out7 × (out + in) + 30 × out15 × (out + in) + 30 × out
sd2-mini: 4K(9 + 40) × out(20 + 40) × out7 × (out + in) + 40 × out15 × (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

MiniMax H3
分辨率输出积分 / 秒参考视频积分 / 秒
768P2727
2K4343

前 5 张图片免费;每增加一张图片需 11 积分。

MiniMax H3 Max
分辨率输出积分 / 秒参考视频积分 / 秒
480P1820
768P2752

前 2 张图片免费;每增加一张图片需 27 积分。

MiniMax H3 Max Turbo
分辨率输出积分 / 秒参考视频积分 / 秒
480P10—
768P14—

前 2 张图片免费;每增加一张图片需 27 积分。

积分 = 输出秒数 × 输出费率 + 每个输入视频向上取整到整数秒的时长之和 × 输入视频费率 + 超出免费额度的图片数量 × 图片费率。所有输入图片都会计入,包括首帧和尾帧。音频参考免费。服务器测得的视频时长决定计费金额;客户端提供的时长将被忽略。失败的任务会退还预留积分。

Kling 4.0

积分 / 秒
分辨率无视频输入包含视频输入
720P5432
1080P8048

不含输入视频:720p 每个输出秒消耗 54 个积分,1080p 每个输出秒消耗 80 个积分。含输入视频:720p 每个计费秒消耗 32 个积分,1080p 每个计费秒消耗 48 个积分。服务器会测量每个输入视频,并在求和前将其时长向上取整到整秒。计费秒数 = 输出时长 + max(向上取整后的输入总时长,输出时长)。最终积分数向上取整。30 秒输入时长限制按取整前的实际时长计算。

在 API Playground 中试用 Kling 4.0

Grok Imagine Video 1.5

分辨率积分 / 秒
480P30
720P50
1080P90

输出费用为每秒 30 / 50 / 90 积分,分别对应 480p / 720p / 1080p;每张输入图像另收 5 积分。音频不会改变价格。生成一段 5 秒 480p 视频并提供一张输入图像,费用为 155 积分。

urls:公开的 HTTP(S) 图像 URL。提供一张图像时选择单图生视频;提供两张图像时选择首尾帧生成。为 1–14 张参考图设置 videoInputMode: "reference"。首尾帧和多参考图输出支持 480p 和 720p。

Grok Imagine Video 1.5 Lite

分辨率积分 / 秒
480P8
720P12
1080P50

480p / 720p / 1080p 输出每秒分别消耗 8 / 12 / 50 积分,每张输入图片额外消耗 5 积分。音频不会改变价格。一段 5 秒、480p 且包含一张输入图片的视频消耗 45 积分。

urls:零个或一个公开的 HTTP(S) 图片 URL。提供一张图片时将选择图生视频,并遵循其宽高比。不支持多张图片、参考图模式、视频和音频输入。

Wan 3.0 Video / Prime — 费用计算

设 out = 输出秒数,in = 每段参考视频时长向上取整到整秒后的总和。不带参考视频:credits = out × rate;带参考视频:credits = (out + in) × rate。请按下表选择对应模型与分辨率的费率。

模型原生输出积分 / 秒2 秒示例
wan3.0-video-prime480P2244
720P4590
1080P90180
wan3.0-video480P1632
720P3264
1080P64128

注意: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 画质
1k35132023355075
2k (默认)7102335375584125
4k1015406067100154230

每个任务生成 1 张图片。提交 N 个任务即可获得 N 个变体。失败任务将自动退还积分。

gpt-image-2 — 每张图片积分

分辨率中等质量高质量
1k10154770
2k (默认)233584125
4k4060154230

每个任务生成 1 张图片。提交 N 个任务即可获得 N 个变体。失败任务将自动退还积分。

Nano Banana — 每张图消耗的积分

分辨率nano-banana-2.1nano-banana-2nano-banana-pro
1k20304060
2k (默认)30454060
4k477074110

每个任务生成 1 张图片。提交 N 个任务即可获得 N 个变体。失败任务将自动退还积分。

Seedream 5.5 — 每张图片积分

项目 / 档位积分
1k1015
2k (默认)1725
参考图(每张)46

每个任务生成 1 张图片。提交 N 个任务即可获得 N 个变体。失败任务将自动退还积分。 所有参考图均单独计费,包括第一张。

Seedream 5.0 — 每张图片积分

模型 / 档位积分
Flash 1k / 1.5k / 2k(一口价)812
Lite 2k / 4k(统一价)710
Pro 1k (默认)1015
Pro 2k2030

每个任务生成 1 张图片。提交 N 个任务即可获得 N 个变体。失败任务将自动退还积分。 参考图不单独计费。

Qwen Image 2.1 Pro / Turbo

分辨率qwen-image-2.1-proqwen-image-2.1-turbo
1k132058
2k132058

Pro:每张图像 13 积分。Turbo:每张图像 5 积分。1K 和 2K 价格相同。价格已包含当前生效的图像促销优惠。

每个任务生成 1 张图片。提交 N 个任务即可获得 N 个变体。失败任务将自动退还积分。 参考图不单独计费。

查询余额:GET /api/v1/account/credits

API 账户自动充值

API 密钥与 SeeGen AI 控制台共用同一个账户积分余额。自动充值可为 API 任务持续补充余额,但必须在 Credits 页面配置;目前没有单独的配置 API。

在 Credits 中设置自动充值:

  1. 打开 Credits,设置希望维持的最低余额,并选择一个充值包。
  2. 一次性授权支付方式。此步骤只保存授权,不会扣款。
  3. 灵活授权生效后,可直接在 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

接口

POST/api/v1/jobs/createTask

创建新的图片或视频生成任务

GET/api/v1/jobs/queryTask

查询任务状态和结果

GET/api/v1/jobs/relations

查询样片与正片的关联

GET/api/v1/account/credits

查询积分余额

POST/api/v1/assets/upload

上传素材(图片/视频/音频)以供审核

GET/api/v1/assets/status

查询素材审核状态

POST/api/v1/assets/review

开始或重试平台素材审核

GET/api/v1/assets/list

列出已上传的素材

POST/api/v1/upscale/create

提交独立的视频超分辨率任务(720p / 1080p / 2K / 4K)

GET/api/v1/upscale/query

轮询独立超分辨率任务的状态和结果

选择模型(视频)

根据工作流、原生分辨率、速度和价格选择视频模型;结合 定价 部分估算成本。

模型T2VI2V首尾帧多参考R2V原生 1080p原生 4K音频720p / 5秒
sd2.5✓✓✓✓—✓✓✓300 积分
sd2.5-flash✓✓✓✓———✓200 积分
sd2✓✓✓✓—✓✓✓200 积分
sd2-fast✓✓✓✓—超分超分✓110 积分160 积分
sd2-mini✓✓✓✓—超分超分✓45 积分100 积分
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
参数类型必填描述
promptstring是对要生成视频的文字描述。最多 20000 字符。
durationstring否视频时长:"4s" 到 "15s";sd2.5 最长支持 "30s"(默认:"5s")
resolutionstring否通过分辨率指定宽高比。可选值:auto(默认)、720x720、720x960、960x720、1280x720、720x1280、1280x540
outputResolutionstring否输出分辨率档位:"480p"、"720p"(默认)、"1080p"、"2k" 或 "4k"。Seedance 2.0 Pro 和 Seedance 2.5 原生支持 480p/720p/1080p/4k;Fast 和 Mini 原生支持 480p/720p。其余档位自动超分。生成样片时请省略此字段,固定输出 480p。
seedint否可复现性种子:-1 或省略表示随机;0–2147483647 表示固定值。
generateAudioboolean否是否合成同步音轨。默认为 true;传入 false 则生成无声视频。

图生视频

将静态图像转化为动态视频。提供一个图像 URL 作为起始帧。

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
参数类型必填描述
urlsstring[]是包含一个图像 URL(源帧)的数组。支持 HTTP URL 和资源引用(例如 "asset://asset-20260326-abc123")
promptstring否对期望动作效果的文字描述
durationstring否视频时长:"4s" 到 "15s";sd2.5 最长支持 "30s"(默认:"5s")
outputResolutionstring否输出分辨率档位:"480p"、"720p"(默认)、"1080p"、"2k" 或 "4k"。Seedance 2.0 Pro 和 Seedance 2.5 原生支持 480p/720p/1080p/4k;Fast 和 Mini 原生支持 480p/720p。其余档位自动超分。生成样片时请省略此字段,固定输出 480p。
seedint否可复现性种子:-1 或省略表示随机;0–2147483647 表示固定值。
generateAudioboolean否是否合成同步音轨。默认为 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
参数类型必填描述
urlsstring[]是包含恰好 2 个图像 URL 的数组:[首帧, 尾帧]。支持 HTTP URL 和资源引用(例如 "asset://asset-20260326-abc123")
videoInputModestring是必须为 "keyframe"
promptstring否指导过渡效果的文字描述
durationstring否视频时长:"4s" 到 "15s";sd2.5 最长支持 "30s"(默认:"5s")
outputResolutionstring否输出分辨率档位:"480p"、"720p"(默认)、"1080p"、"2k" 或 "4k"。Seedance 2.0 Pro 和 Seedance 2.5 原生支持 480p/720p/1080p/4k;Fast 和 Mini 原生支持 480p/720p。其余档位自动超分。生成样片时请省略此字段,固定输出 480p。
seedint否可复现性种子:-1 或省略表示随机;0–2147483647 表示固定值。
generateAudioboolean否是否合成同步音轨。默认为 true;传入 false 则生成无声视频。

多参考

使用多个参考图像、视频和音频文件来指导生成。使用 videoInputMode: "reference"。对于 sd2.5,这是默认的参考子任务;如需编辑或续写已有视频,请参见下方的 Video Edit & Extend。

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
参数类型必填描述
urlsstring[]否参考图像 URL(最多 9 张)。支持 HTTP URL 和资源引用(例如 "asset://asset-20260326-abc123")
videoUrlsstring[]否参考视频的 asset:// URI —— 需先通过 /api/v1/assets/upload 上传;不接受外部 URL。sd2:最多 3 个视频,每个 ≤15 秒。sd2.5:最多 10 个视频,每个 2–30 秒且 ≤200MB,参考总时长 ≤30 秒,支持 480p–4K 输入。
audioUrlsstring[]否参考音频输入。sd2 / sd2-fast / sd2-mini:最多 3 个音频文件,每个 2–15 秒,总时长 ≤15 秒——这些模型上音频不能作为唯一参考(需至少添加一张图像或一个视频)。sd2.5:最多 10 个文件,每个 ≤15MB 且 2–30 秒,总时长 ≤30 秒,且支持纯音频输入。
videoInputModestring是必须为 "reference"
promptstring否文字描述
durationstring否视频时长:"4s" 到 "15s";sd2.5 最长支持 "30s"(默认:"5s")
resolutionstring是参考模式下必填。可选值:720x720、720x960、960x720、1280x720、720x1280、1280x540
outputResolutionstring否输出分辨率档位:"480p"、"720p"(默认)、"1080p"、"2k" 或 "4k"。Seedance 2.0 Pro 和 Seedance 2.5 原生支持 480p/720p/1080p/4k;Fast 和 Mini 原生支持 480p/720p。其余档位自动超分。生成样片时请省略此字段,固定输出 480p。
seedint否可复现性种子:-1 或省略表示随机;0–2147483647 表示固定值。
generateAudioboolean否是否合成同步音轨。默认为 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
参数类型必填描述
modestring否“edit”或“extend”。普通参考生成时省略。
videoUrlsstring[]是至少一个视频;第一个为源视频(“Video 1”)——编辑输出时长和计费均以它为准。之后的视频为额外参考(edit)或按顺序拼接的更多片段(extend,最多 3 个)。
urlsstring[]否可选的标注/参考图片。
source_frame_timestamps_msnumber[]否仅限 mode 为“edit”时使用。urls 中每张图片对应一个非负的源视频毫秒时间戳。
outputResolutionstring否输出分辨率档位:"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 费率。若样片使用了输入视频,正片仍按那些原始输入视频的时长计费;样片视频本身不作为额外输入视频计费。
参数类型必填描述
draftboolean否仅限 sd2.5。设为 true 可生成原生 480P 样片。不要传 outputResolution 或 upscaleResolution,API 会固定为 480P;不支持编辑、延长和超分。
draftSourceOrderIdstring否当前账号已完成的 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 参数的完整参考。

参数类型必填描述
promptstring否文字描述(文生视频必填,其他模式可选)。最多 20000 字符。
urlsstring[]否图片 URL。同时支持 HTTP URL 和素材引用(例如 “asset://asset-20260326-abc123”)。内部映射为 uploadedUrls。
videoUrlsstring[]否视频参考 asset:// URI(仅参考模式)。必须先通过 /api/v1/assets/upload 上传——外部 URL 将被拒绝。
audioUrlsstring[]否音频参考 URL(仅参考模式)。sd2.5 支持纯音频输入;sd2 / sd2-fast / sd2-mini 需要在音频之外至少附带一张图片或一个视频。
durationstring否通常为 “4s” 至 “15s”;sd2.5 最长支持 “30s”。默认值:“5s”
resolutionstring否宽高比:auto(默认)| 720x720 | 720x960 | 960x720 | 1280x720 | 720x1280 | 1280x540
outputResolutionstring否输出分辨率档位:"480p"、"720p"(默认)、"1080p"、"2k" 或 "4k"。Seedance 2.0 Pro 和 Seedance 2.5 原生支持 480p/720p/1080p/4k;Fast 和 Mini 原生支持 480p/720p。其余档位自动超分。生成样片时请省略此字段,固定输出 480p。
videoInputModestring否“keyframe”(默认)或 “reference”
modestring否参考模式子任务(所有 Seedance 模型):省略表示普通参考生成,“edit”表示编辑 videoUrls 中的第一个视频,“extend”表示延续 1-3 个片段。详见视频编辑与延展。
source_frame_timestamps_msnumber[]否仅限 sd2.5 视频编辑:每张标注图片对应一个非负的毫秒时间戳。
seedint否用于结果复现的随机种子。填 -1 或省略表示服务器随机。相同种子加相同输入会得到高度接近的结果(因 GPU 的非确定性,并非逐位相同)。取值范围:-1 至 2147483647。
draftboolean否仅限 sd2.5。设为 true 生成 480P 样片;参见“从样片到正片”。
draftSourceOrderIdstring否仅限 sd2.5。当前 API 账号拥有的已完成样片的 orderId;生成原生 1080P 正片。
generateAudioboolean否是否合成与视频同步的音轨(语音、音效、背景音乐)。默认 true。设为 false 可生成无声视频——速度稍快,适合计划另行配音的场景。
bitrateModestring否同一分辨率下的输出码率档位:“standard”(默认)或 “high”。“high”能保留更多细节并减少色带/块状瑕疵,文件体积约为 3-5 倍——不会改变分辨率或价格。
upscaleResolutionstring否(已弃用)旧版拆分字段,仍保留以兼容旧版本。新接入应使用 outputResolution,现已可直接传入 “2k” / “4k”。若两者同时传入,upscaleResolution 优先——但在原生支持 1080p 的模型上(Seedance2 Pro / Seedance 2.5),upscaleResolution:“1080p” 会解析为原生 1080p(按原生费率计费)。

顶层请求字段:model(必填)、inputs(必填)、callBackUrl(可选 webhook URL)。

Seedance 素材

Seedance 素材是图片、视频和音频文件,在用于 Seedance 视频生成任务前需经过字节火山审核流程。上传素材、等待其变为 ACTIVE 状态,然后在 Seedance 任务中使用其 asset:// URL。

注意: 真人图片和视频素材需要经过官方审核,通常在数秒内完成。审核通过后即可直接用作参考。未经审核可能导致生成失败。

平台内容预检

当您的账户启用素材审核后,上传内容还会由 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 URL。无论哪种方式,素材都会自动处理和审核。

方式 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
参数类型必填描述
filefile是本地文件(multipart 表单字段)。媒体类型通过内容检测。
namestring否素材名称(最多 64 个字符)

方式 B — 通过 URL(application/json)

适用于文件已托管在可公开访问的 HTTPS URL 上的情况。

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
参数类型必填描述
urlstring是要上传文件的公开可访问 HTTPS URL
typestring是"IMAGE"、"AUDIO" 或 "VIDEO"
namestring否素材名称(最多 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 — 供应商审核已通过;使用前还需检查平台 contentReview
  • 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"
参数类型必填描述
typestring否按类型筛选:"IMAGE"、"AUDIO" 或 "VIDEO"
statusstring否按状态筛选:"NONE"、"PROCESSING"、"ACTIVE" 或 "FAILED"
cursornumber否分页游标(使用上一次响应中的 nextCursor)
limitnumber否每页条数,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 中使用其 volcAssetId 配合 asset:// 协议:

{
  "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 Playground
curl -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 Playground
curl -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 Playground
curl -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 Playground
curl -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 Playground
curl -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 Playground
curl -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 Playground
curl -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 Playground
curl -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 Playground
curl -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 Playground
curl -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 Playground
curl -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"
    ]
  }
}'

参数

参数类型必填描述
promptstring是所有模式都必须提供非空的场景描述。
videoWorkflowTabstring否text-to-video、image-to-video、first-last-frame 或 multi-reference。Turbo 不支持 multi-reference。省略时,将根据输入推断模式。
durationstring | integer否默认为 5 秒。H3:4–15 个整数秒。Max 和 Turbo:5–15 个整数秒。
outputResolutionstring否默认为 768p。H3:768p 或 2k。Max 和 Turbo:480p 或 768p。这些是模型直接输出的分辨率档位;请省略 upscaleResolution。
ratiostring否16:9、9:16、1:1、4:3、3:4、21:9 或 adaptive。文生视频需要固定宽高比。首尾帧生成遵循图片宽高比。
urlsstring[]否图生视频需提供且仅提供一个首帧 URL;帧模式需按顺序提供且仅提供两个首尾帧 URL;多参考模式最多提供 9 张参考图。
videoUrls / audioUrlsstring[]否仅适用于多参考模式,每种类型最多 3 个文件。请使用调用方自行上传的素材 URL。
promptExpansionModestring否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。

图片须为 JPG/PNG,最大 30 MB,且两边均至少为 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"
  }
}'

参数

参数类型必填描述
promptstring条件prompt:文生视频时必填;提供图像时可选。
durationstring | integer否duration:1 到 15 秒的整数,例如 "5s"(默认值)。outputResolution:480p(默认值)、720p 或 1080p。
outputResolutionstring否480p(默认)、720p 或 1080p。1.5 支持文本或单图输入原生生成 1080p;首帧/尾帧和多参考图支持 480p 和 720p。Lite 的 1080p 由 720p 放大生成。
ratiostring否ratio:16:9(默认值)、9:16、1:1、4:3、3:4、3:2、2:3、21:9 或 5:2。单图生视频将遵循输入图像的比例。
urlsstring[]否公开的 HTTP(S) 图片 URL。文生视频时省略;提供一张图片时选择单图生视频。Lite 最多接受一张图片。使用 1.5 时,提供两张图片可选择首帧/尾帧;提供 1–14 张参考图片时,将 videoInputMode: "reference" 设置为参考图模式。
videoInputMode"keyframe" | "reference"否仅限 1.5:keyframe(默认)或 reference。Lite 请省略。
generateAudioboolean否generateAudio:布尔值,默认为 true。设置为 false 可生成无声视频。
试用 Grok Imagine Video 1.5试用 Grok Imagine Video 1.5 Lite

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/createTask

Wan 3.0 参数参考

两个 Wan 3.0 模型接受相同的 inputs 字段。输出时长可选 2–30 秒,以整秒为单位。

参数类型必填描述
promptstring否视频描述或指令,最多 20,000 字符。文生视频、视频编辑和视频延长必填;图生视频、首尾帧和多参考模式可选。编辑和延长还必须提供视频。按素材顺序使用 Image1 / Video1 / Audio1 标记。
modestring否常规生成可省略或使用 "normal"。使用 "edit" 或 "extend" 时,必须提供视频和指令提示词。两者均使用参考模式、自动画面比例和 2–30 秒的固定输出时长。
urlsstring[]否Wan 上传接口返回且归当前用户所有的图片 HTTPS URL。文生视频时省略;传入恰好 1 张首帧、恰好 2 张首尾帧,或在参考模式下最多 10 张参考图片。直接传入不属于当前用户的外部 URL 或 Seedance 素材协议地址会被拒绝。
videoUrlsstring[]否参考模式下最多传入 5 个由 Wan 上传接口返回且归当前用户所有的参考视频 HTTPS URL。每段视频须为 1–15 秒,参考视频总时长不超过 15 秒,参考视频与输出时长之和不超过 30 秒。直接传入不属于当前用户的外部 URL 或 Seedance 素材协议地址会被拒绝。
audioUrlsstring[]否参考模式下最多传入 5 个由 Wan 上传接口返回且归当前用户所有的参考音频 HTTPS URL。支持 WAV 或 MP3;每段音频须为 1–15 秒,参考音频总时长不超过 15 秒。直接传入不属于当前用户的外部 URL 或 Seedance 素材协议地址会被拒绝。
videoInputModestring否文生视频时省略;单首帧或首尾帧时使用 "keyframe";混合图片/视频/音频参考时使用 "reference"。
durationstring否从 "2s" 到 "30s" 的整秒数字符串。默认值:"5s"。
outputResolutionstring否原生 "480p"、"720p"(默认)或 "1080p"。不支持 2K/4K 输出。
ratiostring否"auto" 或 "adaptive"(均为自动比例)、"16:9"、"9:16"、"1:1"、"4:3" 或 "3:4"。适用于文生视频和多参考模式。编辑和延长始终使用自动比例;图生视频和首尾帧模式的输出比例由关键帧图片决定。
generateAudioboolean否生成同步语音、音效和音乐。默认值为 true。设为 false 可生成静音输出;价格不变。
promptExtendboolean否让模型在生成前扩展提示词。默认值为 true。
seedint否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 秒
  • 首尾帧模式不能与参考图片、视频或音频数组混用

选择模型(图片)

图像模型接收一个 prompt(可选附带参考图)并为每个任务返回一张图片。每次请求按所选模型的档位计费(Seedream Lite 为固定费率)。失败的任务会自动退款。没有批量参数——如需生成多张变体,请为每张图片单独调用一次 createTask。

模型T2II2I(编辑)多参考最大分辨率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/createTask

GPT Image 2.5 参数参考

gpt-image-2.5-flare 模型全部 inputs 参数的完整参考。

参数类型必填描述
promptstring是要生成的图像的文字描述;若提供了 urls,则为要应用的编辑说明。
urlsstring[]否图生图(编辑)模式的参考图 URL(1–10 张)。文生图模式下省略此项。仅接受公开的 HTTPS URL。
qualitystring否"medium" / "high" / "xhigh" / "max"。默认值:"medium"。积分消耗按档位递增(详见定价)。
resolutionstring否"1k" / "2k" / "4k"。默认值:"2k"。积分消耗按档位递增(详见定价)。
aspectRatiostring否"1:1" / "16:9" / "9:16" / "4:3" / "3:4"。默认值:"1:1"。
outputFormatstring否"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/createTask

GPT Image 2 参数参考

gpt-image-2 模型全部 inputs 参数的完整参考。

参数类型必填描述
promptstring是要生成的图像的文字描述;若提供了 urls,则为要应用的编辑说明。
urlsstring[]否图生图(编辑)模式的参考图 URL(1–10 张)。文生图模式下省略此项。仅接受公开的 HTTPS URL。
qualitystring否"medium" / "high"。默认值:"medium"。积分消耗按档位递增(详见定价)。
resolutionstring否"1k" / "2k" / "4k"。默认值:"2k"。积分消耗按档位递增(详见定价)。
aspectRatiostring否"1:1" / "16:9" / "9:16" / "4:3" / "3:4"。默认值:"1:1"。
outputFormatstring否"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/createTask

Nano Banana 2.1 参数参考

nano-banana-2.1 模型全部 inputs 参数的完整参考。

参数类型必填描述
promptstring是要生成的图像的文字描述;若提供了 urls,则为要应用的编辑说明。
urlsstring[]否用于编辑的 1–14 个公开 HTTP(S) 参考图 URL。文生图时省略。
resolutionstring否"1k" / "2k" / "4k"。默认值:"2k"。积分消耗按档位递增(详见定价)。
aspectRatiostring否"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/createTask

Nano Banana Pro 参数参考

nano-banana-pro 模型全部 inputs 参数的完整参考。

参数类型必填描述
promptstring是要生成的图像的文字描述;若提供了 urls,则为要应用的编辑说明。
urlsstring[]否图生图(编辑)模式的参考图 URL(1–10 张)。文生图模式下省略此项。仅接受公开的 HTTPS URL。
resolutionstring否"1k" / "2k" / "4k"。默认值:"2k"。积分消耗按档位递增(详见定价)。
aspectRatiostring否"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 参数参考

参数类型必填描述
promptstring是图像描述或编辑指令。
urlsstring[]否1–10 个公开的 HTTPS 参考图 URL。文生图模式下省略此项。
resolution"1k" | "2k"否"1k" 或 "2k",默认 "2k",不支持 4K。
aspectRatiostring否"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.5

Seedream 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 参数参考

参数类型必填描述
promptstring是图像描述或编辑指令。
urlsstring[]否1–10 个公开的 HTTPS 参考图 URL。文生图模式下省略此项。
resolution"1k" | "1.5k" | "2k"否"1k"、"1.5k" 或 "2k",默认 "2k"。不支持 4K。
aspectRatiostring否"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 Flash

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/createTask

Seedream 5.0 Lite 参数

参数类型必填描述
promptstring是图像描述或编辑指令。
urlsstring[]否1–10 个公开的 HTTPS 参考图 URL。文生图模式下省略此项。
resolutionstring否"2k" 或 "4k"。默认值:"2k"。
aspectRatiostring否"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/createTask

Seedream 5.0 Pro 参数

参数类型必填描述
promptstring是图像描述或编辑指令。
urlsstring[]否1–10 个公开的 HTTPS 参考图 URL。文生图模式下省略此项。
resolutionstring否"1k" 或 "2k"。默认值:"1k"。不支持 4k。
aspectRatiostring否"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"
    ]
  }
}'

参数

参数类型必填描述
promptstring是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。分辨率代表像素面积档位,因此矩形输出的边长会有所不同。
aspectRatiostring否resolution:1k(默认值)或 2k。aspectRatio:1:1(默认值)、16:9、9:16、4:3、3:4、3:2、2:3、4:5、5:4 或 21:9。分辨率代表像素面积档位,因此矩形输出的边长会有所不同。
urlsstring[]否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.typestring是任意来源使用 "url"。("uploadId" 是为向后兼容保留的旧版别名。)
source.urlstring否配合 type="url" 使用。任意 https 视频链接——可以是你自己的 CDN,也可以是 /api/v1/assets/upload 返回的 r2Url。对于外部 URL,http 及私有/内网 IP 会被拒绝(SSRF 防护);我们自有素材主机上的 URL 会跳过该检查。
source.r2Urlstring否旧版字段——仅配合 type="uploadId" 使用(向后兼容)。新接入应使用 type="url"。
targetResolutionstring是"720p"、"1080p"、"2k" 或 "4k"。必须高于源视频分辨率。
callBackUrlstring否任务进入终态(completed 或 failed)时调用一次的 Webhook URL。

创建响应

{
  "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 URL
  • 时长最长 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_URLURL 格式错误或不是 https
URL_NOT_REACHABLE无法获取该 URL——请检查其是否公开可访问
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

回调负载

任务完成时,我们会向你的 URL 发送一个 POST 请求,格式与 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
}

重试策略:首次尝试后,如果收到非 2xx 响应或发生网络错误,系统最多重试 3 次,间隔分别为 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参数无效检查错误信息并修正请求
401API 密钥无效或缺失检查 Authorization 请求头格式
402积分不足打开 Credits 购买积分或启用自动充值,然后重试请求
403访问被拒绝你只能查询自己的任务
404任务未找到确认 taskId 是否正确
500服务器内部错误重试创建请求前,请先检查错误和任务历史记录;即使响应丢失,也可能已经创建了任务。

提交前校验(带错误码的 HTTP 400)

Seedance 和 Wan 3.0 请求会在扣除积分前按 SeeGen 产品规则校验。校验失败时,createTask 返回 HTTP 400 和 { "message": "...", "code": "..." };Wan 错误还可能包含 path。不会创建任务或扣费。

参数类型必填描述
EMPTY_CONTENTcode否既未提供 prompt,也没有参考图片 / 视频 / 音频。
AUDIO_ONLY_NOT_SUPPORTEDcode否在 sd2 / sd2-fast / sd2-mini 上,参考素材仅有音频。请添加图片或视频,或改用 sd2.5(支持仅音频)。
UNSUPPORTED_MODELcode否不支持该模型别名。对于 Wan 3.0,必须使用 "wan3.0-video-prime" 或 "wan3.0-video"。
UNSUPPORTED_RESOLUTIONcode否所选输出档位不可用。Wan 3.0 发布版本仅支持原生 480P / 720P / 1080P;2K/4K 和 upscaleResolution 会被拒绝。
DURATION_OUT_OF_RANGEcode否duration 不是模型范围内的整数(Wan 3.0「2s」–「30s」,sd2 系列「4s」–「15s」,sd2.5「4s」–「30s」)。不提供 Wan 智能时长(-1)。
INVALID_MEDIA_COMBINATIONcode否媒体与所选模式不匹配(例如关键帧数量错误、文本生成视频中包含媒体、多参考模式缺少媒体,或混用了关键帧和参考输入)。
EDIT_SOURCE_VIDEO_REQUIRED / EXTEND_SOURCE_VIDEO_REQUIREDcode否请求了 mode "edit" / "extend",但 videoUrls 中没有视频。
EDIT_SOURCE_DURATION_INVALIDcode否sd2.5 Video Edit:请求中某个视频时长短于 4s 或长于 30s(ARK 对 edit 任务中的每个视频都要求 4–30s)。
TOO_MANY_REFERENCEScode否参考图片 / 视频 / 音频片段数量超过模型接受上限(Wan 3.0 为 10 / 5 / 5,sd2 系列为 9 / 3 / 3,sd2.5 为 30 / 10 / 10;可扩展至 ≤3 个视频)。
REFERENCE_VIDEO_DURATION_INVALIDcode否某个参考视频超过单片段时长上限,参考视频总输入超过模型上限,或输入与输出组合无效。对于 Wan 3.0:每个片段为 1–15s,总输入 ≤15s,且输入时长 + 请求的输出时长 ≤30s(15+15 有效;15+16 会被拒绝)。
REFERENCE_AUDIO_DURATION_INVALIDcode否已知的 Wan 3.0 参考音频时长超出每段 1–15 秒范围,或使参考音频输入合计超过 15 秒。
REFERENCE_IMAGE_INVALIDcode否Wan 3.0 图片不存在、不属于当前用户、媒体类型不符,或违反已有的文件大小、格式、尺寸、宽高比或禁止透明通道要求。
REFERENCE_VIDEO_INVALIDcode否为 Wan 3.0 上传的视频不符合文件大小、MP4/MOV 格式、尺寸或宽高比要求。
REFERENCE_AUDIO_INVALIDcode否为 Wan 3.0 上传的音频文件不符合文件大小或 WAV/MP3 格式要求。
ASSET_NOT_FOUND / EXTERNAL_URL / READ_TIMEOUT / READ_FAILEDcode否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);

需要帮助?加入我们的 Discord 或 联系我们