Skip to navigation

Media · Image · Outpaint / extend image beyond borders

View as Markdown

Extend an image BEYOND its original borders (uncrop), generating new surrounding content from prompt. Requires mask_url marking the new area. Different from generativeFill (fills a region inside the image) and magicInpaint (edits existing content). Async — returns a task_id (auto-polled).

Authentication

AuthorizationApi-Key

Header authentication of the form Api-Key <token>

OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
image_urlstringRequired
URL of the source image.
mask_urlstringRequired
URL of the mask defining the region to extend into.
promptstringRequired
Text description of what to generate in the extended area.
negative_promptstringOptional
What to avoid in the generated content.
guidance_scaledoubleOptionalDefaults to 7.5

How closely to follow the prompt (higher = more literal).

countintegerOptionalDefaults to 4
Number of variations to generate.

Response

Async task queued.
task_idstringOptional

Poll GET /api/v1/tasks/{task_id} until SUCCESS or FAILURE.