Skip to main content
Glama

openai_generate_image

Create AI-generated images from text descriptions. Generate artwork, illustrations, or visual concepts with customizable model, size, quality, and style.

Instructions

Generate images using OpenAI image models via AceDataCloud.

Creates AI-generated images from text descriptions using models like
gpt-image-1, dall-e-3, and nano-banana variants.

Use this when:
- You want to create an image from a text description
- You need AI-generated artwork or illustrations
- You want to generate product mockups or visual concepts

Returns:
    JSON response containing image URLs or base64 data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoNumber of images to generate (1-10). Default is 1.
sizeNoImage dimensions as 'WIDTHxHEIGHT' or 'auto' (default). gpt-image-2 accepts any custom dimensions matching the format (multiples of 16, longer side ≤ 3840, total pixels ≤ 8,294,400). Common presets — 1K: '1024x1024', '1536x1024', '1024x1536', '1792x1024', '1024x1792'; 2K (1.5× rate): '2048x2048', '2048x1536', '1536x2048', '2048x1152', '1152x2048'; 4K (1.5× rate): '2880x2880', '3264x2448', '2448x3264', '3840x2160', '2160x3840'. dall-e-2: '256x256', '512x512', '1024x1024'. dall-e-3: '1024x1024', '1792x1024', '1024x1792'.1024x1024
modelNoThe image model to use. Options: 'gpt-image-1' (default, versatile), 'gpt-image-1.5', 'gpt-image-2', 'dall-e-3', 'dall-e-2', 'nano-banana', 'nano-banana-2', 'nano-banana-pro'.gpt-image-1
styleNoImage style for dall-e-3. 'vivid' generates hyper-real and dramatic images, 'natural' produces more natural, less hyper-real looking images.
promptYesA text description of the desired image(s). Be descriptive about the subject, style, lighting, and composition. Example: 'A serene mountain landscape at sunset with golden light'
qualityNoImage quality. Options: 'auto' (default), 'high', 'medium', 'low', 'hd' (dall-e-3 high detail), 'standard' (dall-e-3 standard).auto
backgroundNoBackground type for gpt-image models. 'transparent' removes the background, 'opaque' keeps it, 'auto' decides automatically.
moderationNoContent moderation level. 'auto' uses default moderation, 'low' applies less strict filtering.
callback_urlNoOptional webhook URL. When provided, the API returns a task_id immediately and POSTs the result to this URL when generation completes.
output_formatNoOutput file format. Options: 'png' (default), 'jpeg', 'webp'.png
partial_imagesNoNumber of partial images to emit during streaming (0-3). 0 returns the final image in one event.
response_formatNoHow to return the image. 'url' (default) returns a URL, 'b64_json' returns base64-encoded image data.url
output_compressionNoCompression level (0-100%) for jpeg/webp output formats. Default is 100.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations provided, so description carries full burden. Only mentions return format (URL or base64). Lacks disclosure of latency, cost, asynchronous behavior (despite callback_url parameter), model-specific limitations, or that some parameters are model-dependent. Insufficient for an image generation tool.

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

Conciseness4/5

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

Structured with a title, purpose paragraph, bullet points for usage, and return type. Some redundancy in bullet points (restate primary purpose). Could be slightly more concise but overall effective.

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?

Complex tool with 13 parameters and output schema. Description covers general purpose and usage but misses key context like model-specific behaviors, async callback handling, and image size limitations. Adequate but not thorough.

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 coverage is 100% with detailed per-parameter descriptions. The tool description adds no additional parameter meaning beyond the schema. Baseline 3 is appropriate.

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?

Clearly states it generates images using specific models (gpt-image-1, dall-e-3, nano-banana) from text descriptions. Distinguishes from sibling tools like openai_edit_image (edits) and openai_chat_completion (text generation). Verb+resource is specific.

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?

Explicitly lists three use cases (create from text, artwork, mockups) in a 'Use this when' section. Does not explicitly mention alternatives or when not to use, but the sibling context implies which tool to use for editing (openai_edit_image). Clear and practical.

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/AceDataCloud/OpenAIMCP'

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