baoyu-imagine

Generate images via OpenAI, Google, DashScope, Replicate, and other image generation APIs.

2|Updated May 30, 2026
One-click install
npx skills add https://github.com/virahitvin8/crafty-gis --skill baoyu-imagine-virahitvin8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-imagine
Source: https://github.com/virahitvin8/crafty-gis/tree/main/GIT_STAR/assignment-generator/antigravity-skills-main/antigravity-skills-main/skills/baoyu-imagine
Command: npx skills add https://github.com/virahitvin8/crafty-gis --skill baoyu-imagine-virahitvin8

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Generating images through multiple AI provider APIs requires juggling different endpoints, authentication schemes, model names, and parameter formats. This Skill unifies text-to-image and reference-based image generation across ten providers behind one CLI with consistent flags, retries, and batch processing. ## Core Features & Use Cases - Multi-Provider Generation: Generate images through OpenAI GPT Image 2, Azure OpenAI, Google Gemini, OpenRouter, DashScope, Z.AI, MiniMax, Jimeng, Seedream, and Replicate with automatic provider detection from available API keys. - Reference-Image Identity Preservation: Pass reference images to supported providers with prompting guidance that preserves subject identity instead of synthesizing lookalikes. - Batch Parallel Generation: Run multi-image jobs from a JSON batch file with configurable worker counts, per-provider rate limits, and up to 3 automatic retries per image. - Use Case: A content team saves illustration prompts as Markdown files, builds a batch.json with build-batch.ts, and generates all article images in parallel through Replicate with a single command. ## Quick Start Ask the AI to generate an image of your subject using baoyu-imagine and save it to a specified output path, optionally naming a provider, model, or aspect ratio.

Frequently Asked Questions about baoyu-imagine

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an image with OpenAI GPT Image 2 from the command line?

Run scripts/main.ts with --provider openai --model gpt-image-2, a --prompt, and an --image output path. The OpenAI provider requires OPENAI_API_KEY and calls the standard Images API; a Codex or ChatGPT login is not a substitute.

How do I generate multiple images in parallel from saved prompt files?

Create a JSON batch file listing tasks with promptFiles and image paths, then run main.ts with --batchfile and optionally --jobs to set worker count. Batch mode runs in parallel when two or more tasks are pending and retries each image up to 3 times.

Which image generation providers support reference images?

Reference images work with Google multimodal, OpenAI GPT Image edits, Azure OpenAI edits, OpenRouter multimodal models, Replicate supported families, MiniMax subject-reference, Seedream 4.0/4.5/5.0, and DashScope wan2.7-image models. Jimeng, Seedream 3.0, and SeedEdit 3.0 do not support them.

Can I use my Codex or ChatGPT login instead of an OpenAI API key?

No. Codex OAuth is a separate entitlement from the OpenAI Images API and cannot replace OPENAI_API_KEY. Use the Codex runtime's native imagegen tool or the codex-imagegen.sh wrapper as a fallback instead.

Why does image generation fail with a missing API key error?

The script auto-detects providers from environment variables such as GOOGLE_API_KEY, OPENAI_API_KEY, or REPLICATE_API_TOKEN. If none are set, create a .baoyu-skills/.env file in your project or home directory containing the required keys.

What are the limitations of Replicate image generation in this tool?

Replicate currently requires --n 1 because only single-image save semantics are supported. Aspect ratio behavior is model-specific: nano-banana uses aspect_ratio, Seedream models use documented ratios, and Wan 2.7 maps ratios to concrete sizes.