YouMind
Sign in

Gemini 4 + Antigravity: Fully Automated Video Creation Workflow (With Agent Prompts)

@leaf_sanren
SIMPLIFIED CHINESENov 17, 2026
187K
990
138
73
2.2K

TL;DR

A comprehensive guide on automating video generation using Google's Antigravity agent, detailing three workflows: Gemini API credits, Google Flow points with depth-map moderation bypass, and external CLI integrations.

Many people don't know this: Antigravity cannot actually generate videos.

In my previous post, I wrote about how it can reverse-engineer prompts from viral videos. At the end, I complained: Google's ecosystem is just missing that final piece—video output.

Over the past two days, I connected that missing piece.

Now, in the same conversation, after watching a reference video, creating character portraits, and writing prompts, it directly calls video models to generate clips, downloads them, restores original audio, and extracts frames for my review. I only need to approve before spending money and watch the final result.

I've established three pathways. The first two use credits included with Google AI memberships. Pro, Ultra 5x, and Ultra 20x all work.

I'm a Pro member; the quotas and bills below are based on my actual usage. Ultra has more quota, but the method is identical.

Leaf Yeah! - inline image

Each section ends with a prompt you can copy directly into Antigravity.

Table of Contents

  • 1. What Antigravity Lacks: It Understands, But Can't Output
  • 2. Your Membership Hides Two Video Generation Quotas
  • 3. Path 1 · Gemini API: Direct Backend Generation Using Member Credits
  • 4. Path 2 · Google Flow: Bypass Moderation with Depth Maps, Use Member Points
  • 5. Path 3 · External Video CLIs: LibTV, Dreamina, Pippit, etc.
  • 6. Is Pro Enough? My Actual Bill
  • Conclusion

───

1. What Antigravity Lacks: It Understands, But Can't Output

First, some context. My previous post explained: when you see a viral video without provided prompts, you feed it to Antigravity, and it reverse-engineers camera angles, movements, and rhythm into prompts.

https://x.com/leaf_sanren/status/2118661246434353299

It can do this because Antigravity's brain is Gemini. GPT and Claude analyze videos by extracting frames as screenshots; Gemini truly understands motion and rhythm. With Gemini 4, this step is even more stable.

But after writing that, I felt awkward: it could handle watching, reverse-engineering, and drawing character sheets. But for actual generation, I still had to open a webpage, upload images, click generate, wait, download, and feed it back for checking.

The biggest hassle wasn't clicking a few times—it was breaking the loop.

If it couldn't see the generated video, it couldn't compare it to the original, fix errors, adjust prompts, and run again. Every round trip required me to be present.

Leaf Yeah! - inline image

After connecting the dots, the division of labor became:

  • Me: Define what video to make, approve spending, review samples, make final decisions.
  • Antigravity: Watch original, define characters, write prompts, select channel, submit, download, restore audio, extract frames for side-by-side comparison, and self-correct if unsatisfactory.

This post explains how to connect the "output" piece.

───

2. Your Membership Hides Two Video Generation Quotas

Many people subscribe to Google AI Pro or Ultra but only use it for web chat. Actually, your membership includes two video generation quotas that pair perfectly with Antigravity.

Quota 1: Gemini API Credits (USD).

Starting this year, Google merged developer program benefits into AI memberships. You get monthly Google Cloud credits usable for Gemini API calls, including video models. According to official FAQs:

  • Pro: $10/month
  • Ultra 5x: $40/month
  • Ultra 20x: $100/month

You must claim these credits manually; they expire one year after issuance. Section 3 has step-by-step instructions.

Quota 2: Google Flow Points.

Google Flow is Google's official AI video creation web app (flow.google.com). Think of it as Google's version of Jimeng: upload images/videos, write a prompt, and it generates video.

Members receive monthly Flow points. Pro gets 1,000 points; Ultra gets much more. Video generation costs points; image generation is mostly free.

Clarifying recurring terms:

  • Omni, Veo: Google's two video model series. Omni excels at generating from reference videos/images (we'll use Omni 1.2 Flash); Veo focuses on cinematic quality.
  • Nano Banana 2 (called Nano 2 in Flow): Google's image model (the popular "banana" model). Used here for character sheets; tested to cost zero points.
  • Antigravity: Google's official command-line AI Agent powered by Gemini. It reads files, runs commands, opens browsers, and acts as the director here.

Three paths, summarized:

  • Gemini API: Uses USD credits, fully backend, easiest; reference video max 10 seconds.
  • Google Flow: Uses points, accepts 15-second reference videos; no API, requires browser automation, stricter moderation.
  • External Video CLIs: Uses third-party platform credits; fallback when Google paths fail; better for long shots/complex scenes.

───

3. Path 1 · Gemini API: Direct Backend Generation Using Member Credits

Principle: Agent Sends Requests Directly to Google's Video Models

An API is a "window" between programs. Antigravity packages "reference video + character images + prompt" and sends it to Google's video model. The model generates in the cloud; Antigravity polls for completion and downloads.

No webpages, no screen occupation. This is the most "fully automated" path.

Step 1: Claim Your Member Credits

Open Google AI Studio (aistudio.google.com). In the bottom left, find the "Claim Free API Credits" card.

Leaf Yeah! - inline image

A claim window pops up. Select your billing account and click "Redeem & Continue." Ultra members see higher amounts.

Leaf Yeah! - inline image

After claiming, check Google Cloud "Billing → Credits." You should see "Google Developer Program premium benefit" status "Available."

Leaf Yeah! - inline image

Step 2: Pre-load $5 to Activate Credits

After claiming, I tried calling the API. AI Studio showed a yellow warning: Account switched to prepaid billing; balance must be >$0 to resume service. Eligible GCP credits apply first.

Leaf Yeah! - inline image

Common pitfall: Credits claimed, but API fails. I pre-loaded the minimum $5, and service resumed. Subsequent calls deduct from credits first.

Leaf Yeah! - inline image

Step 3: Get API Key, Give to Antigravity

In AI Studio left sidebar "API Keys," create a new key linked to your credit-bound project.

Don't paste keys in chat. Save to a local file (e.g., ~/.config/video-gen/.env, permissions set to user-only), then tell Antigravity the path.

Usage Limits: 4 Lessons Learned

① Reference video max 10 seconds.

Model outputs up to 15s, but input reference >10s is rejected. To replicate 15s clips, split into segments (e.g., 0-8s, 7-15s), generate separately, then stitch. Stitching may cause continuity issues; tips below address this.

Leaf Yeah! - inline image

② Remove audio from reference video.

Videos with audio tracks are instantly rejected. Strip audio first using ffmpeg (Antigravity can do this), then restore original music after generation.

③ Reference video length ≥ desired output length.

Want 8s output? Reference must be ≥8s. Even 0.5s short causes rejection. Trim with 0.1-0.2s buffer.

④ Default resolution is 720p (expensive).

I forgot to specify, and two 9.5s 720p clips cost $3.16 ($1.58 each). Pro gives $10/month.

Test at 360p first; upgrade only after confirming composition/motion.

Tips: Prompt Writing for Character Swaps

  • Identify by clothing, not position. In multi-person stages, positions change. Write "replace the person in black sleeves/white shirt with A," not "leftmost becomes A."
  • Specify character sheet role. State: "Character sheet locks appearance/clothing only; motion/background follow original video." Otherwise, subjects pose statically like the sheet.
  • Lock background. Explicitly say: "Keep original stage/lighting/camera; replace only performers." Else, model imports sheet backgrounds.
  • Shorter prompts work better. Overly complex "must/forbid" lists caused validation failures. Concise prompts passed once with natural motion.
  • Frame extraction for comparison. Have Antigravity extract 6 frames from original and generated clips, side-by-side, for quick review.

Copy-Paste Prompt for Antigravity

text
1Use Gemini API video models (list available, prefer gemini-omni-1.2-flash) to generate a video:
2Reference video: <path>, Character sheets: <paths>, API key in <file path>.
3Rules:
41. Strip audio from reference; if >10s, split into ≤10s segments (each ≥ target duration);
52. Generate 360p first; ask before upgrading to HD;
63. Bind character swaps via clothing features; state "sheet locks appearance/clothing only; motion/background follow original";
74. Submit async, poll until done, download;
85. Restore original audio track; extract 6 frames from both clips for side-by-side view;
96. Report estimated cost before each submission.

───

4. Path 2 · Google Flow: Bypass Moderation with Depth Maps, Use Member Points

Principle: Flow Works, But Has No Door

Flow offers advantages over API:

  • Accepts 15-second reference videos directly;
  • Uses member points, not USD credits;
  • Upgrade to 1080p during download costs only 5 extra points, cheaper than regenerating.

In Flow, Omni 1.2 Flash 15s clip: 360p = 20 points, 720p = 60 points. Below is my quote for 720p x2.

Leaf Yeah! - inline image

Problem: Flow is a human-facing web app with no API. Agents must simulate browser interaction. Three hurdles:

  • No official interface; requires browser automation;
  • CAPTCHA/human verification; blocks headless browsers; needs real Chrome window;
  • File uploads use native OS dialogs; scripts can't interact; manual drag-and-drop needed for initial video.

Two Integration Methods

Method 1: Open-source gflow-cli.

Community wrapped Flow's internal APIs into CLI + MCP (Agent plugin):

https://github.com/ffroliva/gflow-cli

  • Pros: One-command image/video generation, point checks; minimal Agent compute;
  • Cons: Images only, no reference videos; defaults to 360p download; spawns visible Chrome windows (I scripted auto-minimize);
  • Risk: Unofficial; uses internal APIs; subject to breakage/account risk.

Method 2: Browser skills (e.g., web-access).

Let Antigravity control your logged-in Chrome like a human.

  • Pros: Can do anything humans can: attach videos, switch resolutions, download 720p;
  • Cons: Each step requires screenshot/judgment; high compute cost, slow; initial video upload still needs manual drag.

My combo: Light tasks (image gen, injection, point check) via gflow; heavy tasks (attach video, submit, download) via browser skill. You only manually drag video once.

Biggest Hurdle: Real People Fail Moderation

First attempt: dragged girl group performance video. Progress hit 83%, then card vanished silently. Another attempt: no card appeared. No error, no points deducted.

Flow strictly moderates real faces/copyrighted content, canceling silently.

Solution: Depth Map (Grayscale).

Depth maps convert color video to grayscale silhouettes: near objects white, far black. Faces, clothes, logos removed; only position/motion/camera remain.

Leaf Yeah! - inline image

Moderation passes since no real people/copyright visible; model still reads layout/motion. Both 15s clips generated successfully first try.

Leaf Yeah! - inline image

Steps

① Convert original to depth map locally.

Use Antigravity with open-source Depth-Anything-V2. Local CPU processing: ~20 mins for 15s 720p on old Mac. Free.

② Create Flow project, drag depth map in.

Only manual step.

③ Inject character sheets via Agent.

Use gflow + Nano Banana 2 to add sheets to same project. First time, confirm rights dialog in browser.

④ Attach assets, submit.

Click "+", switch to "Video" tab, attach depth map, then "Image" tab, select single-character sheets. Write prompt, submit.

Leaf Yeah! - inline image

⑤ Download, restore audio.

For approved clip, choose 1080p download (+5 points).

Limits

  • Depth maps lose facial/finger details. Good for "same composition/rhythm" recreations; poor for 1:1 dance replication (use Path 1).
  • Only works while points last. Run out? Wait for next month.
  • gflow is unofficial. May break if Google changes internals.

Tips: Save Points, Avoid Errors

  • Check duration before submit. "+" dialog defaults to "All/Recent"; new images push videos down. I accidentally submitted image-only task, wasting points.
  • Avoid multi-person composite images. Adding front-view composite caused static single-camera shot, losing original cuts. Use depth map + single-character sheets only.
  • Test at 360p first. 20 points/clip. Verify motion, then 720p or 1080p download upgrade.
  • Generate images in Flow. Nano Banana 2 image gen costs zero points.

Copy-Paste Prompt for Antigravity

text
1Generate video via Google Flow (https://flow.google.com/).
21. Convert <original video path> to depth map using Depth-Anything-V2; notify me to drag into new Flow project;
32. Use gflow-cli (https://github.com/ffroliva/gflow-cli) to inject <character sheet paths> into same project via Nano Banana 2 (no video points used);
43. Use browser skill to control my Chrome: click "+", attach depth map under "Video" tab (confirm 15s shown), then select single-character sheets under "Image" tab (no composites);
54. Generate 360p first; download, restore audio, extract frames for comparison;
65. Report point cost/balance before each submission.

───

5. Path 3 · External Video CLIs: LibTV, Dreamina, Pippit, etc.

Principle: Plug New Ports into Agent

Google paths have limits: API max 10s reference, Flow strict moderation. For long shots (>15s), complex multi-person scenes, I use third-party platforms.

Many video platforms offer CLIs or MCPs designed for Agents. Antigravity runs commands; give it docs, and it learns usage.

Platform-agnostic. I used LibTV credits as example; use whichever you have.

Leaf Yeah! - inline image

Supported Platforms & Docs

Platforms often offer multiple models. LibTV includes Seedance 2.5, Seedance 2.0, Wan 3.0, etc.

Model choice depends on task. For "swap 4 virtual characters into girl group":

  • Seedance 2.5: 25s/clip; consistent characters, stable rhythm. Best for this task.
  • Wan 3.0: 15s; failed to replace originals, left real people in frame.

Simpler tasks may yield different results.

Steps (LibTV Example)

① Login. Run libtv login web; authenticate once in browser.

② Create canvas, upload assets. Antigravity creates canvas, uploads reference video (blur corner logos first) and character sheets.

③ Use "Mixed Reference" mode. Connect video + images to generation node. Enable audio. Start at 480p.

④ Upgrade if satisfied. Select clip in LibTV canvas, click HD upscale (manual step).

Limits

  • Uses third-party credits, not Google benefits. Seedance 2.5 480p 25s ≈ 500 credits. Expensive.
  • Duration caps vary. Seedance 2.5 max 30s; Wan 3.0 mixed ref max 15s (excess fails/refunds).
  • Trust `--help`. Platforms update fast; online tutorials outdated.

Tips: Extend Long Videos

Last-frame continuation. If credits insufficient or extending sequence, extract last frame of previous clip as reference image. Feed with next segment of original video to generate additional 10s.

I extended 25s to 34.5s seamlessly; clothing/lighting/position matched.

Never disable audio. Saving credits by muting ruins half the value. Reduce cost via resolution/duration only.

Copy-Paste Prompt for Antigravity

text
1I have <platform> video CLI/MCP installed; docs at <link/path>.
2Read docs, run --help, verify login/models, then generate:
31. Reference video <path> (blur corner logos), character sheets <paths>;
42. Use "mixed reference" mode (video + images); start 480p with audio enabled;
53. Report credit cost before submission;
64. For continuations, use last frame of previous clip as reference image;
75. Download, extract frames for comparison.

───

6. Is Pro Enough? My Actual Bill

Conclusion: Pro suffices for workflow testing; insufficient for mass production.

I completed two recreation tasks (girl group stage, cat short) with ~15 iterations. Bill:

Leaf Yeah! - inline image

Gemini API Credits: $10 total, $3.95 remaining.

  • Major expense: Initial 720p tests cost $3.16 for two clips;
  • Switched to 360p testing, slower burn, but iterations consumed most;
  • Billing delay: Agent-reported balance higher than actual; check next day;
  • At $1.58/720p clip, $10 buys ~6 clips. Good for debugging, tight for finals.

Flow Points: 1,047 → 779 (268 used).

  • 15s 720p = 60 points; 1,000 points ≈ 16 clips;
  • 360p = 20 points; 50 clips possible, but unusable for publishing;
  • Wasted points on misconfigured submissions (see Tips).

Third-party Credits: Seedance 2.5 480p 25s ≈ 500 credits.

  • Best quality, highest cost. Ran 25s/20s/10s clips, ~400 credits left for HD upgrades.

Judgment:

  • Testing workflow, occasional fun clips: Pro sufficient;
  • Daily updates, channel growth: Pro inadequate. Same methods work with Ultra 5x ($40 credits) or Ultra 20x ($100 credits) + larger Flow points.

Honestly, I want to upgrade to Ultra now.

For Ultra 5x subscription guide, see @xueyu1125's post:

https://x.com/xueyu1125/status/2122303422984863860

───

Conclusion

Previously, I said Google's ecosystem lacked video output.

Now fixed: Gemini 4 understands video, Antigravity orchestrates, three channels execute. Use credits, points, or third-party balances interchangeably.

If you're a Google member, you likely haven't claimed your video quotas. Follow Section 3, paste prompts into Antigravity, and generate your first clip tonight.

Share with fellow Google subscribers 🙏

Remix in YouMind

Turn one viral article into a full content workflow

Collect the source, decode the pattern, create assets, draft the story, and distribute from one AI workspace.

Explore YouMind
For creators

Turn your Markdown into a clean 𝕏 article

When you publish your own long-form writing, images, tables, and code blocks make 𝕏 formatting painful. YouMind turns a full Markdown draft into a clean, ready-to-post 𝕏 article.

Try Markdown to 𝕏

More patterns to decode

Recent viral articles

Explore more viral articles