Outpaint Image
Extend one image past its own borders onto a larger canvas (metered provider call).
The two argument surfaces and every refusal they carry are resolved inside the runner, against the source Moda measured — so the 422s here are the same ones the agent and the connector get, worded once. That includes the model’s output ceiling, which the per-side cap does not imply.
The response carries applied: the effective mode, the requested aspect
ratio, the resolved four-side expansion, the source’s dimensions, the canvas
those expansions add up to, and the dimensions actually delivered.
Authorizations
API key from Settings > Developer > REST API
Headers
Calendar-dated API version pin. New integrations should pin 2026-05-01 to opt into the newest response shapes. For back-compat the server also accepts requests with no header and resolves them to the current default (today: 2026-04-12); that default advances on each sunset date. Any unsupported value returns 400 unsupported_version.
2026-04-12, 2026-05-01 "2026-05-01"
Body
file_ id of an image Moda has measured. This verb's price counts the source AND the rendered canvas together, so an unmeasured http(s) URL is rejected — and a bigger source costs more even for a small expansion.
Target shape, one of 1:1, 21:9, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 5:4, 4:5. The four expansions are computed for you and split evenly on whichever axis is short. Rejected for a ratio the image already has — that would expand nothing while still billing a render. Mutually exclusive with the expand_* values. The expanded canvas must also stay within 4MP (4,194,304 pixels), which the per-side cap does not imply — a request past it is rejected naming the size, never resized down, and a source already at or past it must be downscaled before it can be outpainted at all.
Pixels to add on this side, 0 to 2048. Supply one or more of the four for precise control ('extend the sky upward'); mutually exclusive with aspect_ratio, and supplying both is rejected rather than silently honouring one. An all-zero request is rejected: it would bill a full render for a copy of the input. The expanded canvas must also stay within 4MP (4,194,304 pixels), which the per-side cap does not imply — a request past it is rejected naming the size, never resized down, and a source already at or past it must be downscaled before it can be outpainted at all.
Pixels to add on this side, 0 to 2048. Supply one or more of the four for precise control ('extend the sky upward'); mutually exclusive with aspect_ratio, and supplying both is rejected rather than silently honouring one. An all-zero request is rejected: it would bill a full render for a copy of the input. The expanded canvas must also stay within 4MP (4,194,304 pixels), which the per-side cap does not imply — a request past it is rejected naming the size, never resized down, and a source already at or past it must be downscaled before it can be outpainted at all.
Pixels to add on this side, 0 to 2048. Supply one or more of the four for precise control ('extend the sky upward'); mutually exclusive with aspect_ratio, and supplying both is rejected rather than silently honouring one. An all-zero request is rejected: it would bill a full render for a copy of the input. The expanded canvas must also stay within 4MP (4,194,304 pixels), which the per-side cap does not imply — a request past it is rejected naming the size, never resized down, and a source already at or past it must be downscaled before it can be outpainted at all.
Pixels to add on this side, 0 to 2048. Supply one or more of the four for precise control ('extend the sky upward'); mutually exclusive with aspect_ratio, and supplying both is rejected rather than silently honouring one. An all-zero request is rejected: it would bill a full render for a copy of the input. The expanded canvas must also stay within 4MP (4,194,304 pixels), which the per-side cap does not imply — a request past it is rejected naming the size, never resized down, and a source already at or past it must be downscaled before it can be outpainted at all.
high or fast (default high). fast trades fidelity for speed at the same price.
A retried call with the same key replays the stored response (replayed:true) instead of paying for a second provider render.
200Response
Successful Response
The response is of type Response Mediaoutpaintimage · object.