Skip to main content
Glama

gpt_image_generate

Generate or edit images using GPT Image via Comfy.org. Provide a text prompt to create new images or edit existing ones. Requires API key.

Instructions

Generate or edit an image using GPT Image via Comfy.org API.

Can generate from text alone, or edit an existing image with a prompt. All parameters except prompt are optional. Requires COMFY_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoNumber of images. Default: 1. Range: 1-4.
seedNoRandom seed. Default: -1 (random).
sizeNoImage dimensions. Default: "auto". Valid: "auto", "1024x1024", "1024x1536", "1536x1024".auto
modelNoModel name. Default: "gpt-image-1.5". Valid: "gpt-image-1", "gpt-image-1.5".gpt-image-1.5
promptYesText description or edit instruction.
qualityNoImage quality. Default: "low". Valid: "low", "medium", "high".low
backgroundNoBackground style. Default: "auto". Valid: "auto", "opaque", "transparent".auto
input_imageNoFilename in ComfyUI input directory for editing. Default: "" (none, generate from scratch). Upload first with upload_image if needed.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden for behavioral disclosure. It mentions the need for a COMFY_API_KEY but does not disclose whether the tool is asynchronous, how results are retrieved, or potential side effects like queue submission or cost. This is a significant gap for a generation tool that likely submits a job to the ComfyUI queue and requires later retrieval.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences long and front-loads the core purpose. Every sentence contributes: the first states what it does, the second explains usage modes, and the third clarifies prerequisites. There is no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the 8-parameter complexity and the presence of an output schema, the description is adequate for basic invocation but omits important workflow context. It does not mention that input_image must be uploaded first (instead the schema does), nor does it hint at how to poll for results (though sibling tools like wait_for_jobs imply this). The description and schema together cover invocation, but the description alone leaves the overall process partially incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides rich descriptions for all 8 parameters, so the baseline is 3. The description adds an aggregate note that 'All parameters except prompt are optional', which is helpful. However, it largely restates the prompt's dual role already present in the schema (text description or edit instruction), so it does not significantly enhance parameter understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Generate or edit an image using GPT Image via Comfy.org API', giving a specific verb, resource, and API context. This distinguishes it from sibling tools like dalle3_image or flux_text_to_image by focusing on the GPT Image model. It also enumerates the two modes: generating from text and editing an existing image.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use the tool: 'Can generate from text alone, or edit an existing image with a prompt.' It also notes that 'All parameters except prompt are optional,' which gives practical guidance. However, it does not explicitly mention alternative tools or when not to use this one, so it lacks explicit exclusionary guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/halbert04/comfyui-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server