Estimate Cost (Free)
estimate_inference_costEstimate generation cost using the public /v1/inferences endpoint with check_cost=true.
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | 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). | |
| height | Yes | Output height in pixels. Each style enforces its own limits; check list_available_styles or get_style_usage. | |
| prompt | Yes | 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. | |
| strength | No | How strongly to change input_image, 0-1 (default 0.75). Lower values keep more of the original. | |
| num_images | No | 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. | |
| rd_api_key | No | RetroDiffusion API key (rdpk-...) for this call only; overrides session or header auth. | |
| input_image | No | 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). | |
| extra_prompt | No | Secondary prompt for styles that use one (e.g. the transition texture in advanced tilesets). | |
| prompt_style | Yes | Style id from list_available_styles (e.g. 'rd_fast__default', 'rd_pro__isometric', or a custom 'user__...' style). | |
| input_palette | No | Base64 image of a color palette; output colors are constrained to it. | |
| frames_duration | No | 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. | |
| timeout_seconds | No | Read-timeout override in seconds for this call; increase for animations or large batches. | |
| reference_images | No | Extra per-inference guidance images (base64), only for styles where supports_reference_images is true. Not for defining custom styles. | |
| extra_input_image | No | Second base64 input image for styles that use one (e.g. the second texture in rd_tile__tileset_advanced). | |
| return_pre_palette | No | Also return the render from before palette constraints were applied. | |
| return_spritesheet | No | For animation styles: return a PNG sprite sheet instead of a GIF. | |
| return_non_bg_removed | No | Also return the render from before background removal was applied. | |
| upscale_output_factor | No | Integer upscale factor for the output image; 1 returns the native pixel size. | |
| bypass_prompt_expansion | No | Skip the automatic LLM prompt enrichment and use the prompt verbatim. | |
| include_downloadable_data | No | Include extra structured assets when available (e.g. tileset atlas JSON, animation frame data). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||