Skip to main content
Glama

Text To Image

text_to_image

Generate image from text prompt using AI diffusion models.

Creates images from text descriptions. Returns the generated image URL.


Available models:

  • ZAnimeDistill_8Step_INT8: steps=4-16 (default 8), size=128-2048x128-2048, w/h rounded down to a multiple of 16

  • Flux_2_Klein_4B_BF16: steps=4 (fixed), size=256-1536x256-1536, up to 3 input image(s), no negative_prompt

  • ZImageTurbo_INT8: steps=1-50 (default 8), size=128-2048x128-2048, w/h rounded down to a multiple of 16

  • Flux1schnell: steps=1-10 (default 4), size=256-2048x256-2048, loras: AstroGhxstyleFluxSchnellLora, TestTokenFluxSchnellLora, PainHaroldFluxSchnellLora, GideonGreylockFluxLora, PepeFluxSchnellLora, GamerHashFluxSchnellLora, GamerCoinFluxSchnellLora

  • gpt-image-2.6 (test model): size=640-3840x640-3840, w/h rounded down to a multiple of 16, ≤8.29Mpx, side≤3840, aspect≤3, up to 5 input image(s), quality: low|medium|high|auto (default medium), no negative_prompt

  • nano-banana-2.1 (test model): size=352-11712x352-11712, w/h rounded down to a multiple of 16, ≤17.20Mpx, side≤11712, aspect≤8.4, up to 5 input image(s), no negative_prompt

  • gpt-image-2.5 (test model): size=640-3840x640-3840, w/h rounded down to a multiple of 16, ≤8.29Mpx, side≤3840, aspect≤3, up to 5 input image(s), quality: low|medium|high|auto (default high), no negative_prompt

  • nano-banana-2 (test model): size=176-4096x176-4096, w/h rounded down to a multiple of 16, ≤16.78Mpx, side≤4096, aspect≤8.4, no negative_prompt

  • gpt-image-2 (test model): size=512-2048x512-2048, output size = input size, up to 2 input image(s), quality: low|medium|high|auto (default medium), no negative_prompt

  • gpt-image-1.5 (test model): size=1024-1536x1024-1536, output size = input size, up to 2 input image(s), quality: low|medium|high (default medium), no negative_prompt Models marked (test model) are experimental: they may change or disappear. Prefer an unmarked model unless the caller asks for one of them.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>",
      "model": "<model>"
    },
    "name": "text_to_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoRandom seed for reproducibility
lorasNoLoRA adapters to apply: [{'name': str, 'weight': float}]. Only for models that list them
modelYesAI model name (e.g., 'Flux1schnell', 'ZImageTurbo_INT8')
stepsNoNumber of diffusion steps. Defaults to the model's own value (see the model list); each model has its own range and some fix it
widthNoImage width in pixels. Defaults to the model's own value (see the model list)
heightNoImage height in pixels. Defaults to the model's own value (see the model list)
promptYesText description of the image you want to generate
qualityNoQuality tier for models that price by tier, e.g. 'low', 'medium', 'high' on gpt-image-1.5. Check the model card; costs vary sharply between tiers
webhook_urlNoHTTPS URL for deAPI to call when this job finishes. Notifies your own systems; the tool still returns the result here
enhance_promptNoLet the API expand the prompt before generating
guidance_scaleNoHow closely to follow the prompt. Leave unset to use the model's own default
webhook_secretNo32-255 char key deAPI signs the callback with (HMAC-SHA256). Needs webhook_url. A secret given in chat stays in the transcript
negative_promptNoThings to exclude from the image (optional)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does real work: it discloses per-model step ranges, size bounds, rounding to multiples of 16, megapixel/side/aspect caps, which models reject negative_prompt, and which support loras or quality tiers. Gaps remain around cost variance between models and whether generation is synchronous or job-based, though webhook_url hints at async execution.

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?

Front-loaded with the purpose and return value in two short sentences, then a scannable per-model constraint list under a clear separator, closing with a preference rule. The only redundancy is 'Creates images from text descriptions' restating the opening line, which is minor against the density of useful detail.

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?

For a 13-parameter tool with no annotations, the description covers the highest-risk decisions (model choice and each model's limits) and an output schema exists so return values need not be explained. It stops short of noting cost differences across models or failure modes, which an agent choosing among ten models would benefit from.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the model table pushes it higher by supplying constraints the schema cannot express, such as Flux_2_Klein_4B_BF16 fixing steps at 4, Flux1schnell being the only model listing loras, and quality tiers applying only to gpt-image models. That is materially more than the schema's 'Defaults to the model's own value'.

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?

States a specific verb and resource ('Generate image from text prompt using AI diffusion models') plus the return ('the generated image URL'), which distinguishes it from image_to_image and text_to_video by input modality. It never names the closest sibling, text_to_image_price, so the boundary is implied rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The only explicit guidance is model-selection policy: '(test model) are experimental... Prefer an unmarked model unless the caller asks.' There is no statement of when to call this versus text_to_image_price or image_to_image, so tool-level routing is left to inference from the name alone.

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.