Skip to main content
POST
/
xai
/
videos
生成视频
curl --request POST \
  --url https://api.mountsea.ai/xai/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "小猫在吃鱼",
  "model": "grok-imagine-video",
  "duration": 6,
  "aspectRatio": "2:3",
  "resolution": "720P",
  "images": [
    "<string>"
  ]
}
'
{
  "taskId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
prompt
string
required

视频描述提示词(最大 1000 字符)

Maximum string length: 1000
Example:

"小猫在吃鱼"

model
enum<string>
required

视频模型

Available options:
grok-imagine-video
Example:

"grok-imagine-video"

duration
enum<number>
default:6

视频时长(秒)

Available options:
6,
10,
15
aspectRatio
enum<string>

视频宽高比

Available options:
2:3,
3:2,
1:1,
9:16,
16:9
resolution
enum<string>
default:720P

视频分辨率

Available options:
480P,
720P
images
string[]

参考图片 URL(图生视频,最多 1 张;提供后视频尺寸跟随图片,aspectRatio 和 resolution 将被忽略)

Maximum array length: 1

Response

taskId
string
required

任务 ID,用于后续查询结果