fb-pixel
Kaze AI Logo

API Token

Create a new token

Image Expand

Asynchronous Method

POST https://backend.kaze.ai/api/ext/v1/submit_expansion

Header parameters:

  • Authorization: Bearer <>
  • Content-Type: application/json

Request Body (using URL):

Using Image URL

  • image_url: https://example.com/image.png
  • paste_position: [topPadding, leftPadding, bottomPadding, rightPadding] (Unit: pixels)
curl --location --request POST 'https://backend.kaze.ai/api/ext/v1/submit_expansion' \
  --header 'Authorization: Bearer ' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "image_url": "https://example.com/image.png",
    "paste_position": [100, 100, 100, 100]
  }'

Request Body (using raw content):

Using Base64 (without data:image/png;base64, header):

  • image_base64: xxxxxxxxxxxxxxx
curl --location --request POST 'https://backend.kaze.ai/api/ext/v1/submit_expansion' \
  --header 'Authorization: Bearer ' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "image_base64": "xxxxxxxxxxxxxxx",
    "paste_position": [100, 100, 100, 100]
  }'

Response (on success):

After a successful submission, a task_id will be given and can be used with the result query API to retrieve the final result.

{
  "code": 0,
  "message": "success",
  "data": {
    "task_id": "xxxxxxxx"
  }
}

Task Result Query

Use this method to get watermark removal task results by using task_id

POST https://backend.kaze.ai/api/ext/v1/get_task_result

Header parameters:

  • Authorization: Bearer <>
  • Content-Type: application/json

Request Body:

  • task_id: " aaabbbccc "
curl --location --request POST 'https://backend.kaze.ai/api/ext/v1/get_task_result' \
  --header 'Authorization: Bearer ' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "task_id": "aaabbbccc"
  }'

Response Status:

The response includes data.status, which may be:

  • processing: In progress, check again later.
  • success: Completed, result is in images.
  • failed: Failed, check err_msg.
  • timeout: Timed out, same as failed.
{
  "message": "success",
  "data": {
    "status": "processing/success/failed/timeout",
    "images": [
      {
        "url": "https://example.com/image.png"
      }
    ]
  }
}

Status Codes

CODEDESCRIPTION
0Success
1000Parameter Error
1001Invalid HTTP Method
1002Authentication error
1003Insufficient Credits to Perform the Action
11xxServer Internal Error
рдлреНрд░реА рдПрдЖрдИ рдЗрдореЗрдЬ рдПрдбрд┐рдЯрд░: рдмреЙрдбреА рдПрдбрд┐рдЯрд░, рд╡реЙрдЯрд░рдорд╛рд░реНрдХ рд░рд┐рдореВрд╡рд░ рдФрд░ рдЪреИрдЯ рд╕рдВрдкрд╛рджрд┐рдд рдХрд░реЗрдВ