generate_openai_image
Generate and edit product images using OpenAI gpt-image-2, with reference images, flexible sizes, and iterative refinement via previous response IDs.
Instructions
Catalog entry. Runs in your Kuudo deployment, not here. Generate images with OpenAI gpt-image-2 via the Responses API. The additive OpenAI provider, sibling to generate_image (Google Gemini). Send your OpenAI key as Authorization: Bearer <key> — the tool name implies the provider. Iterate on a result with previous_response_id (OpenAI's analog of Gemini's interaction_id).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Number of images. Implemented as N server-side calls (the OpenAI image tool has no native count). | |
| size | No | 'auto' or a 'WIDTHxHEIGHT' string. gpt-image-2 takes flexible sizes: both edges multiples of 16, aspect 1:3-3:1, max 3840x2160. | auto |
| prompt | Yes | Image prompt for OpenAI gpt-image-2 via the Responses API. Describe subject, composition, style, and any text to render. | |
| quality | No | Render quality. | auto |
| background | No | Background. gpt-image-2 does not support 'transparent'. | auto |
| moderation | No | Moderation strictness. | auto |
| input_images | No | Reference/edit images. Accepts agent-iris://images/{id} handles, http(s) URLs (including signed server URLs), and data: URLs — all resolved to base64 data URLs server-side before the OpenAI call. | |
| output_format | No | Output image format. | png |
| output_compression | No | Compression 0-100 (jpeg/webp only). | |
| system_instruction | No | Optional system tone/style guidance. | |
| previous_response_id | No | A prior generate_openai_image response id to iterate on (the OpenAI analog of Gemini's interaction_id). Chains a follow-up edit. |