About Image Expander
Image Expander widens a photo to a new shape by painting matching scenery around it, instead of cropping or stretching. Turn a vertical shot into a 16:9 header or a square tile with room for text.
Call it with the model name popnow/image-expander-v1/edit on POST /jobs/createTask, from $0.024.
Introduction
Image Expander grows a photo outward to a new shape. Pick a target aspect ratio and the tool keeps your picture, sets it inside a wider or taller frame and paints new scenery into the empty space, so the result reads as one continuous image. It is the opposite of cropping: nothing in the original is cut away, and nothing is stretched to fill the frame.
Key features
Seven target shapes
The finished image can be square, landscape or portrait: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2 or 2:3. That covers feed posts, video covers, stories, banners and print-style layouts from one source photo, without planning every crop at the shoot.
Continuation instead of padding
The new area is painted to carry on what is already there. Floors, skies, walls, foliage and the direction of the light continue past the old border, instead of the frame being padded with blur, mirrored edges or a flat colour.
No prompt to write
The extension is inferred from the picture itself. One image and one ratio are the whole request, which makes it simple to turn a folder of vertical shots into landscape banners in a single batch.
Request parameters
| Parameter | Required | Description |
|---|---|---|
aspect_ratio | No | The shape of the frame: wide, square or tall. 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · Default: 1:1 |
image_url | Yes | The picture to start from. |
output_format | No | File type of the result. png · jpeg · webp · Default: png |
Pricing
Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
| Option | USD per image |
|---|---|
| Standard | $0.024 |
Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.
Use cases
One shoot, every format
Turn a vertical product or portrait shot into a 16:9 website header and a 1:1 marketplace tile without reshooting, and without leaving awkward bars down the sides of the frame.
Room for text and layout
Add sky or backdrop around a subject so there is clean space for a headline, a logo or a call to action on a banner, a thumbnail or a presentation slide.
Fixing tight crops
Give breathing room back to photos framed too tightly: a cropped elbow, a chair cut off by the edge, a horizon pressed against the border.
Prompt guide & pro tips
Pick the ratio for the destination
Decide where the image will be used before expanding: 16:9 for video covers and headers, 9:16 for stories and reels, 1:1 for feeds and marketplaces, 3:2 or 2:3 for print-style layouts.
Mind the output size
The expanded image is 1536 pixels on its long edge. A large original therefore comes back smaller than it went in; if the destination needs more pixels, upscale the result afterwards instead of starting from a lower-quality source.
Start from clean edges
The tool continues whatever touches the border of the photo. Simple backgrounds such as sky, studio paper, plaster walls or sand extend most convincingly. When a face, a hand or lettering is cut by the edge, the tool has to invent the missing part, and that is where results are least predictable, so choose a source with more margin around such details.
API quick start
Call the Image Expander API in three steps
- Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls are billed in USD from your PopNow balance.
- Send the request. POST /jobs/createTask with model popnow/image-expander-v1/edit and an input object that follows the parameter table. The response returns a task ID straight away.
- Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"model": "popnow/image-expander-v1/edit",
"input": {
"image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
"aspect_ratio": "1:1",
"output_format": "png"
}
}'
# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $POPNOW_API_KEY"Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.
Examples
Image Expander API questions
How much does the Image Expander API cost?
Image Expander costs $0.024 per image. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
What is the model name for Image Expander in the API?
Put popnow/image-expander-v1/edit for Expand Image in the model field of POST /jobs/createTask.
Can I say what should appear in the new area?
No. There is no prompt field; the extension continues what is already in the photo.
How big is the result?
The long edge is always 1536 pixels and the short edge follows the ratio you pick: 1536 × 864 for 16:9, 864 × 1536 for 9:16, 1536 × 1536 for 1:1.
Which ratio should I pick?
The one your destination uses: 16:9 for video covers and headers, 9:16 for stories and reels, 1:1 for feeds and marketplace tiles, 3:2 or 2:3 for print-style layouts.
What are the limits of the Image Expander API?
Aspect ratios: 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3. Requests outside these limits are rejected before anything is charged.
Can I try Image Expander without writing code?
Run Image Expander in the Playground without an API key, using the same PopNow balance as the website, shown in USD. Each run appears in your developer history with its matching code.

