Skip to main content
Outpainting extends an image beyond its borders with new content from a prompt. Use it to change the aspect ratio, add scenery, or zoom out to show more of the scene. The original image stays intact.

$0.04 / $0.08

per image, raster / vector

Image → larger image

up to 10 MB, 16 MP

POST /v1/images/outpaint

endpoint

Try it

Get an API token on your profile page (it needs a positive API units balance) and set it once per terminal session:
Then run. The request widens a public sample illustration to 16:9:

Response

  • data has one entry per image (n). Download each image from its url. With recraftv3_vector, each url points to an SVG file.
  • Image URLs are temporary: files are kept for about 24 hours, so download them. See Limits and sizes.
  • credits is the number of API units charged for the request.

Parameters

Set at least one of size, expand_*, or zoom_out_percentage. size and expand_* can’t be used together. The result must not exceed 4096 px on either side. The input image must be PNG, JPG, WEBP, or SVG, under 10 MB, up to 16 MP, with sides between 256 and 4096 px. See Input images.

Examples

expand_* adds the given number of pixels to each side you name. Here the image grows by 256 px to the left and to the right. Don’t combine it with size.
zoom_out_percentage scales the source image down and generates content around it. It works on its own or together with size or expand_*.

Inpainting

Regenerate part of an image with a mask.

Replace and generate background

Change the background of an image.

Recraft V3

The model line behind outpainting.

Pricing

Prices of every model and tool.