在 OpenClaw 中使用 Veo 3。
Veo 3 是 Google DeepMind 的视频生成模型,可生成最长 8 秒、1080p 的片段,并带有原生音频——与视频同步生成的对白、环境声和音乐。OpenClaw agent 通过与聊天相同的 RunAPI 密钥和端点调用它,无需安装额外技能。
通过 RunAPI 使用 Google Veo 3 生成带原生音频的电影级视频片段。
要求:
- 从 RUNAPI_API_KEY 读取 API 密钥。请勿硬编码密钥。
- 向 https://runapi.ai/api/v1/veo_3_1/text_to_video 发送 POST 请求
- 将 model 设置为 "veo-3.1"。
- 撰写包含场景、镜头运动和音频提示的描述性提示词。
- 将 duration_seconds 设置为 4、6 或 8。
- 将 aspect_ratio 设置为 "16:9"、"9:16" 或 "auto"。
- 任务是异步的。轮询返回的 task_id 直到 status 为 "completed"。
- 完成后,从响应 output 中读取视频 URL。
curl -X POST https://runapi.ai/api/v1/veo_3_1/text_to_video \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1",
"prompt": "A woman walks through a bustling Tokyo street at night, neon signs reflecting on wet pavement. She speaks into her phone: I just arrived. Ambient city noise, distant car horns, light rain.",
"duration_seconds": 8,
"aspect_ratio": "16:9"
}'
{
"task_id": "tsk_abc123",
"status": "pending",
"model": "veo-3.1"
}
三步在 OpenClaw 中使用 Veo 3
Configure RunAPI
Set the RUNAPI_API_KEY environment variable. If you already configured RunAPI as an OpenClaw provider for chat, the same key works for video generation — no additional setup or provider accounts.
export RUNAPI_API_KEY=runapi_xxx
Call Veo 3 text_to_video
Send a POST to the text_to_video endpoint with model set to veo-3.1. Include a prompt with scene descriptions and audio cues (dialogue, ambient sounds). Set duration_seconds to 4, 6, or 8 and aspect_ratio to 16:9 or 9:16.
POST /api/v1/veo_3_1/text_to_video
Poll for the result
The endpoint returns a task_id immediately. Poll the task status endpoint until the status changes to completed, then retrieve the output video URL. The video includes synchronized audio generated from your prompt.
GET /api/v1/veo_3_1/text_to_video/tsk_abc123
Veo 3 text_to_video 参数
| 参数 | 类型 | 说明 |
|---|---|---|
model |
string |
Required. veo-3.1 (standard quality) or veo-3.1-fast (lower cost, faster generation). |
prompt |
string |
Required. Scene description including visual action, camera movement, and audio cues for dialogue or ambient sound. |
duration_seconds |
integer |
Optional. Video length in seconds. Accepted values: 4, 6, 8. Defaults to 8. |
aspect_ratio |
string |
Optional. Output aspect ratio. Accepted values: 16:9, 9:16, auto. |
input_mode |
string |
Optional. Generation mode. text (default), first_and_last_frames (keyframe-guided), or reference (style reference). |
first_frame_image_url |
string |
Optional. URL of the first frame image. Used when input_mode is first_and_last_frames. |
last_frame_image_url |
string |
Optional. URL of the last frame image. Used when input_mode is first_and_last_frames. |
reference_image_urls |
array |
Optional. URLs of style reference images. Used when input_mode is reference. |
callback_url |
string |
Optional. Webhook URL that receives a POST when the task completes. |
OpenClaw 上的 Veo 3 是什么?
Veo 3 是 Google DeepMind 的视频生成模型,能产出带精准环境音频的逼真电影级画面。它生成最长 8 秒的 1080p 视频,带有同步对白、音效和音乐——无需单独的音频处理流程。OpenClaw agent 通过 RunAPI 端点调用它,使用与聊天相同的 API key。
Veo 3 使用场景
街头采访与对话场景
生成带人物说话对白的短视频场景。在提示词中描述对话内容,Veo 3 将同步生成口型动作和城市环境噪音。
大气感与风景内容
创作旅游 vlog 场景、雨中城市街景或雾中自然镜头,Veo 3 的环境音频生成无需后期音频制作即可增添层次感。
带旁白的产品演示视频
生成旁白介绍产品功能的展示短片。将旁白文字包含在提示词中,Veo 3 一次性渲染视觉演示和语音音频。
Veo 3 + OpenClaw 常见问题
Yes. OpenClaw agents call the RunAPI Veo 3 text_to_video endpoint directly. Set model to veo-3.1 and send the request with the same RUNAPI_API_KEY you use for chat. No additional skills, plugins, or Google Cloud accounts required.
Veo 3 is a paid model on RunAPI. Each generation is billed per task based on duration and quality tier. veo-3.1-fast costs less than veo-3.1. Check the RunAPI pricing page for current rates. No subscription required -- you pay per generation.
Veo 3 generates both video and synchronized audio in a single pass, which takes more processing time. Generation typically takes 60 to 180 seconds. Use veo-3.1-fast for quicker turnaround when iterating on drafts.
Yes. RunAPI exposes extend_video and upscale_video endpoints for Veo 3. Pass the source_task_id from the original generation to extend the clip, or upscale to 1080p or 4K resolution. Both are async and billed separately.
Veo 3 generates clips of 4, 6, or 8 seconds at up to 1080p base resolution. You can upscale completed videos to 4K using the upscale_video endpoint. Aspect ratio options are 16:9, 9:16, and auto.