revid-cli
v0.1.4
Published
Command-line interface for creating videos with the Revid API.
Readme
Revid CLI
Create videos from the command line using the Revid public API.
The CLI is optimized for AI agents and automation:
- Stable JSON output with
--json - Exact API payload mode with
--payload - Fast one-line creation with
--prompt,--text, or--url - Guided JSON planning with
revid guided --jsonso agents pick the right workflow and models before rendering - Planning mode with
revid planfor the same machine-readable planning contract - Interactive guided creation with
revid guided - Async render handling through
create,status,wait, andexport - Offline context for agents through
revid guide --json - Live helper commands for voices and visual presets
- Structured missing-field errors that tell agents exactly which helper command to run
Requires Node.js 18 or newer.
Install
npm install -g revid-cliDuring local development from this folder:
npm link
revid --helpAuthentication
For AI agents, CI, and production automation, use an environment variable:
export REVID_API_KEY="your_revid_api_key"For local human use:
revid auth login
revid auth statusAuth precedence:
--api-keyREVID_API_KEY- Local config from
revid auth login
Use --base-url or REVID_BASE_URL for staging or local API targets. The default production API is https://www.revid.ai.
Quick Start
If an agent has no Revid context, start with:
revid guide --json
revid guided --json --goal "Create a satirical Pixar-style roast video from this X profile picture" --reference-image-url "https://example.com/profile.jpg" --media-preset PIXAR
revid plan --goal "Create a satirical Pixar-style roast video from this X profile picture" --reference-image-url "https://example.com/profile.jpg" --media-preset PIXAR --json
revid workflows --json
revid presets --json
revid voices --json
revid examples prompt-to-video --jsonPrompt to video:
revid create --prompt "A cinematic 30 second product launch video" --wait --jsonFor AI agents, the recommended way to start is the guided JSON flow:
revid guided --json \
--goal "Create a satirical Pixar-style roast video from this X profile picture" \
--reference-image-url "https://example.com/profile.jpg" \
--media-preset PIXARThis is recommended for agents because it returns stable JSON: workflow choice, expected output, model questions, common wrong choices, and a starter payload. Plain revid guided remains the interactive human wizard.
You can also call the planning command directly:
revid plan \
--goal "Create a satirical Pixar-style roast video from this X profile picture" \
--reference-image-url "https://example.com/profile.jpg" \
--media-preset PIXAR \
--jsonrevid plan returns the recommended workflow, expected output, model-selection questions, warnings for common wrong workflow choices, and a starter payload. For example, a profile picture used as inspiration should become prompt-to-video with media.provided[]; it should not become avatar-to-video unless the user explicitly wants a talking head.
Script to video:
revid create --text "Paste the narration script here." --aspect-ratio portrait --waitArticle to video:
revid create --workflow article-to-video --url "https://example.com/post" --wait --jsonGuided mode:
revid guidedAgent Payload Mode
Send an exact Revid v3 render payload:
revid create --payload payload.json --wait --jsonRead from stdin:
cat payload.json | revid create --payload - --wait --jsonOverride payload fields without editing the JSON file:
revid create --payload payload.json --set render.resolution=1080p --set options.outputCount=2 --wait --jsonPrint the request payload without calling Revid:
revid create --prompt "A clean SaaS launch video" --dry-run --jsonAgent Discovery Commands
Use these when the caller does not already know Revid's API concepts:
revid guide --json
revid workflows --json
revid examples --json
revid examples prompt-to-video --json
revid template script-to-video
revid docs --json
revid docs --local --json
revid guided --json --goal "Create a product launch video"
revid plan --goal "Create a product launch video" --json
revid presets --json
revid presets --search cinematic --json
revid voices --json
revid voices labels --json
revid voices --gender female --language en --jsonCore mental model:
createstarts an asynchronous Revid project and returns apid.waitpolls thatpiduntilvideoUrlis available or the job fails.webhookUrlis preferred for production callbacks.--payloadsends exact Revid v3 JSON.--reference-image-urlputs an image inmedia.provided[]as a visual/person/style reference for generated scenes.--avatar-urlis only for talking-avatar videos where the provided image/video should become the on-screen speaker.- Missing model choices return
code: "MISSING_MODEL_SELECTION"withdata.modelSelection.questions[]. media.imageModelis requested only when image generation is relevant andmedia.typeis notai-video.media.videoModelis requested when generated video motion is relevant.- Use
--auto-modelsto accept the CLI's recommended defaults. --set path=valuelets agents override a payload field without rewriting JSON.--dry-run --jsonprints the request payload before spending credits.- Missing required fields return
code: "MISSING_REQUIRED_FIELDS"withdata.missingFields[], including the path, the flag to use, and a helper command. - In an interactive terminal, missing required fields are prompted automatically. Use
--no-promptto force agent-style errors, or--ask-missingto prompt even with--json.
Voice and preset selection:
- Run
revid voices --jsonto list voice IDs forvoice.voiceIdor--voice-id. - Run
revid voices labels --jsonto see filterable labels such as language, gender, accent, age, and use case. - Run
revid presets --jsonto list visual preset values formedia.mediaPresetor--media-preset. - Run
revid presets --search <term> --jsonwhen the desired style is known loosely.
Workflow selection:
- Use
prompt-to-videofor a full generated video from a creative brief, including profile-picture roasts, stylized stories, satire, explainers, or creative videos with reference images. - Use
avatar-to-videoonly when the user wants the provided avatar/profile image to speak directly to camera as a talking avatar. - Use
script-to-videowhen the user provides the exact narration/script that should drive the video. - Use
caption-videowhen the user has an existing video and mainly wants subtitles/reframing.
Workflow requirements:
| Workflow | Required fields |
| --- | --- |
| script-to-video | source.text |
| audio-to-video | source.url |
| prompt-to-video | source.prompt |
| music-to-video | source.url |
| article-to-video | source.url |
| avatar-to-video | source.text, avatar.url |
| static-background-video | source.text or source.url |
| motion-transfer | source.url, media.provided[] |
| caption-video | source.url |
| ad-generator | source.prompt or media.provided[] |
Async Render Flow
The recommended production flow is:
Start a render:
revid create --payload payload.json --jsonStore the returned
pid.Prefer
--webhook-urlfor production systems.For agents and local scripts, poll with:
revid wait <pid> --jsonDownload the final video when needed:
revid wait <pid> --output ./video.mp4 --json
--wait on create combines start and polling in one command. --output on create implies waiting.
Useful Commands
revid workflows --json
revid guided --json --goal "Satirical Pixar roast from a profile picture" --reference-image-url https://example.com/profile.jpg --media-preset PIXAR
revid plan --goal "Satirical Pixar roast from a profile picture" --reference-image-url https://example.com/profile.jpg --media-preset PIXAR --json
revid presets --json
revid voices --json
revid template prompt-to-video
revid docs --json
revid credits --payload payload.json --json
revid projects --limit 10 --json
revid status <pid> --json
revid export <pid> --jsonPublishing
Before publishing:
npm test
npm run check
npm pack --dry-runFirst manual publish:
npm login
npm publish --access publicDo not put Revid API keys in this package, test fixtures, docs, or npm metadata.
