Skip to main content
Glama

Generate an image

generate_image

Generates one image from a prompt, with an optional reference image and aspect ratio, and saves it to your FXI library. Spends credits. Returns the image URL when ready (usually within 25 seconds), or a generation id to check with get_generation (prefer its lifecycle_status field over the legacy status field). Uses the fast default model unless the user picks another one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoOptional seed for repeatable results.
modelNoImage model. Leave this out, or use "z-image-turbo" (fast, cheapest), unless the user names a model or asks for higher detail. Do not upgrade because the prompt sounds cinematic, premium or photoreal. Higher-detail options cost more: "nano-banana-2" (balanced) and "nano-banana-pro" (highest detail, about 9x the credits). Offer them by name with their price from list_models, and switch only when the user agrees.
promptYesWhat the image should show.
model_idNoDeprecated alias of "model". Prefer "model".
input_imageNoOptional reference image. Public https URL, or an asset_url from create_upload_url, upload_from_url or upload_media_data (used as-is).
aspect_ratioNoFor example "16:9", "1:1" or "9:16".
estimate_onlyNoIf true, returns the estimated credit cost for this exact request and does NOT generate anything or spend any credits.
idempotency_keyNoOptional. Reuse the same key to retry safely: the earlier result is returned and nothing is charged twice.
last_frame_imageNoOptional end image (models that support it). Public https URL, or an asset_url from create_upload_url, upload_from_url or upload_media_data (used as-is).
first_frame_imageNoOptional start image (models that support it). Public https URL, or an asset_url from create_upload_url, upload_from_url or upload_media_data (used as-is).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / model / description
      Previous value: -"Image model from list_models. Defaults to \"z-image-turbo\"."New value: +"Image model. Leave this out, or use \"z-image-turbo\" (fast, cheapest), unless the user names a model or asks for higher detail. Do not upgrade because the prompt sounds cinematic, premium or photoreal. Higher-detail options cost more: \"nano-banana-2\" (balanced) and \"nano-banana-pro\" (highest detail, about 9x the credits). Offer them by name with their price from list_models, and switch only when the user agrees."
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: it spends credits, typically resolves within ~25 seconds, and returns either an image URL or a generation id for polling via get_generation. It even steers the agent to lifecycle_status over the legacy status field. Nothing here contradicts the declared non-read-only, non-idempotent profile.

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?

Front-loads what it does, then cost, then return/async behavior and model default in three tight sentences. The parenthetical about lifecycle_status is slightly tangential but is actionable guidance rather than filler.

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, the description correctly takes on return-value explanation (URL vs. generation id) plus cost and latency. It covers what an agent needs to invoke and follow up, though it leaves failure behavior and the estimate_only/idempotency interactions entirely to the schema.

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%, so the schema already documents all ten parameters including the model enum and the deprecated model_id alias. The description restates the prompt/reference-image/aspect-ratio surface and the default-model behavior, adding prose framing but little new parameter meaning. 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 (generates one image from a prompt), names the optional inputs, and states the persistence target (your FXI library). It also distinguishes itself from generate_video and compose_scene by scoping to a single still 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?

Gives clear routing context: prefer the fast default model unless the user names another, and poll with get_generation when only a generation id comes back. It does not explicitly cover when to prefer estimate_only or idempotency_key retries, though those are documented in the schema.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources