API reference / Upload a background

Upload a background

Add a replacement photo to an existing image. Use the returned URL in an export.

POST/api/jobs/{id}/background
Authenticate with X-API-Key. Keep your key on your server; never embed it in a public website.

Request parameters

image_filebinary

JPG, PNG or WebP file, up to 22 MB. Choose exactly one input source.

image_urlstring

Public HTTP or HTTPS image URL. Private hosts, credentials, non-standard ports and unsafe redirects are rejected.

Response

200 · Success
{
  "url": "/api/files/image_id/bg_background-id.png"
}

Errors use a structured error.code and error.message. See error handling →

Clearcut support