Skip to main content

Image Expander API

spicyapi/image-expander-v1/edit

Image Expander extends a photo to a new aspect ratio and paints matching scenery into the empty space, so it reads as one image. Choose 1:1, 16:9, 9:16, 4:3, 3:4, 3:2 or 2:3; the output is 1536 pixels on its long edge as PNG, JPEG or WebP.

From $0.024/image

Workbench

Input

Image editing
1/1

Drop files or media links, paste, or browse · 1 file · Max 10 MB · JPG · PNG · WEBP

  • 1
1 / 1 files
The photo to expand, as JPEG, PNG or WebP. It is set inside the larger frame and the surroundings are painted in. at least 1 characters
Shape of the finished image. The long edge is always 1536 pixels: 16:9 gives 1536 × 864, 9:16 gives 864 × 1536 and 1:1 gives 1536 × 1536.
Output format
PNGJPEGWebP
PNG by default; JPEG or WebP for smaller files.
Safety checkerOff

SpicyAPI does not run a safety checker on this model. Your prompt and media go to the model as written, and the model itself decides what comes back.

Checking your account before enabling submission and pricing.

Output

Ready for a new run

Your result will appear here.

Configure the inputs, review the estimate, then run the model.

Related models and next tasks

Missing the model you need?

Tell us what to add and where you would use it. Requests go to the people who decide what gets onboarded next.

One photo, every format — grow the frame instead of cropping it

Pick a target shape and the tool keeps your picture, sets it inside a wider or taller frame and paints new scenery into the empty space. Nothing is cut away and nothing is stretched. A landscape becomes a story, a portrait becomes a banner, and a tight crop gets its breathing room back.

Expand a photo
One photo, every format — grow the frame instead of cropping it
Request
image_url and aspect_ratio
Returns
One image, 1536 px on its long edge
Formats
PNG by default, JPEG or WebP on request
Billing
Per output image; the ratio doesn't change it
Seven shapes
1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3Feeds, video covers, stories, banners and print layouts from a single source photo.
No prompt
The new area comes from the photoFloors, sky, walls and light carry on past the old border; there is nothing to describe.
Output size
1536 px on the long edgeAlways. A large photo comes back smaller, so upscale afterwards if you need more pixels.

What Image Expander gets right

  • Continuation, not padding

    No blur bars, no mirrored edges, no flat colour. The scene carries on in the direction the light and the lines were already going.

  • Big changes of shape work

    In our run a waist-up terrace portrait in 16:9 came back as a full-length 9:16 frame, with the rest of the dress, the floor tiles and more sky painted in.

  • One source, a whole set of crops

    Run the same photo once per ratio and you have the square tile, the header and the story without planning any of them at the shoot.

  • Quick enough to batch

    Most of our runs came back in 10 to 15 seconds end to end, and every ratio costs the same per image.

Who uses Image Expander

  • Product shots in every shape

    E-commerce teams

    Product shots in every shape

    Turn a vertical packshot into a 3:2 banner or a square marketplace tile without reshooting and without bars down the sides.

  • Room for the headline

    Designers and marketers

    Room for the headline

    Grow the backdrop around a subject so a title, a logo or a button has clean space on a header, a thumbnail or a slide.

  • Landscape to story, and back

    Social and video creators

    Landscape to story, and back

    Make the 9:16 and 3:4 versions of a horizontal shot for stories and feeds, or widen a vertical portrait into a 16:9 cover.

How to call Image Expander

  1. Pick the ratio for the destination

    16:9 for headers and video covers, 9:16 for stories, 1:1 for feeds and marketplaces, 3:2 or 2:3 for print-style layouts. Smaller changes blend most convincingly.

  2. Start from clean edges

    Whatever touches the border gets continued. Sky, studio paper, plaster and sand extend best; faces, hands or lettering cut by the edge are the least predictable to complete.

  3. Send, poll, download

    image_url and aspect_ratio are the whole request; add output_format for JPEG or WebP. Create the task, poll it, fetch the image.

Real results from our test runs

  • 16:9 terrace portrait to a 9:16 story

    A 1280×720 waist-up shot came back at 864×1536 as a full-length frame: the rest of the dress, the tiled terrace and the sky above were all painted in.

    {
      "image_url": "https://cdn.spicyapi.ai/models/effects/inputs/c01-terrace-woman.webp",
      "aspect_ratio": "9:16"
    }
    Input
    16:9 terrace portrait to a 9:16 story — Input
    Result
    16:9 terrace portrait to a 9:16 story — Result
  • Tight 2:3 portrait to a 16:9 header

    A close vertical portrait came back at 1536×864 with the dark wall continued on both sides — space for a headline without cropping the face.

    {
      "image_url": "https://cdn.spicyapi.ai/models/examples/inputs/953656aeab446b5d.webp",
      "aspect_ratio": "16:9"
    }
    Input
    Tight 2:3 portrait to a 16:9 header — Input
    Result
    Tight 2:3 portrait to a 16:9 header — Result

Image Expander questions

Where it fits

Expanding is the middle of the chain. Clear clutter first with Object Eraser, expand here, then run Image Upscaler if the destination needs more than 1536 pixels. For a completely new background behind a product, cut it out with Background Remover and layer it over an expanded scene.