baoyu-image-gen

Generate images via OpenAI, Google, DashScope, and other image generation APIs from the command line.

Updated May 18, 2026
One-click install
npx skills add https://github.com/fts-pro/FTS-MMIS-AFRIKA --skill baoyu-image-gen-fts-pro
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: baoyu-image-gen
Source: https://github.com/fts-pro/FTS-MMIS-AFRIKA/tree/main/.agent/skills/baoyu-image-gen
Command: npx skills add https://github.com/fts-pro/FTS-MMIS-AFRIKA --skill baoyu-image-gen-fts-pro

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? It provides a unified CLI workflow for AI image generation across many providers, so you do not have to write custom API integration code for each image model you want to use. ## Core Features & Use Cases - Multi-Provider Generation: Generate images through OpenAI, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI, MiniMax, Jimeng, Seedream, and Replicate with automatic provider detection from available API keys. - Reference Images and Batch Mode: Edit images from reference inputs and run parallel batch generation from a JSON batch file with retries and per-provider rate limiting. - Use Case: You have a folder of saved prompt files for an article's illustrations. Point the tool at a batch.json describing each image, and it generates all of them in parallel with retries and a success/failure summary. ## Quick Start Ask the agent to generate an image of a cat saved as cat.png using the baoyu-image-gen skill with your configured provider.

Frequently Asked Questions about baoyu-image-gen

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

FAQPage Schema
How do I generate an image with OpenAI or Google from the command line?▼

Run the main script with a prompt and output path, for example: bun scripts/main.ts --prompt "A cat" --image cat.png. The provider is auto-detected from your API keys, or you can force one with --provider openai or --provider google.

How do I generate multiple images in batch from prompt files?▼

Create a batch.json file listing tasks with promptFiles, image output paths, and optional provider or model settings, then run with --batchfile batch.json. Batch mode runs tasks in parallel with configurable worker count, per-provider rate limits, and up to 3 retries per image.

Which image generation providers support reference images?▼

Reference images are supported by Google multimodal models, OpenAI GPT Image edits, Azure OpenAI edits (PNG/JPG only), OpenRouter multimodal models, Replicate supported families, MiniMax subject-reference, and Seedream 4.0/4.5/5.0. Jimeng, Seedream 3.0, and DashScope do not support reference images.

What API keys do I need for AI image generation?▼

Set the key for your chosen provider, such as OPENAI_API_KEY, GOOGLE_API_KEY, DASHSCOPE_API_KEY, MINIMAX_API_KEY, REPLICATE_API_TOKEN, ARK_API_KEY for Seedream, or ZAI_API_KEY. Keys can also be stored in ~/.baoyu-skills/.env or a project-level .baoyu-skills/.env file.

Why does image generation fail with an invalid size error on DashScope?▼

DashScope qwen-image-2.0 models require total pixels between 512x512 and 2048x2048, while qwen-image-max/plus models accept only five fixed sizes. Use --size within the allowed range or switch to qwen-image-2.0-pro for custom aspect ratios like 21:9.