跳转到主要内容
POST
/
api
/
open-api
/
v1
/
grok
/
videos
Create Grok 1.5 Video
curl --request POST \
  --url https://www.jimmyai.cn/api/open-api/v1/grok/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "grok-imagine-video-1.5",
  "prompt": "A beautiful butterfly flying among flowers, slow motion, hyper-detailed",
  "duration": 10,
  "ratio": "16:9",
  "image_urls": [
    "https://example.com/butterfly.jpg"
  ]
}
'
{
  "code": "20000",
  "msg": "ok",
  "data": {
    "task_id": "<string>",
    "status": "<string>",
    "model": "<string>",
    "created_at": 123
  }
}
创建成功后会返回 task_id。请使用 查询视频任务 接口轮询任务状态,任务完成后从 result.video_url 获取视频地址。

支持的模型

model说明
grok-imagine-video-1.5Grok 1.5 视频模型,支持 10、15 秒与自定义比例,必须且仅支持提供 1 张参考图
grok-1.5grok_1_5 等别名会归一化为 grok-imagine-video-1.5

参数限制

  • 参考图片grok-imagine-video-1.5 必须搭配参考图片使用。请在 image_urls(或 images)字段中上传恰好 1 张参考图。
  • 时长:仅支持 10 或 15 秒(默认值为 10)。
  • 比例:支持 16:99:161:13:22:3(默认值为 16:9)。

示例请求

curl -X POST 'https://www.jimmyai.cn/api/open-api/v1/grok/videos' \
  -H 'Authorization: Bearer sk_xxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "grok-imagine-video-1.5",
    "prompt": "一只精美的茶杯中缓缓注入热茶,雾气袅袅,微距镜头摄影",
    "ratio": "16:9",
    "duration": 10,
    "image_urls": ["https://example.com/cup.jpg"]
  }'

授权

Authorization
string
header
必填

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

请求体

application/json
model
enum<string>
必填

Model name. grok-imagine-video-1.5, grok-1.5, and grok_1_5 normalize to grok-imagine-video-1.5.

可用选项:
grok-imagine-video-1.5
prompt
string
必填

Text prompt for video generation

image_urls
string[]
必填

Reference image URL list. grok-imagine-video-1.5 requires exactly 1 reference image.

duration
enum<integer>
默认值:10

Video duration in seconds. Only supports 10 or 15 seconds. Defaults to 10.

可用选项:
10,
15
ratio
enum<string>
默认值:16:9

Video aspect ratio (e.g., 16:9, 9:16). Takes precedence over orientation.

可用选项:
16:9,
9:16,
1:1,
3:2,
2:3
orientation
enum<string>

Video orientation. Active only when ratio is empty: landscape maps to 16:9, portrait maps to 9:16.

可用选项:
landscape,
portrait
images
string[]

Compatibility field for common OpenAPI image inputs; used when image_urls is empty. Requires exactly 1 image.

响应

200 - application/json

Task created successfully

code
string
示例:

"20000"

msg
string
示例:

"ok"

data
object