Skip to content
Image expand for product photos

AI Expand API

Turn one product photo into every format your channels need, from square listings to wide banners, with the whole product still in frame. AI Expand generates matching background around the photo to fill each new size.
Phone photo of a ceramic table lamp, expanded by AI Expand into a wider 4:3 scene with a window and sideboard
Trusted by leading companies

AI Expand API results by industry

One product photo, expanded into a wider or taller format without cropping, for fashion, resale, home, food delivery and beauty catalogs.
Original portrait photo of light blue sneakers on a brick path, before AI Expand
Photo of light blue sneakers on a brick path expanded to a square by AI Expand, with more path and wall added
Original portrait photo of a camel coat on a door, before AI Expand
Photo of a camel coat on a door expanded to a square by AI Expand, with matching background added
Original portrait photo of a seagrass basket, before AI Expand
Photo of a seagrass basket expanded to a square by AI Expand, with matching background added
Original wide photo of a pepperoni pizza on a pizzeria table, before AI Expand
Wide photo of a pepperoni pizza in a pizzeria expanded to a square by AI Expand, adding the oven and more table
Original portrait photo of a face cream jar, before AI Expand
Photo of a face cream jar expanded to a square by AI Expand, with matching background added

AI Expand plus 20+ edits in one API

From one photo: 1:1 for marketplace listings, 4:5 for feeds, 16:9 for banners and 9:16 for stories and short video ads. Remove backgrounds, add shadows and more with the same API key.

Photoroom MCP

Connect the Photoroom MCP to the LLM where you work an automate your product listing visuals.

Background Removal

The AI background removal API detects complex edges, handles transparency, and delivers clean cutouts at scale - ideal for product catalogs and marketplace listings.

Virtual Model

Place apparel and accessories on AI-generated models that match your brand aesthetic. On-model imagery via the Virtual Model API: no casting, no studio, no production timelines.

Flat Lay

Generate consistent, editorial-quality flat lay product photography at enterprise scale. Maintain visual identity across thousands of SKUs through the Flat Lay API.

Ghost Mannequin

Produce ghost mannequin apparel shots with perfect shape retention through an AI-powered Ghost Mannequin API endpoint. Scale invisible mannequin photography without a studio.

Product Staging

Place your product into realistic lifestyle scenes - held, worn, or displayed - with the natural lighting and composition of a high-end photoshoot.

Edit With AI

Describe any change in plain language and our AI makes it - swap colors, remove or add objects, restage the scene, or shift the camera angle.

Product Beautifier

Enhance low-quality product and food images automatically with the Beautifier API. No retouchers, no studios. Our AI restores detail, corrects color, and improves overall quality at scale.

Add Shadows

Add realistic shadows to the main subject of your image, with complete control over the softness, intensity and position of the shadow.

Generate Backgrounds

Dynamically create new backgrounds with our first-class generative AI, perfectly matching the subject of the original picture.

Relighting

Fix badly lit photos automatically. Our AI rebalances over- and under-exposed images, with modes that keep product colors accurate or optimize for portraits.

Text Removal

Remove watermarks, labels, and real-world signage from your images automatically - choose what goes and what stays.

Expand

Resize any image to any format without cropping. Our AI generates the extra background to match the original, filling every empty pixel seamlessly.

Uncrop

Recover subjects clipped by the frame. Our AI reconstructs the missing parts from the visible portion, automatically.

Ironing

Make every garment look freshly pressed. Our AI smooths creases and wrinkles out of clothing photos automatically - no steamer, no reshoot.

Create Any Image

Generate images from a text description alone - no source photo needed. Describe the scene, pick a format, and get original content back.

Uncertainty Score

Know when a cutout needs a second look. Every response returns a confidence score from 0 to 1, so you can auto-flag ambiguous images for review at scale.

Perspective Correction

Straighten angled shots of flat, rectangular products - cards, books, games - into clean, straight-on views. No generative AI, so hallucinations are impossible by design.

Positioning

Control exactly where the subject sits in the result - scaling, alignment, padding, and margins - so every image in a catalog comes out consistently framed.

Smart Cropping

Reframe images around the subject automatically - prompt it to focus on a specific element, or crop faces out for marketplace compliance.

Upscale

Turn small, low-res images into sharp ones at 4× the size - with a fast mode for volume and a slow mode for maximum quality.

Terracotta mug photo expanded to square, landscape and tall formats, the whole mug in frame in each

Keep the whole product in every format

Cropping a product photo into a new format cuts into the product or the space around it. Photoroom's AI Expand API keeps the whole photo and fills the new frame with matching background, so nothing your shoppers need to see is lost.

Catalog of fashion photos; the first, a 2:3 portrait, expanded to 4:5 with its original edges marked

Resize a whole catalog through one integration

Every product photo in your catalog comes back in each size your marketplaces, ads and social posts need, without a product cropped. With a fixed seed, a reprocessed photo gets a similar-looking background, so updates stay consistent. The same API key also removes backgrounds and adds shadows.

Tall phone photo of a serum bottle next to the same photo expanded to a square, with more shelf and wall

New marketplace and ad sizes without a reshoot

When a marketplace changes its image rules or you add a new ad placement, the photos you already have are enough. Send each one with the output size you want, and AI Expand generates the missing background around it. The AI Expand docs have a code sample to try it.

Results from teams on the Photoroom API

4x

faster market rollouts

89%

lower image processing costs

56%

higher conversion on listings

236%

increase in average order value

Exclusive to Enterprise plans

Expand every format, checked before it ships

Visual QA scores every expanded image and flags the misses before they reach an ad or listing.
Enterprise
Custom models, dedicated capacity, custom endpoints, and SLA-backed uptime. SOC 2 Type 2.
Three images of a woman in a yellow blazer, each with a completion score: 83%, 92%, and 100% labeled as "Best fidelity."
Visual QA
Even the best AI models get it wrong, so Visual QA scores every output for fidelity, catches the misses, and corrects the details before they reach your customers.
Collage of a woman in a white halter dress, a bowl of vibrant poke, and a woman holding a mustard handbag with hoop earrings.
Enterprise Guarantee
Pay only for the outputs that pass. Set your product-fidelity criteria upfront. Every output is checked against your brief by our proprietary fidelity model. Anything that misses is credited back or regenerated for you.
Four fashion items with play icons: a brown handbag, sage green mule, person in a gray shirt and cardigan, and white sneakers with orange accents.
Image to Video API
The Image to Video API turns static product photography into short-form video automatically. Submit a product image and receive a polished video with natural camera motion, animation, or configured effects.
Photoroom API

Fit every product photo to every format

Get your free API key and start building, so a new listing, ad, banner or social format never means cropping your products.

Photo of a vase of pampas grass expanded from portrait to a wide living room scene, the original inset

Frequently asked questions

What is the AI Expand API?

Photoroom's AI Expand API resizes a product photo to a new size or aspect ratio by expanding the background to fill every empty pixel of the result, so the product isn't cropped. It extends product images with generative AI, often called generative expand or outpainting. You set expand.mode to ai.auto and choose the output size.

What's the difference between AI Uncrop and AI Expand?

In the Photoroom API, AI Uncrop rebuilds a product that's cut off at the frame edge. AI Expand keeps the whole product and grows matching background to fill a larger canvas or a new aspect ratio. They're separate parameters, uncrop.mode and expand.mode. See Uncrop API.

How much does the AI Expand API cost?

AI Expand is included in the Plus API plan, at $100 a month ($0.10 an image), and in Enterprise plans with custom pricing: talk to sales. Each call returns one image in one format, so four formats for one product is four calls. You can try it in sandbox mode first. Details are on the pricing page.

How do I call the AI Expand API?

Get your API key, then send your image with expand.mode set to ai.auto and the output size you need. This example expands a photo to 1920 x 1080:

curl --request POST \
  --url https://image-api.photoroom.com/v2/edit \
  --header 'x-api-key: YOUR_API_KEY' \
  --form 'imageFile=@"/path/to/image.jpeg"' \
  --form 'outputSize="1920x1080"' \
  --form 'referenceBox="originalImage"' \
  --form 'removeBackground="false"' \
  --form 'expand.mode="ai.auto"' \
  --output result-ai-expand.png

Set removeBackground to false, or provide a background.imageUrl. Every parameter is in the AI Expand docs.

Can I get the same background each time I reprocess a photo?

Yes. Set expand.seed to any positive integer, and the API will produce similar-looking backgrounds for the same image.

Which file formats and sizes can I send?

Send PNG, JPEG, WEBP or AVIF files up to 30 MB and up to 5,000 px on the widest side. Output is PNG, JPEG, WEBP or AVIF. Full details are in the AI Expand docs.

How do I expand a whole catalog with the Photoroom API?

Run calls in parallel, one image per call, up to 60 images a minute by default. Each format is its own call. For higher limits on high-volume catalogs, talk to sales.

What should I check when choosing an expand API?

Check that you can get similar backgrounds when you reprocess the same photo, that one integration covers your other edits too, and that pricing is published per image. With Photoroom, that's expand.seed, 20+ edits from one API and transparent pricing.

Can I use Photoroom from Claude?

Yes. Photoroom has an MCP server for AI assistants such as Claude: see Photoroom MCP for the tools it covers, including AI Expand.

What should I do if I need help with the API?

Having trouble with the API? Join our API community to get help from our engineers, or check the troubleshooting page for common issues.

For anything billing-related or with sensitive information, please DM Photoroom directly in the community. We're always happy to help.

Enterprise teams can also contact sales.

Start selling at first sight

Get listing-ready product visuals in seconds.