Skip to main content
Glama

generate_image

Turn text prompts into images with kie.ai's 47+ models. Select model, aspect ratio, and reference images; download results to your assets folder.

Instructions

Generate an image using kie.ai (47+ models). Downloads to kie/assets/raw/. MODEL GUIDE: Architecture/blueprints→gpt4o or nano-banana-2 (reasoning). Game art/3D→seedream/4.5 or 5-lite. Character sheets→ideogram/character. Text/logos→ideogram/v3 (best text). Photo editing→flux-kontext-pro. Generate-then-refine by named region→grok-imagine-image-2-0/text-to-image (4cr, #2 Arena T2I+edit, NEW) then grok_segment_map (free) + grok_image_edit (4cr). Anime→qwen (3cr cheapest). Fast drafts→nano-banana-2-lite (4cr, ~4s, NEW). Upscale→recraft/crisp-upscale (2cr). BG removal→recraft/remove-background. Cheapest→z-image,qwen (3cr). Best quality→nano-banana-pro (24cr), flux-kontext-max (100cr). Use list_models filter="use-case" to explore.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNoSet false to submit and return immediately with the task_id (async mode) — then poll with check_task and fetch with download_result. Recommended for long generations to avoid client-side watchdog timeouts.
modelNoModel ID. Use list_models to see all available models and their options.gpt4o
promptYesText prompt describing the image to generate
filenameNoOutput filename (saved to kie/assets/raw/). Auto-generated if omitted.
image_urlsNoReference/input image URLs for image-to-image models
aspect_ratioNoAspect ratio (valid values depend on model — see list_models). Common: 1:1, 2:3, 3:2, 16:9, 9:16, 4:3, 3:42:3
download_dirNoAbsolute directory to save the file(s) into (created if missing). Defaults to the server's kie/assets/raw/. Must be absolute — the MCP server's working directory is not the caller's.
model_optionsNoModel-specific options (quality, resolution, seed, negative_prompt, etc). Use list_models to see available options per model.
max_wait_secondsNoOverride the blocking-mode polling budget in seconds (defaults: image 600, video 900, audio 300, speech 300). Ignored when wait=false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral transparency burden. It discloses the download side-effect, model-specific credit costs (e.g., '3cr cheapest', '24cr'), and speed hints ('~4s'). While it does not cover auth, rate limits, or error handling, it provides meaningful resource-usage context that helps an agent anticipate the tool's impact.

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?

The description is front-loaded with the core purpose and output location, and the MODEL GUIDE condenses a large amount of model-selection knowledge into a dense, scannable block. It is lengthy but each mapping serves a purpose; minor improvement would be converting the guide into bullet points for even faster scanning.

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?

The tool is complex (9 parameters, no output schema), but the description covers model selection, output location, and costs. The schema's parameter descriptions complement it by detailing async behavior (wait) and download_dir overrides, making the overall definition reasonably complete for an agent to invoke correctly.

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

Parameters5/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 description goes well beyond the schema by providing a comprehensive MODEL GUIDE that recommends specific models for specific use cases, cost tiers, and model options. This adds substantial semantic meaning to the 'model' parameter and related options.

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 description explicitly states 'Generate an image using kie.ai (47+ models). Downloads to kie/assets/raw/.' This clearly identifies the specific verb (generate), resource (image), and output behavior, distinguishing it from sibling tools like generate_video or generate_music.

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

Usage Guidelines5/5

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

The MODEL GUIDE provides explicit when-to-use guidance, mapping use cases (architecture, game art, anime, etc.) to specific models with cost and speed notes. It also points to list_models for exploration and explains a generate-then-refine workflow using sibling tools (grok_segment_map, grok_image_edit), going far beyond simple alternatives.

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