Skip to main content
Glama

Generate image

generate_image
Destructive

Create or edit images from a text prompt, using reference image URLs for edits and variations. Returns a hosted image URL for download or reuse.

Instructions

Generate or edit an image from a text prompt. Defaults to Google Nano Banana Pro. Pass image_urls to edit or use reference images. Returns the image URL. (To upscale an existing image, use upscale_media instead.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoOptional seed for reproducible output. Same seed + same input gives the same result on supported models.
waitNoDefault true: wait for the job and return the finished result. Set false to get the task_id back immediately and poll with get_task — use for long jobs (high-quality video, full songs) or when the connection might time out.
modelNoModel, as a short alias or full id. Aliases: 'nano-banana-pro' (default), 'nano-banana', 'nano-banana-2', 'nano-banana-2-lite', 'flux', 'gpt-image', 'qwen', 'kling-image', 'grok-image', 'seedream'. Full ids also work. See list_models. (Upscaling lives in upscale_media, not here.)
promptYesText prompt describing the image (or the edit to apply to image_urls).
image_urlNoConvenience: a single reference/source image (same as image_urls with one entry).
image_urlsNoReference/source images for editing and multi-reference generation — each must be a public https URL. Upload a local file first and pass the returned file_url; never a local path, and never inline base64. The max count is per-model.
resolutionNoOutput resolution; omit for the model's default. Per-model: some take sizes like '2k', some megapixels, some have no resolution field.
aspect_ratioNoOutput aspect ratio, e.g. '1:1'. Per-model: some accept different sets, some have none.
callback_urlNoOptional webhook URL. When set, the tool returns immediately with the task_id and UnificAlly POSTs the result to this URL when the task finishes. Webhook body: { task_id, status: 'completed'|'failed', data: { video_url | image_url | audio_url | ... }, error_message? } — note the media arrives under 'data', not 'output'. Use for long jobs instead of waiting.
confirm_costNoOnly relevant if the operator enabled a spend guard. When a call exceeds the configured confirm threshold it returns a quote; retry with confirm_cost: true to proceed. Safe to ignore otherwise.
negative_promptNoOptional description of what to avoid in the output (supported by Qwen, Wan and some others).
provider_optionsNoEscape hatch for model-specific fields not exposed as named parameters (e.g. Kling multi_shots, Flux steps). Merged into the API 'input' payload. Rejected: fields the tool already manages (prompt, media URLs, task_id, ...) and reserved routing/billing/auth keys (model, callback_url, dry_run, api_key, authorization) — switch models with the 'model' parameter, not here. See https://docs.unifically.com for per-model fields.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and idempotent=false, so the safety profile is covered. The description adds one genuinely useful behavioral fact not in the structured fields — the return value is an image URL — but says nothing about credit spend, per-model limits, or the long-job polling path, so it adds only modest context beyond the annotations.

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?

Three short sentences, front-loaded with the core capability, then the editing path, then the return value, then the sibling exclusion. No filler or redundancy.

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?

With no output schema, stating 'Returns the image URL' closes the most important gap for a 12-parameter generative tool. The remaining complexity (cost confirmation, callbacks, provider_options) is fully handled by the schema, so the description is complete enough for correct invocation, though it could note the cost/credit dimension.

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 schema already documents all 12 parameters thoroughly, including defaults, wait/callback semantics, and the provider_options escape hatch. The description only restates the image_urls editing usage and the default model, adding little beyond what the schema provides; baseline 3 applies.

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?

States a specific verb and resource ('Generate or edit an image') and covers both modes (generation and editing) in one clause. It explicitly distinguishes itself from the sibling upscale_media, so an agent can route between the two without opening either schema.

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?

Gives concrete usage conditions: pass image_urls to edit or supply reference images, and defer to upscale_media for upscaling. What's missing is guidance on when to prefer this over generate_video/edit_video or how the wait/callback flags change the calling pattern — but those are surfaced in the schema rather than the description.

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