All skills
jimliu avatar

/baoyu-image-gen

@1567581 official
by Jim Liu 宝玉jimliu/baoyu-skills26k stars
2,896

AI image generation with OpenAI GPT Image 2.5, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream, Replicate and Agnes APIs. Supports text-to-image, reference images, aspect ratios, and batch generation from saved prompt files. Sequential by default; use batch parallel generation when the user already has multiple prompts or wants stable multi-image throughput. Use when user asks to generate, create, or draw images.

Use this Skill: https://skilld.dev/gh/jimliu/baoyu-skills/baoyu-image-gen

This session only. Nothing lands on disk.

referencescodex-oauth-vs-openai-api-key.md

≈535 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Codex OAuth vs OpenAI API key for baoyu-image-gen

baoyu-image-gen --provider openai uses the standard OpenAI Images API and requires OPENAI_API_KEY. It calls OpenAI-compatible image endpoints such as /images/generations and /images/edits.

Codex / ChatGPT login is different. Codex image generation is driven by Codex OAuth and the Codex runtime's image_gen capability, not by the public OpenAI Images API key path. A Codex OAuth token is not a drop-in replacement for OPENAI_API_KEY, and setting OPENAI_BASE_URL to a Codex backend will not make baoyu-image-gen's existing openai provider work because the auth, route, and payload shape differ.

What to use instead

  • If running inside Codex and the native imagegen skill/tool is available, use it directly.
  • If running outside Codex but the codex CLI is installed and logged in, call baoyu-image-gen --provider codex-cli (preferred). It spawns the bundled scripts/codex-imagegen/main.ts and surfaces its retry/cache/log machinery through baoyu-image-gen's standard CLI + batch flow. Standalone callers outside this skill can run the same code at packages/baoyu-codex-imagegen/src/main.ts. Both invoke codex exec and the Codex image_gen tool; no OPENAI_API_KEY is required.
  • If running inside Hermes and a native image_generate tool is available, use that as a runtime-native fallback. Be explicit about whether reference images are passed directly or only reconstructed from extracted traits.
  • baoyu-image-gen already exposes a distinct codex-cli provider (wraps the bundled scripts/codex-imagegen/); do not modify the existing openai provider to add Codex OAuth.

Reference-image prompting note

When using actual reference images for identity preservation, avoid long generic descriptions of the subject. Long descriptions can cause the model to synthesize a new similar-looking person/object. Prefer direct wording:

Use the person/object in the reference image(s) as the same identity. Do not redesign it or create a similar-looking new subject. Only change scene, clothing, pose, lighting, rendering style, and composition.

Source: SKILL.md on GitHub

1 alert16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill facilitates official API-based image generation across various known providers (OpenAI, Google, Azure, OpenRouter, DashScope, Z.AI, MiniMax, Replicate, Agnes). Analysis confirmed no malicious operations, prompt injections, or dynamic code execution flaws.

  • Socket16d

    2 alerts: gptAnomaly, gptSecurity

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    2/9 files flagged

  • ZeroLeaks5mo

    1 finding · Score: 86/100

Signed by skilld at 1567581. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 3 weeks ago
version
2.2.0
Other metadata
metadata
{
  "openclaw": {
    "homepage": "https://github.com/JimLiu/baoyu-skills#baoyu-image-gen",
    "requires": {
      "anyBins": [
        "bun",
        "npx"
      ]
    }
  }
}
  • API
  • image-generation
  • openai
  • google
  • azure
  • replicate
  • text-to-image
  • batch-generation
  • multimodal

README badge

README badge for jimliu/baoyu-skills/baoyu-image-gen

Generates images via OpenAI, Google, Azure OpenAI, OpenRouter, DashScope, Replicate, and 5+ other APIs. Supports text-to-image, reference images, aspect ratios, and batch generation with configurable worker concurrency. Routes through a provider-agnostic CLI that requires Bun or Node.js and API credentials per provider.

Generated from the current SKILL.md.

Which image generation APIs does this skill support?
OpenAI GPT Image 2, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream, Replicate, Codex CLI, and Agnes.
Does this skill support reference images?
Yes, but support varies by provider. Google multimodal, OpenAI GPT Image edits, Azure OpenAI edits, OpenRouter multimodal, Replicate, MiniMax, and Seedream 4.0+ support references. Jimeng, Seedream 3.0, and most DashScope models do not.
Can I generate multiple images at once?
Yes. Use batch mode with `--batchfile` and `--jobs` for parallel generation, or the `--n` option for single-call multi-image requests (Replicate requires `--n 1`).
Do I need an OpenAI API key to use this skill?
Only if you use the `openai` provider or have it as your default. Other providers require their own API keys. If using Codex CLI without an OpenAI key, use `--provider codex-cli` instead.
Does this skill require bun or npm?
Yes, the skill requires either `bun` or `npx` to run the TypeScript scripts.

Generated from the current SKILL.md. These answers refresh after source changes.