Skip to main content
Glama

Start Async Generation

start_inference_job

Start a generation as an async job (POST /v1/inferences with async=true) and return a task_id.

Recommended for advanced animations (rd_advanced_animation__*), other animation styles, and batches — they run for tens of seconds and can outlive a synchronous MCP call. Poll the returned task_id with get_inference_job roughly every 2-5 seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoSeed for reproducible results; reuse the same seed to iterate on one composition.
widthYesOutput width in pixels. Each style enforces its own limits; check list_available_styles or get_style_usage. Genre-native sizes per item: Minecraft 16; items/icons/props 32-64; character sprites 16-48 retro or 96-128 showcase; tiles 16-32; portraits 96-128; full scenes 256 (RD Pro's max; 16:9 scenes = 256x144 — pixel art integer-upscales losslessly).
heightYesOutput height in pixels. Each style enforces its own limits; check list_available_styles or get_style_usage.
promptYesDescribe the SUBJECT only, richly and concretely ('a squat round flask of glowing crimson liquid, cork stopper, bright highlight on the upper-left rim' beats 'a potion'). Never write 'pixel art' — the selected style handles all rendering. For standalone assets, state a flat background color that contrasts the subject (default 'on a plain white background') and pair with remove_bg=true; never write 'transparent background' (that is remove_bg's job), and never leave the background unstated (it drifts to drab dark gray). Scenes instead describe their real environment.
tile_xNoMake the result tile seamlessly on the horizontal axis.
tile_yNoMake the result tile seamlessly on the vertical axis.
strengthNoHow strongly to change input_image, 0-1 (default 0.75). Lower values keep more of the original.
remove_bgNoRemove the background for transparent output. Use true for standalone assets and pair it with a stated contrasting background in the prompt ('on a plain white background') — removal works best on flat contrasting backdrops. Animations inherit the start frame's transparency automatically.
num_imagesNoHow many images to generate in one batch; a batch produces varied takes of one prompt (the right way to get N distinct items as individually usable images — never pack N items into a single sheet/grid image unless a sheet IS the deliverable). Style-specific maximums apply.
rd_api_keyNoRetroDiffusion API key (rdpk-...) for this call only; overrides session or header auth.
input_imageNoBase64 PNG used as the main source image for edits, variations, tilesets, animations, or styles that require a starting frame. Raw base64 or a data URL. Send the NATIVE-resolution image: an upscaled display copy (e.g. a 96px sprite exported at 4x = 384px) exceeds style ranges and gets rejected — downscale to the true pixel grid first. For advanced animations the frame's dimensions must equal width/height, and sprites whose opaque pixels touch the canvas edge animate badly (pad onto a larger transparent canvas first, e.g. 48x48 content onto 64x64).
extra_promptNoSecondary prompt for styles that use one (e.g. the transition texture in advanced tilesets).
prompt_styleYesStyle id from list_available_styles (e.g. 'rd_fast__default', 'rd_pro__isometric', or a custom 'user__...' style).
input_paletteNoBase64 image of a color palette; output colors are constrained to it.
upload_outputsNoHost outputs and return URLs in output_urls (recommended for MCP clients) instead of only base64 payloads.
frames_durationNoAnimation frame count for animation styles: 4, 6, 8, 10, 12, or 16. Pick deliberately: 8 is the sweet spot for loops (walking, idle), 6 for a snappy single action, 10-12 for flowing ambient motion.
timeout_secondsNoRead-timeout override in seconds for this call; increase for animations or large batches.
reference_imagesNoExtra per-inference guidance images (base64), only for styles where supports_reference_images is true. Not for defining custom styles.
extra_input_imageNoSecond base64 input image for styles that use one (e.g. the second texture in rd_tile__tileset_advanced).
return_pre_paletteNoAlso return the render from before palette constraints were applied.
return_spritesheetNoFor animation styles: return a PNG sprite sheet instead of a GIF.
return_non_bg_removedNoAlso return the render from before background removal was applied.
upscale_output_factorNoInteger upscale factor for the output image; 1 returns the native pixel size.
bypass_prompt_expansionNoSkip the automatic LLM prompt enrichment and use the prompt verbatim.
include_downloadable_dataNoInclude extra structured assets when available (e.g. tileset atlas JSON, animation frame data).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.6/5.0
Behavior5/5

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

The description discloses key behavioral traits not captured by annotations: the operation is asynchronous, returns a task_id immediately, can take tens of seconds, and requires polling. This is essential for an agent to set correct expectations and avoid blocking on the MCP call. It does not contradict the readOnly=false / idempotent=false annotations; it complements them.

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?

The description is two sentences of dense, high-value information with zero filler. It front-loads the core action and return value, then supplies usage guidance and a polling recommendation. Every sentence earns its place.

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 25-parameter tool with an output schema and 100% parameter documentation, the description covers the necessary operational context: async behavior, recommended use cases, and follow-up polling. It does not explicitly name create_inference as the synchronous alternative, and it omits operational caveats like rate limits or how long jobs persist, but given the schema and annotations richness, this is a minor gap rather than a critical omission.

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%, and every parameter has a rich, self-contained description. The tool description itself adds no parameter-level detail, which is fine because the schema fully carries that burden. Baseline 3 is appropriate when structured data does the heavy lifting.

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 states a specific verb ('Start'), a resource ('generation as an async job'), the exact endpoint (POST /v1/inferences with async=true), and the return value (task_id). This clearly distinguishes it from sync alternatives like create_inference and from polling tools like get_inference_job without needing to examine 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?

Explicitly recommends this tool for long-running workloads ('advanced animations, other animation styles, and batches') and explains why ('they run for tens of seconds and can outlive a synchronous MCP call'). It also names the follow-up tool ('get_inference_job') and gives a polling cadence ('every 2-5 seconds'), which is concrete, actionable guidance.

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.

TDQS

A4/5.0
Disambiguation4/5

Most tools have clearly distinct purposes (e.g., create_inference vs start_inference_job vs get_inference_result). However, the difference between create_user_style/update_user_style and per-inference references could still cause confusion, and list_available_models/list_available_styles overlap slightly.

Naming Consistency5/5

All tool names consistently follow a verb_noun pattern (e.g., create_inference, get_balance, list_edit_tools, delete_user_style). No mixing of camelCase or other styles, making the surface highly predictable.

Tool Count5/5

With 20 tools covering authentication, inference (sync/async), styles, editing, cost estimation, and status, the count is appropriate for a pixel art generation API. Each tool addresses a distinct need without bloat.

Completeness4/5

The tool set covers the full lifecycle: auth, cost estimation, synchronous/async generation, style management, editing, and result retrieval. A minor gap is the lack of a tool to list or manage user styles (e.g., get_user_styles), but this is non-critical for core workflows.

Resources