Skip to main content
Glama

Generate an image

generate_image

Creates an image from a text prompt using a Kunavo image model, returning its URL or a task ID. Charges prepaid balance per image; accepts size, resolution tier, and an idempotency key.

Instructions

Generate an image from a text prompt with a Kunavo image model (endpoint image in list_models). Spends the balance: one image is charged (the listed price is in list_models, and a higher resolution costs more). What was charged is what get_usage reports. Returns the image's URL when it is ready within wait_seconds, otherwise a task id to follow with get_task. Sending it twice makes and charges two images, unless the second call carries the first one's idempotency_key.

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": {
      "model": "<model>",
      "prompt": "<prompt>"
    },
    "name": "generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeNoShape of the image: a size such as "1536x1024" or a ratio such as "16:9", which the API turns into a shape the model takes; square when left out.
modelYesA model id from list_models with endpoint image.
promptYesWhat the image should show.
resolutionNoResolution tier on a model priced by resolution: one of the ids list_models gives under `tiers`, e.g. "2K". It sets the price. A resolution for a model priced by render speed is refused before anything is sent, and a value that is none of the model's tiers by the API, with a 400 that lists them; neither is charged.
wait_secondsNoHow long to wait for the result before returning, in seconds (0 to 45, default 40). An unfinished task is returned with its id.
idempotency_keyNoAny string of your own, 128 characters at most. Calling again with the same one and the same arguments returns the task that call started instead of starting, and charging, another. A key stands for one request for as long as the API keeps its task: the API refuses it for a request on another tool, for another model or with other arguments, so use a new one for each new request. When left out, one is made and given back in the answer.
rendering_speedNoRender-speed tier on a model priced by it: one of the ids list_models gives under `tiers`, e.g. "TURBO". It sets the price, like resolution.

Output Schema

NameRequiredDescriptionDefault
idYesTask id: img_… (image), vid_… (video) or msc_… (music).
kindYes
urlsYesResult files once completed: the images, the video, or the audio of each track.
errorYes
modelYes
statusYesqueued, in_progress, completed or failed. Anything else is a task that is not finished.
tracksNoMusic only: one entry for each track.
stalledYestrue when the task has gone longer than expected without finishing.
archivedYestrue: every URL in `urls` is Kunavo's own copy and does not expire. false: a file could not be archived and its URL is the model provider's temporary one. null until completed.
next_stepYesWhat to do with this result.
created_atYes
resolutionNoVideo only.
completed_atYes
pollable_untilYesThe task can be read with get_task at least until then.
idempotency_keyNoThe key this task was started under, in the answer of the tool that started it (get_task does not know it). Calling that tool again with it and the same arguments returns this task.
duration_secondsNoVideo only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only flag that this is a non-read-only, non-idempotent, open-world call; the description goes well beyond that by disclosing the billing model (one image charged, price from list_models, higher resolution costs more), how the charge is audited via get_usage, and that repeating the call in the absence of an idempotency_key produces and charges a second image. That is exactly the behavioral burden a paid generation tool must carry, and it is consistent with idempotentHint=false rather than contradicting it.

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?

Front-loaded with the action and the model source, then terse clauses on cost, return shape, and idempotency. The parenthetical billing sentence is slightly dense but every remaining sentence carries distinct information; nothing is pure filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a costly, open-world generation tool with 7 parameters, the description covers the async contract (URL vs task id), the charge semantics, and the retry/idempotency rule. With an output schema present it does not need to document return fields, and it correctly leaves sizing and tier details to the schema.

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

Parameters3/5

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

Schema description coverage is 100%, so the parameters are already well documented, and most of what the description says (wait_seconds returning a task id, idempotency_key reuse rules) restates the schema in condensed form. It does add the linkage that resolution/rendering_speed tiers drive the price and that the charge is confirmable via get_usage, but that is a marginal gain over the schema text.

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?

Specific verb ('Generate an image') plus the resource and the input source ('from a text prompt'), and it names where the model id must come from (list_models, endpoint image). This is enough for an agent to distinguish it from edit_image, which would take an existing image rather than a prompt.

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?

Gives clear operative context: pick a model from list_models, follow an unfinished call with get_task, and verify the charge with get_usage. It stops short of explicit exclusions (e.g. 'use edit_image to modify an existing image' or 'use generate_video for motion'), so a sibling-routing sentence is missing.

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