Skip to content
Platform / Docs / AI video API

API Reference

AI video API

POST ai-video-api ID 6

Generate a video from a prompt. The job is async.

POST https://xiaoapis.com/api/video/create

Overview

  • 视频生成
  • 异步任务
  • 回调/查询

Use cases

  • 创意短视频
  • 营销视频草稿
  • Agent 自动出片
Conventions
  • Gateway · https://xiaoapis.com
  • Auth · send key (query or JSON body, as this API specifies)
  • Response · JSON. Check the business code and the HTTP status, not only HTTP 200

Authentication

Send the platform API key (query parameter key or JSON field key, as this page specifies). Create one in API key management.

POST https://xiaoapis.com/api/video/create
Content-Type: application/json

{
  "key": "YOUR_API_KEY"
}

Request example

https://xiaoapis.com/api/video/create?key=你的密钥

Details

请求HEADER:

名称值
Content-Type

application/json

请求参数说明:

名称必填类型示例值说明
prompt是string 一个美女在喝茶

提示词 须避免出现黄、暴、政相关内容

image_urls否string['https://xx.png','https://xxx.png']隔开 、图片须避免出现真人形象 上传后的文件 URL;最大大小:10.0MB
aspect_ratio否string9:16输出视频比例, 支持的比例:   9:16(竖屏),   16:9(横屏) 默认:9:16
remixid否strings_xxxxxxxxx视频续作 remix目标id 可参考返回结果的pid值: s_xxxxxxxxx

duration

否int10

视频长度:10秒,15秒;填写 10,15

notify是stringhttps://xx.com/xxx回调地址 ( 任务推送地址)

返回参数说明:


名称类型说明
codeint状态码
msgstring状态信息
dataarray请求结果数据集
- task_idstring任务ID
exec_timefloat执行耗时
user_ipstring客户端IP


回调参数说明:

名称类型说明
codeint200
dataarray
- task_idstring任务ID
- video_urlstringhttps://v.xiaobao.ink/video20251016/53128775-1853-4502-965a-f3492841cbf4.mp4
- pidstrings_xxxxxxxxxxxxxxx
msgstringsuccess
fail_reasonstring失败原因

Response example

{    "status": 0,    "data": {        "task_id": "string"    },    "msg": "string"}

FAQ

AI 视频 API 怎么接入?

提交提示词等参数创建任务,轮询或回调获取视频地址。

和智能剪辑有何区别?

AI 视频侧重模型生成画面;智能剪辑侧重模板化包装已有真人/素材。

是否支持参考图?

部分模型支持,见具体参数说明。

如何选模型?

平台提供多种视频模型接口,按效果、时长与价格选择。

任务多久完成?

视模型与负载而定,请用查询接口获取进度,勿假设固定时长。

Full console doc (with the debugger):/doc/6