Skip to main content
POST
mask-generation

Authorizations

Authorization
string
header
required

Set Authorization header to BYTEZ_KEY 'Authorization: YOUR_BYTEZ_KEY_HERE'

Body

application/json

Schema for mask-generation models

url
string
required
Example:

"https://huggingface.co/datasets/huggingfacejs/tasks/resolve/main/mask-generation/mask-generation-input.png"

base64
string
Example:

"data:image/png;base64,...BASE_64_GOES_HERE (Only use this is you are not using a url)"

Response

Successful mask-generation response.

error
string | null
required

Null on success; otherwise an error message.

output
object
required

Successful response with the mask image URL

Example: