Getting started
Agent image generation: create and edit images directly in your AI client
Set up the image-generation Skill once, then ask your AI to create an image or edit an existing one through Yomi API.
What it can do
The Agent image-generation Skill lets AI clients with Skill support call Yomi API's image generation and editing endpoints directly. Once configured, describe the image you want in natural language, or provide an existing image for the AI to modify.
- Text to image: Generate images from a description for posters, illustrations, product visuals and creative sketches.
- Image editing: Change the content, style, composition or details of an existing image.
- Natural-language requests: Simply say "generate an image", "draw a picture" or "create an image", without constructing an API request manually.
Create a dedicated image-generation API key
- Sign in to the Yomi API console and open "API Keys" in the top navigation.
- Create a separate API key for image generation, select the GPT image dedicated group (image generation only), and copy the complete key.
- Restrict this key to the models needed for image generation, so your everyday key is not spread across multiple tools.
Send the prompt to your AI
Replace sk-XXXXX below with your dedicated image-generation key, then send the entire prompt to a trusted private AI client. The AI will install the full Skill, write the project configuration and verify a call; you do not need to edit .env.
Help me configure and enable the Yomi API image-generation Skill.
First read these installation instructions, then install and configure the complete Skill:
https://yomiapi.com/skill/image-gen/INSTALL.md
This is my dedicated image-generation API key: sk-XXXXX (replace this with the separate key you created for image generation).
Write the key to the current project's .env file as YOMI_API_KEY, and ensure .env is ignored by .gitignore. Preserve all other existing .env settings. Do not echo the key in replies, logs, command arguments or Skill files.
After installation, generate one test image with the default model gpt-image-2.5-sunburst to verify the API call and image saving. For future image generation, drawing, image creation or editing requests, use this Skill and Sunburst by default, respect my explicit model, image count and budget choices according to the Skill rules, and use this dedicated image-generation key.
.env file with YOMI_API_KEY, then replace the key line in the prompt with: "I have configured YOMI_API_KEY in the current project's .env file; read it directly."Installation verification generates one Sunburst test image, with a documented price of $0.025, to confirm that the call and image saving work. See the Model Catalog for current prices.
Generate an image directly
Once the Skill is configured, describe your image to the AI. For example:
Generate an image: a clean, bright technology product promotion featuring a silver laptop, with space on the right for text and a landscape composition.
To edit an existing image, describe what to keep and what to change. For example: "Replace the background with a dark gradient, keeping the subject and text positions." The Skill submits generation or editing requests using the method supported by your client.
Three models and their prices
gpt-image-2.5: 1K everyday tier, $0.013/image, for everyday visuals, creative sketches and cost-sensitive tasks.gpt-image-2.5-flare: 4K fast tier, $0.02/image, prioritizing generation speed for quick previews and iteration.gpt-image-2.5-sunburst: 4K quality tier, $0.025/image, prioritizing visual quality and detailed editing for final deliverables.
Sunburst is the default for everyday visuals, drafts, high-resolution deliverables and image editing, without needing to ask for high resolution or quality first. Use Flare when speed is explicitly prioritized or a high-resolution request needs lower cost; use Image 2.5 for the lowest-cost requests without a high-resolution requirement. The AI selects a canvas for the intended use; the scripts still default to 1024x1024 and preserve existing requirements during edits. Explicit model, image count and budget choices take priority; each request defaults to one model and one image. See the console Model Catalog for current availability and prices.
Dimensions and high-resolution tiers
- 4K output: Both Flare and Sunburst can request landscape
3840x2160or portrait2160x3840; explicitly set the size after selecting a model. - Dimensions may be adjusted: The model generates images within its supported dimensions, so the output may differ from the requested size.
- Check the actual pixels: After downloading, read the file dimensions with an image viewer or image library. The response JSON may omit
size; use the downloaded image file to verify the actual pixels.
Speed and saving images
Flare prioritizes speed and Sunburst prioritizes quality. Actual duration depends on the prompt, image processing and network conditions. Wait for the full response when a request is slow; do not resubmit just because no response arrives immediately.
The response may return url or b64_json. A URL may remain valid for about 24 hours; follow the actual response. Download it immediately, or decode and save the base64 data. Do not use temporary URLs as permanent image addresses.
API request example
To inspect the request format manually, use the OpenAI-compatible image-generation endpoint:
curl https://api.yomiapi.com/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gpt-image-2.5-sunburst",
"prompt": "A clean, bright technology product promotion in landscape composition",
"size": "1024x1024"
}'
After receiving the JSON, immediately download the image URL or decode and save b64_json. In production, keep the key in an environment variable rather than hardcoding it in scripts or logs.
