Skip to main content
Glama

create_image

Generate or edit images from natural language prompts, supporting style transfer, background control, masks, and saving to files.

Instructions

Generate or edit images using OpenAI GPT Image. Use when asked to 'create an image', 'generate a picture', 'draw', 'make an illustration', 'edit an image', 'transform a photo', or any visual content creation request. Supports image input for editing and style transfer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maskNoFile path to a PNG image with an alpha channel to use as a mask for targeted inpainting. Transparent areas of the mask indicate where the image should be edited. Only used with the edit endpoint (when input_images is provided).
sizeNoSize of the generated image. '1024x1024' for square, '1024x1536' for portrait, '1536x1024' for landscape, or 'auto' to let the model decide.1024x1024
styleNoOptional style preset that guides image generation towards a specific visual style.
promptYesA detailed description of the image to generate, or editing instructions when input images are provided. Be specific about style, composition, colors, mood, and subject matter for best results.
qualityNoQuality of the generated image. 'high' produces the most detailed output, 'medium' balances quality and speed, 'low' is fastest, 'auto' lets the model decide.auto
backgroundNoBackground style for the generated image. 'transparent' generates images with a transparent background (requires PNG or WebP output), 'opaque' forces a solid background, 'auto' lets the model decide.auto
output_fileYesFile path to save the generated image. Supports both absolute paths (/Users/name/image.png) and relative paths (./output/image.png). The image will be written to this path and the path returned in the response.
input_imagesNoFile paths to input images for editing or style reference. Supports PNG, JPEG, WebP, and GIF formats. Max 20MB per image. When provided, the prompt should describe how to modify or use these images. Accepts a single path string, a JSON-encoded array string, or an array of strings.
input_fidelityNoControls how strictly the output image preserves the original input image details. 'high' preserves more details, 'low' allows more creative freedom. Only used with the edit endpoint (when input_images is provided).
number_of_imagesNoNumber of image variations to generate (1-4). Multiple images are saved with numbered filenames (e.g., output_1.png, output_2.png).
output_mime_typeNoOutput image format. 'image/png' supports transparency, 'image/jpeg' for smaller file sizes, 'image/webp' for modern web use.image/png
system_message_fileNoFile path to a text file containing system-level instructions. The file contents are prepended to the prompt (truncated to 4000 chars). Use for persistent style guidelines, brand constraints, or negative constraints. Since the OpenAI images API does not support a native system role, the content is prepended to the prompt.
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only restates the tool's purpose and the fact that it supports image input, but does not disclose side effects like writing output to files, number of generated variants, or model limitations. The rich parameter descriptions help, but behavioral transparency beyond structured schema is minimal.

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 two sentences, front-loaded with the core action, and every sentence adds value by providing usage triggers and capability context. There is no redundant or filler content.

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

Completeness4/5

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

The tool is complex with 12 parameters, but the schema is highly descriptive and covers all parameters with examples and defaults. The description adequately frames the high-level use cases, and the absence of an output schema and annotations is compensated by the detail in the input schema. It could mention file-saving side effects, but the output_file parameter already documents this.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds only marginal semantic context by noting that input images are used for editing and style transfer, which is already implied by the schema parameter descriptions. It does not substantially enhance parameter understanding beyond the schema.

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

Purpose4/5

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

The description clearly states it generates or edits images using OpenAI GPT Image and lists explicit trigger phrases ('create an image', 'generate a picture', 'draw', etc.). It is specific about the verb and resource, but since no sibling tools are provided, it cannot demonstrate differentiation from alternatives.

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 explicitly says 'Use when asked to...' and enumerates several concrete user request types. It provides clear context for when to invoke the tool, though it does not mention exclusions or alternatives because none are listed in the sibling tools.

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/gregpriday/create-image-mcp'

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