Skip to main content
Glama

Text To Image Price

text_to_image_price

Calculate price for text-to-image generation.

Pass the same parameters the generation call will use. Fields that affect the charge — quality above all — change the quote, so omitting them here produces a number the job will not honour.


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_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNoRandom seed the job will use
lorasNoLoRA adapters the job will use: [{'name': str, 'weight': float}]
modelYesAI model name
stepsNoNumber of diffusion steps. Limits per model (see the model list)
widthNoImage width in pixels. Limits per model (see the model list)
heightNoImage height in pixels. Limits per model (see the model list)
promptYesText description for price calculation
qualityNoQuality tier, e.g. 'low', 'medium', 'high'. On gpt-image-1.5 the tiers differ ~14x in price, so quoting without it can be badly wrong
guidance_scaleNoGuidance the job will use. Defaults to the model's own value; limits per model (see the model list)
negative_promptNoThings to exclude — quote it if the job will use it

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and largely meets it: it discloses that quality drives the quoted price, that mismatched parameters invalidate the quote, and that '(test model)' entries are experimental and may change or disappear. What is missing is the operation's own safety profile — that it is a non-mutating, side-effect-free quote that can be called repeatedly without incurring generation cost.

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

Conciseness3/5

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

The critical guidance is front-loaded in two sentences, but roughly two-thirds of the text is a per-model capability table that overlaps with the get_available_models sibling and includes exhaustive LoRA name lists. Useful for quoting accuracy, yet heavy for a description and not the tightest way to convey it.

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 an output schema present, return values need no explanation, and the 10 parameters are fully schema-documented and reinforced by model constraints. Remaining gaps are small: no statement of what happens on an unsupported model/parameter combination, and no note that the call itself is free and read-only.

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 baseline is 3, but the description supplies the per-model semantics the schema defers to ('limits per model (see the model list)') — step ranges, size bounds, megapixel/aspect caps, input-image counts, quality defaults, and which models reject negative_prompt. That meaningfully supplements fields like steps, width, height, and quality.

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?

The opening sentence names a specific verb and resource ('calculate price for text-to-image generation'), which cleanly separates it from the generation sibling text_to_image and from the other *_price quote tools. The follow-on sentence clarifies that it is a projection of a future job rather than an execution.

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?

It gives an explicit calling contract ('pass the same parameters the generation call will use') and warns that omitting charge-affecting fields yields a quote the job won't honour, plus a preference rule for test models ('prefer an unmarked model unless the caller asks'). It stops short of naming siblings such as text_to_image or get_available_models as alternatives, so no explicit when-not routing exists.

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.