Skip to main content
Glama

generate_image

Generate a 2D image from a text prompt (async). Returns an asset { id }; then call wait_for_asset (or poll get_asset) until taskStatus=2 and read files.image (PNG URL). Costs credits — see list_models(category='image').

Instructions

Generate a 2D image from a text prompt (async). Returns an asset { id }; then call wait_for_asset (or poll get_asset) until taskStatus=2 and read files.image (PNG URL). Costs credits — see list_models(category='image'). Omit model for the default. Up to 4 reference image URLs can guide the result (best with nano-banana).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoengine name from list_models(category='image')
promptYes
aspect_ratioNoW:H, e.g. "1:1", "16:9", "9:16", "21:9". Use a value from the model's supportedAspectRatios in list_models(category='image') — nano-banana models reject anything else with 400 before charging credits; gpt-image-* buckets any ratio to its nearest of three output sizes.
reference_image_urlsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.6
    • changedInput schema / properties / aspect_ratio / description
      Previous value: -"e.g. \"1:1\", \"16:9\", \"9:16\""New value: +"W:H, e.g. \"1:1\", \"16:9\", \"9:16\", \"21:9\". Use a value from the model's supportedAspectRatios in list_models(category='image') — nano-banana models reject anything else with 400 before charging credits; gpt-image-* buckets any ratio to its nearest of three output sizes."
    • addedInput schema / properties / aspect_ratio / pattern
      Added value: +"^[1-9]\\d?:[1-9]\\d?$"
    • changedInput schema / properties / prompt / maxLength
      Previous value: -5000New value: +4000
  2. First observedv0.1.0

TDQS

Score is being calculated.