Skip to content

v0.1.2

Choose a tag to compare

@Syh1906 Syh1906 released this 22 Jun 03:18

Semantic Image Sizing

Use semantic size selection when you know the image shape and clarity level but do not want to choose exact pixels manually.

You can now ask for sizes such as:

  • 1:1 icon at 1K
  • 16:9 banner at 2K
  • 9:16 phone wallpaper at 4K

The skill maps --aspect and --resolution to concrete API request sizes before calling the image endpoint.

How To Ask Your Agent

After installing the skill and configuring auth.json, describe the final image you want in normal language. Include the subject, style, aspect ratio, resolution, transparency, count, and output format when those details matter.

Examples:

  • "Create a 16:9 2K livestream banner in a product showcase style. Save it as WebP."
  • "Create a 9:16 4K phone wallpaper with a cyberpunk market stall scene."
  • "Generate a 1:1 1K Warcraft 3 style frost skill icon, no text. Save the final PNG under outputs/."
  • "Create a transparent-background item asset. If the selected model cannot use transparent background at this resolution, ask me whether to switch model or use background=auto."

Manual Commands

Choose size from shape and clarity:

python "$SkillDir/scripts/imagegen.py" generate `
  -p "Livestream shopping banner for discounted transit-station tokens, bold product showcase style" `
  -f "outputs/token-banner.webp" `
  --aspect 16:9 `
  --resolution 2K `
  --format webp `
  --quality medium

Use an exact size when you need pixel-level control:

python "$SkillDir/scripts/imagegen.py" generate `
  -p "Warcraft 3 style frost skill icon, single rune, centered, no text" `
  -f "outputs/frost-rune.png" `
  --size 1024x1024 `
  --quality high

Transparent Background Handling

The script now stops before request submission for a known unsupported combination:

model=gpt-image-2 + background=transparent + resolution=2K or 4K

When this happens, choose one path:

  1. Switch to gpt-image-1.5 and keep transparent background.
  2. Keep gpt-image-2 and use background=auto.

For explicit --size, the script infers this check from the longest side.

Configuration

auth.json defaults can now include semantic sizing fields:

{
  "defaults": {
    "aspect": "16:9",
    "resolution": "2K",
    "quality": "medium",
    "output_format": "png"
  }
}

--size still wins over --aspect and --resolution.

Package Notes

The attached zip contains one top-level openai-compatible-imagegen/ folder. Local auth.json, .local/, and dist/ files are not included.