Skip to main content
POST
/
v1
/
generation
/
image-bg-change
Submit Image Background Change Task
curl --request POST \
  --url https://api.weryai.com/v1/generation/image-bg-change \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "img_url": "https://example.com/image.jpg",
  "prompt": "beach sunset background",
  "webhook_url": "https://your-server.com/webhook"
}
'
{
  "status": 0,
  "desc": "success",
  "message": "success",
  "data": {
    "task_id": "task_abc123",
    "task_status": "waiting"
  }
}

Authorizations

Authorization
string
header
required

Authenticate using Bearer token. Get your API Key from the WeryAI Console.

Example: Authorization: Bearer sk-xxxxxxxxxxxxxxxx

Body

application/json
img_url
string<uri>
required

Source image URL

Example:

"https://example.com/image.jpg"

prompt
string

Background description prompt (either prompt or bg_color must be provided)

Example:

"beach sunset background"

bg_color
string

Background color code (either prompt or bg_color must be provided)

Example:

"#FFFFFF"

webhook_url
string<uri>

Callback URL where results will be sent when task completes

Example:

"https://your-server.com/webhook"

caller_id
integer<int64>

Caller ID (for business association)

Response

Task submitted successfully

status
integer

Business status code (0 indicates success)

Example:

0

desc
string

Status description

Example:

"success"

message
string

Multi-language message

Example:

"success"

data
object