home / skills / z980944038-dev / openclawwdl / antigravity-image-gen-1.0.0

antigravity-image-gen-1.0.0 skill

/skills/antigravity-image-gen-1.0.0

This skill generates high-quality images using the Google Antigravity API directly, bypassing browser automation for fast, reliable visual outputs.

npx playbooks add skill z980944038-dev/openclawwdl --skill antigravity-image-gen-1.0.0

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.7 KB
---
name: antigravity-image-gen
description: Generate images using the internal Google Antigravity API (Gemini 3 Pro Image). High quality, native generation without browser automation.
read_when:
  - User asks to generate an image
  - User wants to create visual content
metadata: {"clawdbot":{"emoji":"🎨","requires":{"bins":["node"]}}}
---

# Antigravity Image Generation

Generate high-quality images using the internal Google Antigravity API (Gemini 3 Pro Image). This skill bypasses the need for browser automation by using the `daily-cloudcode-pa.sandbox` endpoint directly with your OAuth credentials.

## Prerequisites

- **Google Antigravity OAuth Profile**: Must be present in `~/.clawdbot/agents/main/agent/auth-profiles.json`.
- **Node.js**: Available in the environment.

## Usage

### Direct Script Execution

```bash
/home/ubuntu/clawd/skills/antigravity-image-gen/scripts/generate.js \
  --prompt "A futuristic city on Mars" \
  --output "/tmp/mars.png" \
  --aspect-ratio "16:9"
```

### Arguments

- `--prompt` (Required): The description of the image.
- `--output` (Optional): Path to save the image (default: `/tmp/antigravity_<ts>.png`).
- `--aspect-ratio` (Optional): `1:1` (default), `16:9`, `9:16`, `4:3`, `3:4`.

## Output

- The script writes the image to the specified path.
- It prints `MEDIA: <path>` to stdout, which allows Clawdbot to automatically detect and display the image.

## Troubleshooting

- **429 Resource Exhausted**: Quota limit reached. Wait or check your project limits.
- **No image data found**: The model might have refused the prompt (safety) or the API structure changed. Check the "Model message" output.
- **Auth Error**: Ensure you have logged in via `google-antigravity` provider.

Overview

This skill generates high-quality images using the Google Antigravity (Gemini 3 Pro Image) API without relying on browser automation. It calls the internal daily-cloudcode-pa.sandbox endpoint with your Google Antigravity OAuth profile to produce native image files. Outputs are saved locally and printed to stdout for easy automation and display.

How this skill works

The script authenticates using a Google Antigravity OAuth profile and sends a prompt plus generation parameters to the Antigravity image endpoint. The service returns binary image data which the script writes to a local file and prints a MEDIA: <path> line so external systems can detect the result. Command-line arguments control prompt, output path, and aspect ratio.

When to use it

  • When you need high-quality image generation without browser automation.
  • For automated pipelines that must save images to disk and signal completion via stdout.
  • When you have a Google Antigravity OAuth profile available and want native API access.
  • For generating concept art, marketing assets, or user-facing images programmatically.

Best practices

  • Ensure your Google Antigravity OAuth profile is configured and valid before running the script.
  • Start with short, descriptive prompts and iterate to refine image style and composition.
  • Respect quota limits and implement retry/backoff for 429 Resource Exhausted responses.
  • Save to a predictable output path and rely on the MEDIA: <path> line for downstream automation.
  • Check model message output when the API returns no image data to diagnose safety or format changes.

Example use cases

  • Generate hero images for a web landing page from a single descriptive prompt.
  • Produce concept art variations for product design reviews and save each to disk.
  • Integrate into a CI job that creates preview images and exposes the path via stdout.
  • Batch-create social media graphics using programmatically varied prompts and aspect ratios.

FAQ

What prerequisites are required?

You need Node.js installed and a Google Antigravity OAuth profile configured in your local auth profiles so the script can authenticate.

What does MEDIA: <path> mean?

The script prints MEDIA: <path> to stdout after writing the image file. That line allows other tools to automatically detect and display the generated image.