Outpaint/expand an image in any direction (awaiting a Kling image resource pack).
Authenticate with the X-API-Key request header.
List price. Volume / bulk customers get a discounted rate — contact us for account pricing.
| Name | Type | Required | Description | Default / options |
|---|---|---|---|---|
| image | string | required | Source image to expand. | — |
| up_expansion_ratio | number | optional | Top expansion ratio (0-2). | default: 0 |
| down_expansion_ratio | number | optional | Bottom expansion ratio (0-2). | default: 0 |
| left_expansion_ratio | number | optional | Left expansion ratio (0-2). | default: 0 |
| right_expansion_ratio | number | optional | Right expansion ratio (0-2). | default: 0 |
| callback_url | string | optional | Webhook URL notified when the task completes. | — |
Submitting a job returns 202 Accepted with a job id. Poll GET /v1/jobs/{id} until the job reaches a terminal state, or register a webhook to be notified.
{
"job_id": "job_klingimageexpand_a1b2c3",
"status": "queued"
}{
"id": "job_klingimageexpand_a1b2c3",
"model": "kling-image-expand",
"status": "succeeded",
"output": {
"outputs": [
{
"url": "https://cdn.trinetra.ai/out/kling-image-expand/a1b2c3.png",
"type": "image"
}
]
},
"credits_charged": 10
}Webhook: set a webhook_url on your API key to receive a POST with the terminal job document instead of polling.