Extend / outpaint an image
extend_imageExtend an image (from a public URL) beyond its original borders, generating new content in the added area to reach a target aspect ratio. This spends credits and starts an asynchronous job — it returns a job_id immediately; poll get_job with that id until status is 'completed' or 'failed'.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"image_url": "<image_url>",
"aspect_ratio": "<aspect_ratio>",
"request_id": "<request_id>"
},
"name": "extend_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | No | Optional guidance for what to generate in the extended area. Omit to let the model continue the scene naturally. | |
| position | No | Where the original image sits inside the new canvas (which sides get extended). Defaults to 'center'. | |
| image_url | Yes | A public HTTP(S) URL pointing directly to a JPG, PNG, WEBP, or GIF image. Local files are not supported. | |
| request_id | Yes | A unique id for this request, supplied by the caller. Retrying the same request_id returns the original job instead of creating and charging for a new one. | |
| aspect_ratio | Yes | Target aspect ratio for the extended canvas. 'original' keeps the source ratio and only pads; the others outpaint to that ratio. |