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 your OpenClaw auth-profiles.json.
- Node.js: Available in the environment.
- Security Note: This skill reads local OAuth tokens from your profile to authenticate with Google's API. This is expected behavior for internal tool use.
Usage
Direct Script Execution
CODEBLOCK0
Arguments
- -
--prompt (Required): The description of the image. - INLINECODE2 (Optional): Path to save the image (default:
/tmp/antigravity_<ts>.png). - INLINECODE4 (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.
技能名称: antigravity-image-gen
详细描述:
反重力图像生成
使用谷歌内部反重力API(Gemini 3 Pro图像)生成高质量图像。此技能通过直接使用daily-cloudcode-pa.sandbox端点及您的OAuth凭据,绕过了浏览器自动化的需求。
前提条件
- - 谷歌反重力OAuth配置文件:必须存在于您的OpenClaw auth-profiles.json中。
- Node.js:环境中需可用。
- 安全说明:此技能会从您的配置文件中读取本地OAuth令牌,以向谷歌API进行身份验证。这是内部工具使用的预期行为。
使用方法
直接脚本执行
bash
/home/ubuntu/clawd/skills/antigravity-image-gen/scripts/generate.js \
--prompt 火星上的未来城市 \
--output /tmp/mars.png \
--aspect-ratio 16:9
参数
- - --prompt(必需):图像的描述。
- --output(可选):保存图像的路径(默认:/tmp/antigravity_<时间戳>.png)。
- --aspect-ratio(可选):1:1(默认)、16:9、9:16、4:3、3:4。
输出
- - 脚本将图像写入指定路径。
- 它在标准输出中打印MEDIA: <路径>,使Clawdbot能够自动检测并显示图像。
故障排除
- - 429 资源耗尽:达到配额限制。请等待或检查您的项目限制。
- 未找到图像数据:模型可能拒绝了提示(安全原因)或API结构已更改。请检查“模型消息”输出。
- 身份验证错误:请确保您已通过google-antigravity提供商登录。