[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80200":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":13,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},80200,"grok-video-workflow","Rion-Wu-tech\u002Fgrok-video-workflow","Rion-Wu-tech","Codex workflow for Grok Imagine Video API generation, download, and frame review",null,"JavaScript",101,17,1,0,3,26,47.87,"MIT License",false,"main",true,[],"2026-06-12 04:01:27","# Grok Video Workflow\n\n**Languages:** English | [简体中文](.\u002FREADME.zh-CN.md)\n\nA small local CLI workflow for generating videos with the xAI Grok Imagine Video API.\n\nIf this project helps you, please give it a ⭐ Star!\n\n## What It Does\n\nThis project wraps Grok Imagine Video into a practical local workflow:\n\n- text-to-video\n- reference-to-video with local images or HTTPS image URLs\n- async polling\n- automatic video download\n- metadata JSON output\n- cost estimates\n- contact sheet frame review\n- Codex-friendly command usage\n\nIt is designed to work well with Codex: ask Codex to write or compress prompts, run the CLI, inspect the generated contact sheet, and decide whether to rerun.\n\n## Important Notes\n\n- This uses the xAI API, not the Grok web app quota.\n- You need xAI API credits or billing enabled in the xAI Console.\n- Do not commit your `.env` file.\n- Grok prompts currently have a 4096 character limit.\n- Reference-to-video supports up to 10 seconds.\n- Video generation can produce unstable text, hands, or identity details. Review before publishing.\n\n## Setup\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FRion-Wu-tech\u002Fgrok-video-workflow.git\ncd grok-video-workflow\nnpm install\ncp .env.example .env\n```\n\nEdit `.env`:\n\n```env\nXAI_API_KEY=your-xai-api-key\n```\n\n## Generate A Text-To-Video Clip\n\n```bash\nnpm run video -- --prompt \"A cinematic AI creator editing videos at midnight, vertical social media style\" --duration 5 --aspect-ratio 9:16 --resolution 480p\n```\n\n## Generate A Reference-To-Video Clip\n\nPut your reference image in `examples\u002F`, then run:\n\n```bash\nnpm run video -- --prompt-file prompts\u002Fworldcup-fancam.example.txt --reference-image examples\u002Fyour-storyboard.png --duration 10 --aspect-ratio 1:1 --resolution 720p --prefix worldcup-fancam\n```\n\nThe CLI prints:\n\n```text\nrequest_id\nstatus\nvideo_url\nsaved_video\nmetadata\n```\n\nGenerated files are saved to `outputs\u002F` by default.\n\n## Review The Result\n\nCreate a contact sheet:\n\n```bash\nnpm run review -- --video outputs\u002Fyour-video.mp4\n```\n\nReview checklist:\n\n- Is the action sequence continuous?\n- Did the subject's identity stay consistent?\n- Are hands and fingers acceptable?\n- Is text or scoreboard content stable?\n- Did the scene jump unexpectedly?\n\n## Cost Estimate\n\nAt the time this workflow was created, xAI's public pricing listed Grok Imagine Video around:\n\n```text\n480p: $0.05 \u002F second\n720p: $0.07 \u002F second\n```\n\nExamples:\n\n```text\n5s 480p  ~= $0.25\n10s 480p ~= $0.50\n10s 720p ~= $0.70\n```\n\nAlways check the xAI Console and official pricing page before large batches.\n\n## CLI Options\n\n```text\n--prompt \u003Ctext>              Text-to-video prompt.\n--prompt-file \u003Cpath>         Read prompt from a UTF-8 text file.\n--reference-image \u003Cpath|url> Reference image. Repeat up to 7 times.\n--duration \u003Cseconds>         1-15. Reference-to-video max is 10. Default: 5.\n--aspect-ratio \u003Cratio>       16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3. Default: 16:9.\n--resolution \u003Cvalue>         480p or 720p. Default: 480p.\n--output-dir \u003Cpath>          Default: outputs.\n--prefix \u003Cname>              Output filename prefix. Default: grok-video.\n--poll-interval \u003Cseconds>    Default: 5.\n--timeout-minutes \u003Cminutes>  Default: 20.\n--request-id \u003Cid>            Poll and download an existing request.\n--no-download                Print hosted URL without saving video.\n```\n\n## Codex Prompt Examples\n\n```text\nUse this repo to generate a 5 second 9:16 Grok video. First compress my prompt under 4096 characters, then run the CLI and review the contact sheet.\n```\n\n```text\nGenerate a reference-to-video clip from examples\u002Fstoryboard.png, duration 10 seconds, 720p, then create a contact sheet and tell me whether it needs a rerun.\n```\n\n## Why Not A Codex Official Grok Plugin?\n\nCodex can run local tools and can be extended through scripts, skills, and MCP servers. xAI Grok video generation is exposed through xAI's API. This repository wraps that API into a local workflow that Codex can operate.\n\n## Author\n\nCreated by [Rion-Wu-tech](https:\u002F\u002Fgithub.com\u002FRion-Wu-tech).\nX\u002FTwitter: [@rionaifantasy]\n\n## Safety\n\nRespect image rights, likeness rights, trademarks, and event broadcast rights. Do not present AI-generated event footage as real footage.\n\nIf this project helps you, please give it a ⭐ Star!\n","该项目是一个用于生成、下载和审查视频的本地CLI工作流，基于xAI Grok Imagine Video API。其核心功能包括文本转视频、参考图像转视频（支持本地图片或HTTPS链接）、异步轮询、自动视频下载、元数据JSON输出、成本估算以及帧审查等。技术上采用JavaScript编写，并设计为与Codex友好兼容，允许通过Codex优化提示、运行CLI命令并检查生成结果。适用于需要快速创建高质量视频内容但又希望保持对成本控制的应用场景，如社交媒体营销、个人创作分享等。",2,"2026-06-11 03:59:37","CREATED_QUERY"]