POST
/
api
/
ai
/
images
/
modify
/
v3
/
replace-background
curl --request POST \
  --url https://api.worqhat.com/api/ai/images/modify/v3/replace-background \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form existing_image=cat.jpg \
  --form 'modification=Change this into a night scenery' \
  --form output_type=url
{
  "image": "https://storage.googleapis.com/sample-image.png",
  "processing_time": 15938.768708,
  "processing_id": "1e01b632-2d8f-4f71-8a27-36e219d67be5"
}

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data
existing_image
file
required

The existing image for which the background should be replaced.

modification
string
required

A textual description of the desired background scene. Either modification or background_image must be provided.

output_type
string
required

Specifies the format of the output image.

background_image
file

The image that will be used as the new background.

Response

200
application/json
Image generated successfully
image
string
required

The generated image URL.

processing_time
number
required

The time taken to process the request in milliseconds.

processing_id
string
required

A universally unique identifier (UUID) for the request.