curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "grok-imagine-video-1.5-lite",
"prompt": "霓虹灯照亮的夜晚街道,镜头在雨中缓慢向前推进",
"duration": 6,
"quality": "480p",
"aspect_ratio": "16:9"
}
'{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "grok-imagine-video-1.5-lite",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": false,
"estimated_time": 120,
"video_duration": 6
},
"type": "video",
"usage": {
"billing_rule": "per_second",
"credits_reserved": 5.712,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: grok-imagine-video-1.5-lite",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}Grok
Grok Imagine 1.5 Lite 视频生成
- Grok Imagine 1.5 Lite (grok-imagine-video-1.5-lite) 是 Grok Imagine 1.5 的低价档位:同一个模型名支持文生视频和图生视频
- 没有 mode 参数:由
image_urls的图片张数决定模式 ——0张 = 文生视频,1张 = 图生视频(作为首帧)。不支持参考图(2 张及以上) 1080p输出由 720p 上采样得到,按更高的每秒单价计费- 异步处理模式,使用返回的任务ID 进行查询
- 生成的视频链接,有效期为24小时,请尽快保存
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "grok-imagine-video-1.5-lite",
"prompt": "霓虹灯照亮的夜晚街道,镜头在雨中缓慢向前推进",
"duration": 6,
"quality": "480p",
"aspect_ratio": "16:9"
}
'{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "grok-imagine-video-1.5-lite",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": false,
"estimated_time": 120,
"video_duration": 6
},
"type": "video",
"usage": {
"billing_rule": "per_second",
"credits_reserved": 5.712,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: grok-imagine-video-1.5-lite",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}授权
##所有接口均需要使用Bearer Token进行认证##
获取 API Key :
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
模型名称
可用选项:
grok-imagine-video-1.5-lite 示例:
"grok-imagine-video-1.5-lite"
视频描述提示词(必填,不可为空)
EvoLink 平台长度限制: 不超过 2000 tokens(按 cl100k 分词计数,中日韩文本每个字符占用更多 token,可写的字符数明显少于英文). 同时受平台 60000 UTF-8 字节上限约束.
示例:
"The person starts dancing"
输入图片 URL(选填)。传 1 张图即切换为图生视频。
模式选择:
0张(不传该字段):文生视频,不收取图片费用1张:图生视频,该图作为首帧,输入图片另计费,费率见定价区2张及以上会被拒绝 —— Lite 不支持参考生视频
要求:
- Playground 本地上传限制:每张最多
10MiB(10485760 字节)。直接传入 API 的图片 URL 由上游验证,不执行本地上传检查。 - 支持格式:JPEG、PNG、WebP
Maximum array length:
1示例:
["https://example.com/image.jpg"]
视频时长(秒),范围 1 ~ 15 秒任意整数
必填范围:
1 <= x <= 15示例:
6
输出画幅比例,默认为auto
适用范围: 文生视频(0 张图)。传入图片时,输出画幅跟随该图尺寸,本参数不生效。
说明:
auto: 不向上游发送该字段,画幅由上游决定(文生视频目前实际为 16:9),此为默认值16:9: 横屏9:16: 竖屏1:1: 方形4:3: 横屏,经典电视比例3:4: 竖屏,经典电视比例3:2: 横屏,经典照片比例2:3: 竖屏,经典照片比例
可用选项:
auto, 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3 示例:
"16:9"
任务完成后的HTTPS回调地址
回调时机:
- 任务完成(completed)、失败(failed)或取消(cancelled)时触发
安全限制:
- 仅支持HTTPS协议
- 禁止回调到内网IP地址(127.0.0.1、10.x.x.x、172.16-31.x.x、192.168.x.x等)
- URL长度不超过
2048UTF-8 字节
回调机制:
- 超时时间:
10秒 - 失败后最多重试
3次(会分别在失败的1秒/2秒/4秒后进行重试) - 回调请求体采用任务查询接口的响应结构
- 回调地址若返回2xx状态码视为成功,其他状态码会触发重试
示例:
"https://your-domain.com/webhooks/video-task-completed"
响应
视频任务创建成功
任务创建时间戳
示例:
1757169743
任务ID
示例:
"task-unified-1757169743-7cvnl5zw"
实际使用的模型名称
示例:
"grok-imagine-video-1.5-lite"
任务的具体类型
可用选项:
video.generation.task 任务进度百分比 (0-100)
必填范围:
0 <= x <= 100示例:
0
任务状态
可用选项:
pending, processing, completed, failed 示例:
"pending"
视频任务详细信息
Show child attributes
Show child attributes
任务的输出类型
可用选项:
text, image, audio, video 示例:
"video"
使用量和计费信息
Show child attributes
Show child attributes