api-image

Generate and edit raster images via an OpenAI-compatible image provider.

77|18|Updated May 4, 2026
One-click install
npx skills add https://github.com/yc-duan/api-image --skill api-image
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-image
Source: https://github.com/yc-duan/api-image/tree/main
Command: npx skills add https://github.com/yc-duan/api-image --skill api-image

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Pillow, and includes scripts (resource) components.

What problem does it solve?

This Skill replaces the unavailable native image-generation workflow in API-based Codex App usage, allowing you to generate and edit images through your configured OpenAI-compatible provider.

Core Features & Use Cases

  • Image Generation: Create raster images from natural-language prompts with configurable models, sizes, quality, output formats, and batch variants.
  • Reference-Based Editing: Use reference images, masks, and multiple input images for inpainting, background replacement, style transfer, compositing, and consistency-controlled edits.
  • Provider-Aware Workflow: Read the active API key and provider URL from Codex configuration, support temporary overrides, validate image inputs and API parameters, and save returned images locally.

Quick Start

Ask Codex to use api-image to generate a high-quality 2048x1152 cinematic image of a rainy Tokyo street with neon reflections.

Frequently Asked Questions about api-image

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

FAQPage Schema
How do I generate images through an OpenAI-compatible API?

You can generate images through an OpenAI-compatible API by reading your API credentials from the Codex configuration, validating GPT Image parameters, calling the generations endpoint, and saving the returned raster images locally for text-to-image tasks.

Can I use reference images and masks for inpainting with an OpenAI-compatible provider?

Yes, you can use reference images and masks for inpainting with an OpenAI-compatible provider by calling the edits endpoint to perform background replacement, style transfer, and consistency-controlled compositing on your input images.

How do I configure API credentials for image generation in Codex?

Image generation in Codex reads the active API key and provider URL from the root configuration, while also supporting temporary overrides to route text-to-image generation and image editing jobs to a specified OpenAI-compatible provider.

Does this image editing workflow support batch variants and multiple input images?

Yes, the image editing workflow supports batch variants and multiple input images, allowing you to apply compositing, background replacement, and style transfer by validating inputs and decoding returned image data from the provider.

What is the best way to handle native image generation being unavailable in API-based Codex?

The best way to handle unavailable native image generation in API-based Codex is to replace it with an OpenAI-compatible provider workflow that validates parameters, calls the appropriate generations or edits endpoint, and saves outputs locally.