Skip to main content
Glama

Generate Pixel Art

create_inference

Generate images using the public /v2/inferences endpoint.

For the highest quality prefer RD Pro styles (rd_pro__*); they support reference_images for character/style consistency, and most go as small as 12x12 px (check list_available_styles for each style's limits) — a small target size is never a reason to switch to a cheaper model family. Style ids are opaque strings with no uniform format (some RD Fast styles appear as "default:rd_flux"); take them verbatim from the catalog and never infer capabilities from an id's prefix. For animation styles prefer start_inference_job + get_inference_job instead — animations are long-running, and a failed animation is worth one retry with identical parameters (failures auto-refund).

Field-tested workflow rules: N distinct items = N individually usable images (separate calls or num_images=N), never one sheet/grid image unless a sheet IS the deliverable. Variants of ONE image (seasons, day/night, palettes) = generate the base once, then derive each variant with the image_edit tool ("... keep the exact same composition") — independent generations of the "same" scene come out unrelated. Converting an existing image INTO pixel art is rd_pro__pixelate with input_image (16-256 px output, batch<=16); reference_images-based generation re-imagines rather than converts. To animate an image you already have, use rd_advanced_animation__* with input_image (fixed-format rd_animation__* styles generate their own subject from the prompt instead). To get the other directional views of a sprite you already have, use rd_advanced_animation__rotate with input_image (same 8-direction layout as rd_animation__8_dir_rotation).

Use input_image for the main source image, reference_images for extra per-inference guidance, and style_reference_images only on create_user_style/update_user_style. The response excludes raw base64 image payloads to keep MCP outputs compact.

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. For rd_advanced_animation__rotate the prompt is only an optional hint describing the uploaded subject — a few words or an empty string.
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. Ignored by rd_advanced_animation__rotate (always 8 views).
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 (for rd_advanced_animation__rotate, the 3x3 direction sheet whose views face the center).
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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / frames_duration / description
      Previous value: -"Animation 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."New value: +"Animation 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. Ignored by rd_advanced_animation__rotate (always 8 views)."
    • changedInput schema / properties / prompt / description
      Previous value: -"Describe 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."New value: +"Describe 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. For rd_advanced_animation__rotate the prompt is only an optional hint describing the uploaded subject — a few words or an empty string."
    • changedInput schema / properties / return_spritesheet / description
      Previous value: -"For animation styles: return a PNG sprite sheet instead of a GIF."New value: +"For animation styles: return a PNG sprite sheet instead of a GIF (for rd_advanced_animation__rotate, the 3x3 direction sheet whose views face the center)."
  2. Changed6 schema fields changed
    • changedInput schema / properties / frames_duration / description
      Previous value: -"Animation frame count for animation styles: 4, 6, 8, 10, 12, or 16."New value: +"Animation 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."
    • changedInput schema / properties / input_image / description
      Previous value: -"Base64 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."New value: +"Base64 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)."
    • changedInput schema / properties / num_images / description
      Previous value: -"How many images to generate in one batch. Style-specific maximums apply."New value: +"How 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."
    • changedInput schema / properties / prompt / description
      Previous value: -"Describe the SUBJECT only (e.g. 'a knight resting by a campfire'). Never write 'pixel art' — the selected style handles all rendering."New value: +"Describe 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."
    • changedInput schema / properties / remove_bg / description
      Previous value: -"Remove the background for transparent output."New value: +"Remove 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."
    • changedInput schema / properties / width / description
      Previous value: -"Output width in pixels. Each style enforces its own limits; check list_available_styles or get_style_usage."New value: +"Output 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)."
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare non-readonly, non-idempotent, openWorld, non-destructive, so the safety profile is largely covered. The description adds genuine behavioral context beyond that — the response excludes raw base64 payloads, animation failures auto-refund and are worth one identical retry, and reference_images only work where supports_reference_images is true. Auth (rd_api_key) is handled in the schema, not the description, so it is not perfect.

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?

Purpose is front-loaded correctly, but the body is a sprawling multiple-paragraph block and duplicates schema content — the 'N items = N images, never a sheet/grid' rule is repeated verbatim in both the description and the num_images schema text, and pixelate/animation routing is dense. Sizable but not tight.

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 25-parameter generation tool with an output schema and rich annotations, the description covers routing, style selection, reference-image semantics, batching, and failure/refund behavior. Nothing an agent needs to call this correctly is missing.

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 the baseline is 3, but the description adds real disambiguation the schema does not: input_image vs reference_images vs style_reference_images usage, the rule that reference_images guidance re-imagines rather than converts, and that prompt must never contain 'pixel art'. This meaningfully surpasses the structured fields.

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?

States a specific verb+resource ('Generate images using the public /v2/inferences endpoint') and immediately distinguishes scope from siblings by naming the alternatives for animation (start_inference_job + get_inference_job), variant derivation (image_edit), conversion (rd_pro__pixelate), and directional views (rd_advanced_animation__rotate). An agent can route correctly without opening any 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 when-to-use and when-not-to-use rules abound: prefer RD Pro styles for quality, use start_inference_job for animations, derive variants via image_edit rather than regenerating, use rd_pro__pixelate to convert rather than re-imagine. Alternatives are named conditionally, not merely listed.

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.