利用 Runway Character API 发送 AI 说话人视频消息,支持输入任意文本。适用于异步更新、说明或更适合口头表达的内容。
Send the user a video message where an AI avatar speaks your words — lip-synced with natural motion. Use this for async updates, code review walkthroughs, incident summaries, or anything that's better explained with a face than a wall of text.
DELETE /v1/avatars/{id}./tmp and sent via MEDIA: for OpenClaw to auto-attach.export RUNWAY_API_SECRET=your_keyBefore generating videos, create a custom avatar (face image + Runway). You only need to do this once — the avatar ID is saved and reused for all future videos.
The voice is chosen later in generate_video.py, not at avatar creation.
referenceImage via setup_avatar.py --image-url (URL below). Do not use Runway’s built-in preset avatars ( game-character, cat-character, etc.) as the first choice — those are only for the fallback in step 3.setup_avatar.py --description "..." to generate a face from text (slower; uses Runway text-to-image).setup_avatar and call generate_video.py with --preset-id "game-character" (or another Runway preset ID from the fallback list below). Faster, less distinctive than Lobster / list images.Check first: If ~/.openclaw/runway-avatar.json already has an avatar_id (or you know one from a prior run), reuse it and skip to Generate a Video Message.
Use Openclaw Lobster 2 unless the user wants something else from this list (or their own URL):
https://runway-static-assets.s3.us-east-1.amazonaws.com/calliope-demo/agent-avatars-presets/openclaw-lobster2.jpghttps://runway-static-assets.s3.us-east-1.amazonaws.com/calliope-demo/agent-avatars-presets/openclaw-lobster1.jpghttps://runway-static-assets.s3.us-east-1.amazonaws.com/calliope-demo/agent-avatars-presets/cat.pnghttps://runway-static-assets.s3.us-east-1.amazonaws.com/calliope-demo/agent-avatars-presets/alien-man-candy-texture.jpghttps://runway-static-assets.s3.us-east-1.amazonaws.com/calliope-demo/agent-avatars-presets/alien-woman-candy-texture.jpghttps://runway-static-assets.s3.us-east-1.amazonaws.com/calliope-demo/agent-avatars-presets/old-man-long-beard-game-style.pnghttps://runway-static-assets.s3.us-east-1.amazonaws.com/calliope-demo/agent-avatars-presets/blond-guy-blue-sweater.pnghttps://runway-static-assets.s3.us-east-1.amazonaws.com/calliope-demo/agent-avatars-presets/man-3d-animation-style.pnghttps://runway-static-assets.s3.us-east-1.amazonaws.com/calliope-demo/agent-avatars-presets/3d-animated-girl-in-airport.pnghttps://runway-static-assets.s3.us-east-1.amazonaws.com/calliope-demo/agent-avatars-presets/white-furry-monster.pnghttps://runway-static-assets.s3.us-east-1.amazonaws.com/calliope-demo/agent-avatars-presets/woman-music-superstar.pngGenerate from text (when the user asks for a custom look and no URL fits) — setup_avatar.py --description "...". The image should be a character facing the camera directly, head and shoulders, centered. Be bold and creative:
Default — Openclaw Lobster 2:
bash
uv run {baseDir}/scripts/setup_avatar.py \
--name "Mochi" \
--image-url "https://runway-static-assets.s3.us-east-1.amazonaws.com/calliope-demo/agent-avatars-presets/openclaw-lobster2.jpg"
Another character from the list above — same command as Lobster 2, only change --image-url to that preset’s URL.
Text description (generates the image) — when the user wants a custom generated look:
bash
uv run {baseDir}/scripts/setup_avatar.py \
--name "Mochi" \
--description "A cute fluffy white cartoon creature with large expressive eyes, looking directly at the viewer, 3D animation style, head and shoulders, neutral background"
With your own image URL:
bash
uv run {baseDir}/scripts/setup_avatar.py \
--name "Mochi" \
--image-url "https://example.com/avatar.jpg"
The setup script prints the avatar ID and saves it to ~/.openclaw/runway-avatar.json. Future generate_video.py calls use it automatically. Save the avatar ID — reuse it for all videos. Do NOT create a new avatar each time.
Write what you want to say, pick a voice that matches your avatar image, and the avatar will speak it with lip-synced animation. Always pass --voice — choose one that fits the character's appearance (e.g. a female avatar should use a female voice, an authoritative-looking character should use a deeper voice).
bash
uv run {baseDir}/scripts/generate_video.py \
--text "Hey Alex — quick update on the deploy. Everything went through, all tests passing. The memory fix from your PR cut p99 latency by 40 percent. Nice work." \
--voice "Maya"
Do not pass --preset-id when a custom avatar is already saved or you pass --avatar-id — that is the normal path after Lobster 2 / list / text setup.
Runway’s avatar video is wide (16:9). On phones that can look squished or awkward. Crop it to match the target app:
TargetFlagResolutionRatioTelegram--square1080×10801:1Other mobile (WhatsApp, iMessage, etc.)--vertical1080×19209:16
Both flags scale the frame up to cover the target area, then center-crop. They are mutually exclusive — pick one. Env vars work too: SEND_VIDEO_MESSAGE_SQUARE=1 or SEND_VIDEO_MESSAGE_VERTICAL=1.
Requires ffmpeg on the machine that runs the script ( brew install ffmpeg on macOS).
Telegram (square):
bash
uv run {baseDir}/scripts/generate_video.py \
--text "Quick update — deploy is green, all tests passed." \
--voice "Maya" \
--square
WhatsApp / iMessage / other mobile (vertical):
bash
uv run {baseDir}/scripts/generate_video.py \
--text "Quick update — deploy is green, all tests passed." \
--voice "Maya" \
--vertical
Pass --voice <name> to generate_video.py (default: Maya):
IDGenderStylePitchMayaWomanUpbeatHigherArjunManClearMiddleSereneWomanCalmMiddleBernardManAuthoritativeLowerBillyManCasualMiddleMarkManNeutralMiddleClintManGravellyLowerMabelWomanWarmMiddleChadManEnergeticMiddleLeslieWomanFriendlyMiddleEleanorWomanMatureMiddleEliasManSmoothLower-middleElliotManEvenMiddleNoahManRelaxedLower-middleRachelWomanClearMiddleJamesManFirmLowerKatieWomanBrightHigherTomManCasualMiddleWandaWomanWarmMiddleBenjaminManProfessionalLower-middle
With a specific avatar ID (overrides saved default; still no --preset-id):
bash
uv run {baseDir}/scripts/generate_video.py --text "Morning standup recap..." --avatar-id "550e8400-e29b-41d4-a716-446655440000" --voice "Maya"
Use only when you cannot run setup_avatar (deadline, user waiting, etc.). Prefer game-character as the preset. No Lobster / list image — Runway’s generic character.
bash
uv run {baseDir}/scripts/generate_video.py \
--text "Quick heads up about the deploy." \
--preset-id "game-character" \
--voice "Maya" \
--vertical
Other preset IDs if needed: game-character-man, music-superstar, cat-character, influencer, tennis-coach, human-resource, fashion-designer, cooking-teacher
The script outputs:
Video saved: /tmp/runway-avatar-YYYY-MM-DD-HH-MM-SS.mp4MEDIA: /tmp/runway-avatar-...mp4 — OpenClaw auto-attaches this to the user's chatDo not read the video file back — just report the path and let OpenClaw handle delivery.
Use video messages for async communication that benefits from a face:
Use a video call (not a video message) for things that need real-time back-and-forth.
Agent detects a successful deploy
If no saved avatar: runs setup_avatar.py with Openclaw Lobster 2 --image-url (one-time)
Agent composes what to say: "Hey Alex — deploy went through. 3 PRs merged: the auth refactor, the cart fix, and your memory optimization. All tests green. P99 latency dropped 40 percent after your fix. Nice work."
Generates the video with the saved custom avatar (no --preset-id). Add --square for Telegram or --vertical for other mobile:
text
uv run {baseDir}/scripts/generate_video.py --text "Hey Alex — deploy went through..." --voice "Maya" --square
--preset-id "game-character" instead (no custom avatar).Sends the video to the user with a text summary:
Your deploy just went through. Here's a quick video recap: [attached video]
game-character preset only as a time-saving fallback.MEDIA: output line tells OpenClaw to auto-attach the video file./tmp — they persist until the system clears temp files.--square and --vertical need ffmpeg; without it, omit both and send the wide Runway file as-is.