Endpoint
Headers
| Header | Type | Required | Description |
|---|---|---|---|
x-api-key | string | Yes | Your API key |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
jobId | string | Yes | ID of the original image generation task |
imageNo | integer | Yes | Image number to extend (0/1/2/3) |
direction | integer | Yes | Extension direction (0-3) |
scale | float | Yes | Extension scale ratio (1.1-3.0) |
remixPrompt | string | No | Text prompt for the extended area (1-8192 characters) |
callback | string | No | Callback URL for task completion notifications |
Direction Values
| Value | Direction |
|---|---|
| 0 | Down |
| 1 | Right |
| 2 | Up |
| 3 | Left |
Scale Parameter
Thescale parameter defines the ratio of the new image area to the original in the extension direction:
- Range: 1.1 to 3.0
- Example: For a 1:1 aspect ratio image extending right by 13%:
scale = 1.13means the final image will be 13% wider in the specified direction
Example Requests
Extend Right
Response
Returns a task object containing the task information.Technical Notes
- Extends in only one specified direction (unlike outpaint which extends in all directions)
- Scale parameter determines extension ratio (1.1-3.0)
- AI maintains visual continuity with the original image
- Use descriptive prompts to guide the content of the extended area
Authorizations
API key for authentication
Body
application/json
ID of the original image generation task
Image number to extend (0, 1, 2, or 3)
Required range:
0 <= x <= 3Example:
0
Extension direction (0=Down, 1=Right, 2=Up, 3=Left)
Required range:
0 <= x <= 3Example:
1
Extension scale ratio (1.1-3.0)
Required range:
1.1 <= x <= 3Example:
1.5
Text prompt for the extended area
Required string length:
1 - 8192Callback URL for task completion notifications
Response
200
Pan task created successfully