Sora 2 Pro Image to Video API
openai/sora-2-pro/image-to-videoSora 2 Pro(Image to Video)将高保真静态首帧图片演化为最高 1080p 全高清动态视频,支持 auto 原生画幅与多档分辨率。它能够在严格锁定原图主体身份、微观纹理与精妙光影的同时,赋予画面平滑的三维镜头调度与物理动力学演变。
openai/sora-2-pro/image-to-video
请选择其他模型继续创作

Seedance 2.5
ByteDance Seed's Seedance 2.5 video model with separate text-to-video, start/end-frame image-to-video, and multimodal reference-to-video API workflows at 480p, 720p, or 1080p for 4 to 30 seconds.
起价
$0.140
每输出秒

MiniMax H3
MiniMax H3 on Vidgo API with separate text-to-video, start/end-frame image-to-video, and multimodal reference-to-video workflows at fixed 2K output.
起价
$0.105
每秒

Seedance 2.0
ByteDance Seedance 2.0 Standard and Fast video generation with text, ordered start/end frames, or multimodal image, video, and audio references.
起价
$0.100
每输出秒

Hailuo 2.3
MiniMax's Hailuo 2.3 video model for realistic human motion, expressive characters, and text-to-video or first-frame guided generation at 768p and 1080p.
起价
$0.175
每个视频

Kling 3.0
Kuaishou's most advanced video model with native 4K/60fps output, multi-shot storyboarding, multilingual audio, and character consistency for up to 3 people.
起价
$0.135
每秒
已下线:此模型不再接受生成请求,以下 API 资料仅供历史参考。
REST API
快速开始
配置 API Key 与首帧图片,提交旗舰 1080p 图生视频任务并轮询成片。
第一步:配置 API 鉴权
在请求头中携带 Authorization: Bearer <VIDGO_API_KEY> 完成身份验证。
- 任务提交端点
- POST
https://api.vidgo.ai/api/generate/submit - 鉴权请求头
- Authorization: Bearer VIDGO_API_KEY
第二步:提交图生视频任务
向 /api/generate/submit 发起 POST 请求,指定 model 为 openai/sora-2-pro/image-to-video 并传入 prompt、image_urls 等参数。
REQUEST_BODY=$(cat <<'JSON'
{
"model": "openai/sora-2-pro/image-to-video",
"input": {
"prompt": "The young woman on the balcony turns her head slowly toward the camera and smiles softly, long hair flowing in the golden sunset breeze, cinematic warm light. Natural sound: gentle wind, soft distant ambience, a quiet breath. Realistic motion, no text, no logos.",
"duration": 4,
"resolution": "1080p",
"aspect_ratio": "auto",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/openai/sora-2-pro/image-to-video/v1/01/input.png"
]
}
}
JSON
)
RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
CODE=$(printf '%s' "$RESPONSE" | jq -r '.code // empty')
if [ "$CODE" != "0" ] && [ "$CODE" != "200" ]; then
printf 'API error: %s
' "$RESPONSE" >&2
exit 1
fi
printf '%s
' "$RESPONSE"第三步:轮询获取生成结果
使用 task_id 查询进度;not_started 或 running 时继续轮询,finished 或 failed 时停止。成功后读取 data.files[].file_url,失败时读取 data.error_message。
状态查询端点
GET https://api.vidgo.ai/api/generate/status/{task_id}使用 task_id 查询进度;not_started 或 running 时继续轮询,finished 或 failed 时停止。成功后读取 data.files[].file_url,失败时读取 data.error_message。
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "task-sora2-pro-i2v-781923",
"status": "running",
"created_time": "2026-09-17T10:00:00Z"
}
}{
"code": 200,
"data": {
"task_id": "task-unified-...",
"status": "finished",
"files": [
{
"file_url": "https://storage.vidgo.ai/generated/video.mp4",
"file_type": "video"
}
],
"created_time": "2026-08-22T10:00:00Z",
"progress": 100,
"error_message": null
}
}完整代码示例
展开查看包含鉴权、提交、轮询与终态判断的完整脚本代码。
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "openai/sora-2-pro/image-to-video",
"input": {
"prompt": "The young woman on the balcony turns her head slowly toward the camera and smiles softly, long hair flowing in the golden sunset breeze, cinematic warm light. Natural sound: gentle wind, soft distant ambience, a quiet breath. Realistic motion, no text, no logos.",
"duration": 4,
"resolution": "1080p",
"aspect_ratio": "auto",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/openai/sora-2-pro/image-to-video/v1/01/input.png"
]
}
}
JSON
)
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
TASK_ID=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.data.task_id // .task_id // empty')
BUSINESS_CODE=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Submit failed:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
START_TIME=$(date +%s)
POLL_DELAY=2
while true; do
if [ $(( $(date +%s) - START_TIME )) -ge 600 ]; then
printf 'Timed out after 600 seconds
' >&2
exit 1
fi
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/$TASK_ID" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
BUSINESS_CODE=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Status request failed:
%s
' "$STATUS_RESPONSE" >&2
exit 1
fi
case "$STATUS" in
finished)
printf '%s' "$STATUS_RESPONSE" | jq -r '(.data.files // .files // [])[]?.file_url'
break
;;
failed)
printf '%s' "$STATUS_RESPONSE" | jq -r '.data.error_message // .error_message // "Generation failed"' >&2
exit 1
;;
not_started|running)
sleep "$POLL_DELAY"
if [ "$POLL_DELAY" -lt 10 ]; then POLL_DELAY=$((POLL_DELAY + 1)); fi
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
done请求参数
向 /api/generate/submit 提交时需传递的 input 参数配置:
| 字段 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
| prompt | string | 必填 | — | 动态与动作引导提示词,去除首尾空格后至少包含 1 个字符。 |
| image_urls | array | 必填 | — | 包含恰好 1 个图片 URL 的数组,支持 JPEG、PNG 或 WebP,≤10MB。 |
| duration | integer | 可选 | 4 | 视频时长(秒),支持 4, 8, 12, 16, 20。 |
| aspect_ratio | string | 可选 | 16:9 | 画幅比例,支持 auto, 16:9 或 9:16。 |
| resolution | string | 可选 | 1024p | 输出分辨率,支持 720p, 1024p, 1080p。 |
响应字段
提交任务成功后返回的数据结构,以及状态查询接口响应:
| 字段 | 类型 | 描述 |
|---|---|---|
| code | integer | 业务状态码,200 表示成功。 |
| message | string | 业务返回消息或异常描述。 |
| data.task_id | string | 全局唯一的异步任务标识流水号。 |
| data.status | string | 当前状态:not_started(排队中)、running(生成中)、finished(已完成)、failed(失败)。 |
| data.created_time | string | 任务创建时间(ISO 8601 格式)。 |
| data.files[] | array | 任务成功生成的文件列表。 |
| data.files[].file_url | string | 成片 MP4 文件的下载播放链接。 |
| data.error_message | string | null | 任务失败时的详细错误说明。 |
任务状态流转
轮询过程中,依据 data.status 判断任务执行阶段:
not_started任务已被系统受理入队,正等待旗舰算力节点分配。
running正在执行图片特征提取、1080p 扩散去噪与音轨合成,持续轮询此状态。
finished生成成功,从 data.files[0].file_url 读取成片链接,终止轮询。
failed任务执行异常终止,读取 data.error_message 查看原因并终止轮询。
轮询与重试建议
- 身份认证请求头必须携带 Bearer API Key,若收到 401 请检查密钥有效性。
- 图片与参数校验确保 image_urls 恰好包含 1 个有效图片 URL,resolution 在 720p/1024p/1080p 范围内。
- 轮询频次1080p 旗舰画质处理耗时相对较长,建议以 2–3 秒间隔轮询状态。
- Webhook 回调支持在提交请求顶层配置 callback_url,成片完成后系统将主动推送任务结果。
端点规格
| 规格项 | 取值 | 说明 |
|---|---|---|
| 输入方式 | 文本 + 单张图片 | 通过 prompt 描述动作,image_urls 提供 1 张必填首帧图片。 |
| 输出形式 | MP4 视频(含原生音频) | 异步执行渲染,任务完成后提供成片链接。 |
| 可选时长 | 4 / 8 / 12 / 16 / 20 秒 | 默认预设为 4 秒。 |
| 画幅比例 | auto / 16:9 / 9:16 | 默认预设为 16:9,auto 模式自动适配原图比例。 |
| 原生分辨率 | 720p / 1024p / 1080p | 默认预设为 1024p,最高支持 1080p 全高清。 |
| 图片格式与大小 | JPEG / PNG / WebP,≤ 10MB | 必须提供恰好 1 个有效的公网访问 URL。 |
| 计费基准 | 按分辨率每秒费率 × 时长 | 720p: 48 积分/秒;1024p: 80 积分/秒;1080p: 112 积分/秒。 |
关联模型端点
Sora 2 Pro Image to Video API — 常见问题
Sora 2 Pro Image to Video API 是什么?
Sora 2 Pro Image to Video 是 OpenAI 研发用于图像生成视频的旗舰模型。它以单张静态参考图为视觉锚点,结合文本指令将静态画面转化为最高 1080p 全高清、包含原生同步音频的电影质感视频。基于 OpenAI 最强多模态扩散架构,它在严格保留原图主体外观、微观肌理与空间光影的同时,赋予画面平滑的三维运镜与物理动力学演变。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Sora 2 Pro 图生视频如何使用 auto 自适应画幅?
在参数中将 aspect_ratio 设为 "auto",模型会自动解析上传图片的原始像素宽高比,以原图画幅指导高清视频生成,减少固定横竖屏比例对构图的约束。
Sora 2 Pro 图生视频支持哪些分辨率?
支持 720p、1024p 与 1080p 三档分辨率(体验区默认预设为 1024p)。1080p 选项专为商业级精细化成片打造,能够完整承载高像素原图的毛孔细节、微小反光与自然阴影过渡。
Sora 2 Pro 图生视频能保持角色面部一致吗?
能。Sora 2 Pro 具备更强的人像面部特征提取与空间投影能力。上传正面清晰且光照均匀的参考图,并在提示词中专注于描述动态动作,模型即可在大幅转头、微笑或走动中始终维持角色面容高度一致。
Sora 2 Pro 图生视频能为静止图片生成环境音效吗?
能。模型具备音画协同推理机制,能识别首帧图像中的场景要素(例如壁炉、海滩、森林或车厢),随画面同步合成真实贴合的立体声环境底噪与动作撞击音效,无需额外音频生成步骤。
Sora 2 Pro 图生视频支持上传几张参考图?
目前端点严格支持输入恰好 1 张首帧参考图片。模型将该图片作为视频的第一帧和主体视觉基准向后平滑展开,image_urls 数组中超过 1 张图片将返回校验错误。
Sora 2 Pro 图生视频单次最长支持多少秒?
单次调用支持生成最长 20 秒视频,提供 4、8、12、16 与 20 秒五档精确时长选择(体验区默认预设为 4 秒)。固定时长档位能够帮助团队在提交任务前准确核算积分开销。















