curl --request POST \
--url https://api.newapi.si/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size": "1280x720",
"images": [
"https://example.png"
],
"model": "sora-2",
"prompt": "this is an example",
"duration": 12,
"fps": "24",
"seed": "20231024",
"mode": "i2v"
}
'{
"id": "video_abc123",
"object": "video",
"model": "sora-2",
"status": "queued",
"progress": 0,
"created_at": 1764347090922,
"seconds": "8"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}创建视频
OpenAI Sora 兼容格式的视频生成接口。支持文生视频与图/视频参考生成模式。
POST /v1/videos:创建视频任务GET /v1/videos/{video_id}:查询任务状态GET /v1/videos/{video_id}/content:获取视频二进制内容
当前对外不提供:
GET /v1/videosPOST /v1/videos/{video_id}/remix
标准鉴权头:
Content-Type: application/json
POST /v1/videos创建任务,获取id- 轮询
GET /v1/videos/{id}直到completed或failed - 完成后优先使用返回中的
video_url - 如需统一下载,调用
GET /v1/videos/{id}/content
核心参数:
model: string:必填,对外模型名prompt: string:推荐,视频生成描述seconds: number|string:可选,目标时长duration: number|string:可选,时长别名size: string:可选,输出尺寸mode: string:可选,常见值t2vi2vi2v_first_lastreference_material
常用兼容参数:
aspect_ratioratioqualityresolutionfpsimageimage_urlimage_urlsimagesreference_imagesinput_referenceend_image_urllast_image_urlvideo_urlsaudio_urlsfunction_modecontentcallback_urlexternal_task_id
Kling 4.0 直接使用标准视频参数;具体请求格式见 4.6 节。
4.1 Veo 系列
说明:stable、official 等表示不同分组,不是对外 model 后缀;调用时请保持 model 为基础模型名,由账户或令牌分组决定实际走哪个分组。
Veo 3.x 主模型
veo3veo3-fastveo3-fast-framesveo3-framesveo3-proveo3-pro-framesveo3.1veo3.1-fastveo3.1-proveo3.1-componentsveo3.1-4kveo3.1-pro-4k
建议:
- 纯文生视频优先使用
veo3*/veo3.1*主模型 - 图生或参考生视频场景,建议显式传
mode + image_url/reference_images
4.2 Sora 系列
基础模型:
sora-2sora-2-pro
建议:
sora-2*适合通用调用- 如需使用
stable/official等分组,请保持model为基础模型名,不要在模型名后追加后缀。
请求示例:
{
"size": "1280x720",
"images": [
"https://example.png"
],
"model": "sora-2",
"prompt": "this is an example",
"duration": 12,
"fps": "24",
"seed": "20231024",
"mode": "i2v"
}
4.3 HappyHorse 系列
对外模型:
happyhorse-1.0
建议:
happyhorse-1.0通过mode区分t2v、i2v、r2v、video_edit。- Sora 兼容格式中参考图建议使用
content数组传递媒体项。 - 文本项使用
type=text,媒体项使用type=image_url并可配合role、name标识素材用途。
请求示例:
{
"size": "720x1280",
"model": "happyhorse-1.0",
"mode": "r2v",
"prompt": "this is an example",
"duration": 15,
"content": [
{
"type": "text",
"text": "this is an example"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.png"
},
"role": "reference_image",
"name": "image1"
}
],
"parameters": {
"resolution": "720P",
"ratio": "9:16",
"duration": 15,
"seed": 1
}
}
4.4 Seedance 系列
对外模型:
doubao-seedance-1-0-lite-t2v-250428doubao-seedance-1-0-lite-i2v-250428doubao-seedance-1-0-pro-250528doubao-seedance-1-0-pro-fast-251015doubao-seedance-1-5-pro-251215doubao-seedance-2-0-260128doubao-seedance-2-0-fast-260128
建议:
- 文生视频优先
*-t2v-*或pro / fast - 图生视频优先
*-i2v-* - 复杂参考素材场景优先使用
content
请求示例:
{
"size": "1280x720",
"model": "doubao-seedance-2-0-fast-260128",
"prompt": "this is an example",
"duration": 15,
"fps": "24",
"seed": "20231024",
"mode": "reference_material",
"content": [
{
"type": "text",
"text": "this is an example"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.png"
},
"role": "reference_image",
"name": "image1"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.mp3"
},
"role": "reference_audio",
"name": "audio1"
}
]
}
4.5 Grok 视频系列
对外模型:
grok-imagine-1.0-videogrok-imagine-video-1.5-previewgrok-video-3
常用参数:
promptratio/aspect_ratioresolution/sizeseconds/durationimage/image_url/input_referencereference_images
示例:
{
"model": "grok-imagine-1.0-video",
"prompt": "雨夜霓虹街道上的电影感推镜,光影丰富,运动自然",
"reference_images": [
"https://example.com/ref-1.jpg"
],
"seconds": 10,
"aspect_ratio": "16:9",
"resolution": "720P"
}
4.6 Kling 4.0 视频
对外模型:kling-4.0(720p)、kling-4.0-1080p。原生格式可使用 POST /text-to-video/kling-4.0、POST /image-to-video/kling-4.0、POST /omni-video/kling-4.0,并通过 GET /tasks?task_ids=任务ID 查询。原生请求无需 model,由 settings.resolution 选择清晰度,默认1080p;原生参考图/视频类型为 refer_image、feature_video,创建返回 data 对象,查询返回 data 数组。可通过 POST /api/v3/contents/generations/tasks 或 POST /v1/videos 提交,分别通过对应路径的 GET /{task_id} 查询。OpenAI/Sora 直接使用 prompt、seconds、size 和 input_reference;Seedance 直接使用 content 与顶层 duration/resolution/ratio/mode,两者都无需额外 contents/settings/options。kling-4.0 对应 720p,kling-4.0-1080p 对应 1080p;请让 settings.resolution 与模型名一致。settings 中使用 duration(4–30 秒)、resolution(720p/1080p)、aspect_ratio(21:9、16:9、9:16、1:1)。当前接口最多支持 10 张参考图、5 段参考视频。Kling 4.0 默认音画同出。全能参考模式支持公网音频 URL:/v1/videos 使用 audio_urls,Seedance 使用 content 的 audio_url 项;需使用支持音频素材的路由。三个原生专用入口当前不接收参考音频字段。
{
"model": "kling-4.0",
"prompt": "A cinematic product shot",
"seconds": "4",
"size": "1280x720",
"input_reference": "https://example.com/product.jpg"
}
4.7 MiniMax / Hailuo 视频系列
对外模型:
minimax-h3hailuo-2.3
建议:
minimax-h3支持文生视频、图片参考和音频参考,推荐通过content混排文本与素材;也可使用image_urls、audio_urls等兼容字段。hailuo-2.3需要首帧图片,推荐在content中传role=first_frame的image_url项,或使用image_urls传首帧图片。minimax-h3常用duration=5~15、resolution=1440p;hailuo-2.3常用duration=6或10、resolution=768p。
minimax-h3 示例:
{
"model": "minimax-h3",
"prompt": "A cinematic product video with smooth camera motion",
"content": [
{
"type": "text",
"text": "Use the product image as reference and match the rhythm of the audio."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/product.jpg"
},
"role": "reference_image",
"name": "product"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/music.mp3"
},
"role": "reference_audio",
"name": "music"
}
],
"duration": 8,
"resolution": "1440p",
"aspect_ratio": "16:9",
"generate_audio": true
}
hailuo-2.3 示例:
{
"model": "hailuo-2.3",
"prompt": "The camera slowly pushes in, natural motion and cinematic lighting.",
"content": [
{
"type": "text",
"text": "The camera slowly pushes in, natural motion and cinematic lighting."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.jpg"
},
"role": "first_frame",
"name": "first"
}
],
"duration": 10,
"resolution": "768p",
"aspect_ratio": "16:9"
}
-
mode=t2v -
最小入参:
model + prompt -
mode=i2v -
最小入参:
model + prompt + image_url -
mode=i2v_first_last -
最小入参:
model + prompt + image_url + end_image_url -
mode=reference_images -
最小入参:
model + prompt + reference_images -
mode=reference_material -
最小入参:
model + prompt + (image_urls/video_urls/audio_urls 至少一种)
Gemini Omni 调用说明
gemini-omni是 new-api 对外公开的视频模型名,可直接走POST /v1/videos。mode=t2v:文生视频,最小入参为model + prompt。mode=r2v:参考图/参考素材生成,图片可放在image、image_url、images、image_urls、reference_images、input_reference或content中。mode=edit:视频编辑,视频可放在video、video_url、videos或content中,也可同时传参考图。- 时长字段可用
seconds或duration,会自动匹配到 4 / 6 / 8 / 10 秒档。
Kling 4.0 可直接使用 Seedance 格式 content/duration/resolution/ratio/mode,或 OpenAI 视频格式 prompt/seconds/size/input_reference;两者都无需额外的 contents/settings/options。mode 可选 t2v(纯文本)、i2v(单张首帧)、i2v_first_last(首尾两帧)、reference_images(普通参考图)、reference_material(全能素材参考,音频须使用支持该能力的路由)。省略 mode 且没有显式工具时,有参考素材默认 reference_material,无任何参考素材默认 t2v。参考模式使用普通参考图角色,不把明确的首尾帧静默改成参考图;首尾帧请显式选择 i2v 或 i2v_first_last,并省略画幅参数。Kling 4.0 默认音画同出。全能参考模式支持公网音频 URL:/v1/videos 使用 audio_urls,Seedance 使用 content 的 audio_url 项;需使用支持音频素材的路由。三个原生专用入口当前不接收参考音频字段。
Vidu Q4:vidu-q4 固定 720p,vidu-q4-540p 固定 540p,支持生成 3~16 秒视频。至少需要 1 张图片,最多支持 15 张参考图;参考生成可附带最多 3 段 MP3 音频,每段 3~12 秒、最大 50MB。不支持纯文生、指定首尾帧或参考视频。多张图片用于共同参考,不表示首尾位置。可通过 POST /v1/videos、POST /api/v3/contents/generations/tasks,或 Vidu 格式 POST /ent/v2/img2video、POST /ent/v2/reference2video 创建任务。统一入口推荐使用 mode=reference_images;带音频时使用 mode=reference_material。参考音频可用 audio_urls,Seedance 格式也可用标准 content 的 audio_url 项;audio 布尔字段表示生成音频开关,与参考音频 URL 列表分别使用。分辨率须与模型名一致。
Magi-2 1080p
magi-2-1080p 支持 OpenAI /v1/videos 和 Ark /api/v3/contents/generations/tasks 两种格式,分别通过对应路径的 GET /{task_id} 查询。固定 1080p,生成时长 4~30 秒。支持 16:9、9:16、1:1、4:3、3:4、21:9;1:1 输出为 1440×1440。参考模式最多 10 张图片、5 段视频、5 段音频,共 20 份素材。每段视频和音频为 2~30 秒,所有视频累计不超过 30 秒,所有音频累计不超过 30 秒。图片上限 30 MB,视频 200 MB,音频 15 MB。首尾帧模式不能混入其他图片、视频或音频参考。提示词可用 <<<image_1>>>、<<<video_1>>>、<<<audio_1>>> 按各类素材输入顺序引用。当前不提供独立 sand.ai 官方格式入口。
{
"model": "magi-2-1080p",
"prompt": "以 <<<image_1>>> 的彩色积木为主体,参考 <<<video_1>>> 的缓慢转动及 <<<audio_1>>> 的轻柔节奏。",
"seconds": "4",
"size": "1440x1440",
"image_urls": [
"https://example.com/blocks.png"
],
"video_urls": [
"https://example.com/rotation.mp4"
],
"audio_urls": [
"https://example.com/rhythm.wav"
]
}
curl --request POST \
--url https://api.newapi.si/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size": "1280x720",
"images": [
"https://example.png"
],
"model": "sora-2",
"prompt": "this is an example",
"duration": 12,
"fps": "24",
"seed": "20231024",
"mode": "i2v"
}
'{
"id": "video_abc123",
"object": "video",
"model": "sora-2",
"status": "queued",
"progress": 0,
"created_at": 1764347090922,
"seconds": "8"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}请求体
必填,对外模型名。 gemini-omni 可通过 /v1/videos 调用。
sora-2, sora-2-pro, gemini-omni, happyhorse-1.1, happyhorse-1.1-1080p, wan-3.0-prime, wan-3.0-prime-1080p, sd-2-5-4k, sd-2-5-flash, sd-2-5-flash-480p, happyhorse-1.0, happyhorse-1.0-i2v, happyhorse-1.0-t2v, happyhorse-1.0-r2v, happyhorse-1.0-video-edit, doubao-seedance-1-0-lite-i2v-250428, doubao-seedance-1-0-lite-t2v-250428, doubao-seedance-1-0-pro-250528, doubao-seedance-1-0-pro-fast-251015, doubao-seedance-1-5-pro-251215, doubao-seedance-2-0-260128, doubao-seedance-2-0-fast-260128, sd-2-5, veo3, veo3-fast, veo3-fast-frames, veo3-frames, veo3-pro, veo3-pro-frames, veo3.1, veo3.1-4k, veo3.1-components, veo3.1-fast, veo3.1-pro, veo3.1-pro-4k, kling-4.0, kling-4.0-1080p, grok-imagine-1.0-video, grok-imagine-video-1.5-preview, grok-video-3, minimax-h3, hailuo-2.3, viduq3-turbo, viduq2, vidu2.0, vidu-q4, vidu-q4-540p, magi-2-1080p "sora-2"
可选,视频生成模式。 gemini-omni 支持 t2v、r2v、edit。
Kling 4.0 可直接使用 Seedance 格式 content/duration/resolution/ratio/mode,或 OpenAI 视频格式 prompt/seconds/size/input_reference;两者都无需额外的 contents/settings/options。mode 可选 t2v(纯文本)、i2v(单张首帧)、i2v_first_last(首尾两帧)、reference_images(普通参考图)、reference_material(全能素材参考,音频须使用支持该能力的路由)。省略 mode 且没有显式工具时,有参考素材默认 reference_material,无任何参考素材默认 t2v。参考模式使用普通参考图角色,不把明确的首尾帧静默改成参考图;首尾帧请显式选择 i2v 或 i2v_first_last,并省略画幅参数。Kling 4.0 默认音画同出。全能参考模式支持公网音频 URL:/v1/videos 使用 audio_urls,Seedance 使用 content 的 audio_url 项;需使用支持音频素材的路由。三个原生专用入口当前不接收参考音频字段。
"reference_material"
响应
成功创建视频任务
