curl https://sub.vcnovb.cn/v1/videos \
-H "Authorization: Bearer $VC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video-1.5-preview",
"prompt": "保持人物外观,人物回头微笑,镜头缓慢推进",
"seconds": "4",
"aspect_ratio": "16:9",
"resolution": "720P",
"images": ["https://example.com/character.png"]
}'
curl https://sub.vcnovb.cn/v1/videos \
-H "Authorization: Bearer $VC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video-1.5-preview",
"prompt": "将参考人物放入参考场景,自然行走,保持人物一致",
"seconds": "4", "aspect_ratio": "16:9", "resolution": "720P",
"images": ["https://example.com/character.png", "https://example.com/scene.png"]
}'
import os
import requests
response = requests.post(
"https://sub.vcnovb.cn/v1/videos",
headers={"Authorization": f"Bearer {os.environ['VC_API_KEY']}"},
json={
"model": "grok-imagine-video-1.5-preview",
"prompt": "保持人物外观,人物回头微笑,镜头缓慢推进",
"seconds": "4", "aspect_ratio": "16:9", "resolution": "720P",
"images": ["https://example.com/character.png"],
},
timeout=120,
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://sub.vcnovb.cn/v1/videos", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VC_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "grok-imagine-video-1.5-preview",
prompt: "保持人物外观,人物回头微笑,镜头缓慢推进",
seconds: "4", aspect_ratio: "16:9", resolution: "720P",
images: ["https://example.com/character.png"],
}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
{"id":"video_example_grok","model":"grok-imagine-video-1.5-preview","status":"queued","progress":0}
{"error":{"type":"permission_error","message":"Video generation is not enabled for this group"}}
Grok 视频
Grok 视频生成
使用 grok-imagine-video-1.5-preview 提交视频任务,包含参考图与多语言调用示例。
POST
https://sub.vcnovb.cn
/
v1
/
videos
curl https://sub.vcnovb.cn/v1/videos \
-H "Authorization: Bearer $VC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video-1.5-preview",
"prompt": "保持人物外观,人物回头微笑,镜头缓慢推进",
"seconds": "4",
"aspect_ratio": "16:9",
"resolution": "720P",
"images": ["https://example.com/character.png"]
}'
curl https://sub.vcnovb.cn/v1/videos \
-H "Authorization: Bearer $VC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video-1.5-preview",
"prompt": "将参考人物放入参考场景,自然行走,保持人物一致",
"seconds": "4", "aspect_ratio": "16:9", "resolution": "720P",
"images": ["https://example.com/character.png", "https://example.com/scene.png"]
}'
import os
import requests
response = requests.post(
"https://sub.vcnovb.cn/v1/videos",
headers={"Authorization": f"Bearer {os.environ['VC_API_KEY']}"},
json={
"model": "grok-imagine-video-1.5-preview",
"prompt": "保持人物外观,人物回头微笑,镜头缓慢推进",
"seconds": "4", "aspect_ratio": "16:9", "resolution": "720P",
"images": ["https://example.com/character.png"],
},
timeout=120,
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://sub.vcnovb.cn/v1/videos", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VC_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "grok-imagine-video-1.5-preview",
prompt: "保持人物外观,人物回头微笑,镜头缓慢推进",
seconds: "4", aspect_ratio: "16:9", resolution: "720P",
images: ["https://example.com/character.png"],
}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
{"id":"video_example_grok","model":"grok-imagine-video-1.5-preview","status":"queued","progress":0}
{"error":{"type":"permission_error","message":"Video generation is not enabled for this group"}}
使用
grok-imagine-video-1.5-preview 根据参考图和提示词创建视频任务。API Key 需绑定包含此模型的视频分组。
curl https://sub.vcnovb.cn/v1/videos \
-H "Authorization: Bearer $VC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video-1.5-preview",
"prompt": "保持人物外观,人物回头微笑,镜头缓慢推进",
"seconds": "4",
"aspect_ratio": "16:9",
"resolution": "720P",
"images": ["https://example.com/character.png"]
}'
curl https://sub.vcnovb.cn/v1/videos \
-H "Authorization: Bearer $VC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video-1.5-preview",
"prompt": "将参考人物放入参考场景,自然行走,保持人物一致",
"seconds": "4", "aspect_ratio": "16:9", "resolution": "720P",
"images": ["https://example.com/character.png", "https://example.com/scene.png"]
}'
import os
import requests
response = requests.post(
"https://sub.vcnovb.cn/v1/videos",
headers={"Authorization": f"Bearer {os.environ['VC_API_KEY']}"},
json={
"model": "grok-imagine-video-1.5-preview",
"prompt": "保持人物外观,人物回头微笑,镜头缓慢推进",
"seconds": "4", "aspect_ratio": "16:9", "resolution": "720P",
"images": ["https://example.com/character.png"],
},
timeout=120,
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://sub.vcnovb.cn/v1/videos", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VC_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "grok-imagine-video-1.5-preview",
prompt: "保持人物外观,人物回头微笑,镜头缓慢推进",
seconds: "4", aspect_ratio: "16:9", resolution: "720P",
images: ["https://example.com/character.png"],
}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
{"id":"video_example_grok","model":"grok-imagine-video-1.5-preview","status":"queued","progress":0}
{"error":{"type":"permission_error","message":"Video generation is not enabled for this group"}}
请求参数
使用参考图
- 单图:在
images中传入一张图片,并在prompt中描述主体动作和镜头变化。 - 多图:使用已开通多图能力的分组,并在提示词中说明每张图片的用途,例如人物参考、场景参考。
- 素材地址:将示例 URL 替换为实际图片链接。