Skip to main content
Glama

generate_image

Create images from text prompts using kie.ai, with 60+ selectable models, reference images, and configurable aspect ratios.

Instructions

Generate an image using kie.ai. TIP: for architecture/game-art/advertising/product-UI jobs, call profile_brief first — it returns the vertical's intake questions, routing, and prompt formulas. (60+ 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. Newest OpenAI→gpt-image-2-5/flare-* (6cr @1K, fast default) or gpt-image-2-5/sunburst-* (premium polish); both 1K-4K + transparent background (NEW). Split any image into layers→seedream_layer_decompose tool (7cr/layer, NEW). Generate-then-refine by named region→grok-imagine-image-2-0/text-to-image (4cr, #2 Arena T2I+edit) then grok_segment_map (free) + grok_image_edit (4cr; also edits ANY uploaded image via image_urls mode). Anime→qwen (3cr cheapest); qwen2-1/* (4cr, NEW) adds transparent BG, mask inpainting, 10-ref compositing. Fast drafts→nano-banana-2-lite (4cr, ~4s, NEW). Upscale→recraft/crisp-upscale (0.5cr). 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.4/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 disclose real behavioral traits: output goes to kie/assets/raw/, per-model credit costs (3cr to 100cr), latency (~4s for nano-banana-2-lite), and quality tiers. It stops short of covering auth/permission needs, failure modes, or what happens when a model rejects an aspect_ratio, so it is strong but not exhaustive.

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 purpose and profile_brief tip are correctly front-loaded, but the body becomes a dense catalog of ~15 model IDs and prices in one paragraph, which is hard to scan and near the limit of what belongs in a tool description rather than a referenced resource. Information density is high, but structure suffers.

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 9-parameter, no-output-schema tool this covers most of what an agent needs: output location, model selection guidance, and async handling is already documented in the schema's `wait` parameter. It lacks guidance on parameter interactions (e.g. aspect_ratio validity per model beyond a pointer) but is otherwise complete.

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 description coverage is 100%, so the baseline is 3, but the model guide meaningfully enriches the `model` parameter by mapping use-cases (blueprints, text/logos, anime, upscale, BG removal) to concrete model IDs and their tradeoffs. The remaining parameters get no semantic help in the description, so it does not reach 5.

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 gives a specific verb and resource ('Generate an image using kie.ai') and the surrounding model guide makes it immediately distinguishable from siblings like generate_video, grok_image_edit, and seedream_layer_decompose, each of which is explicitly redirected to. An agent can tell what this tool is and is not without opening the schema.

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?

Explicit routing rules are given: call profile_brief first for architecture/game-art/advertising/product-UI, use list_models filter="use-case" to explore, and delegating alternatives named for layer splitting, region refine, and editing. When-to-use and when-to-use-something-else are both stated.

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