Images

Remove unwanted elements from an image using a mask to specify areas to clean

post/v1/image/cleanup

Request

  • Base URL
    https://api.jasper.ai
  • URL
    https://api.jasper.ai/v1/image/cleanup
  • Auth
    • API key in header X-API-Key
    • or OAuth 2
      Authorization code: https://api.jasper.ai/oauth2/authorize
      Token URL: https://api.jasper.ai/oauth2/token scopes: user

Headers

accept'image/webp' | 'image/png' | 'image/jpeg'

The Accept request HTTP header indicates the preferred returned image content type, expressed as a MIME type

Request body multipart/form-data

image_filestring binary required

The image to be cleaned

mask_filestring binary required

The mask indicating areas to clean The mask should be black and white with no grey pixels (e.g. values of only 0 or 255), the value of 0 indicating a pixel to keep as is and 255 a pixel to 'clean up'

Response

The image was successfully cleaned.

Changes

    • breaking

      the request property became required

    • breaking

      the request property became required