The return value is a base64 encoded string, without the data:image/png;base64, prefix. Like the Generate interface, image can be a base64 encoded string or a URL of an image.
In the example above, all the parameters that the Generate mask interface can accept are listed. In practice, you only need to pass the ones you see on the interface, with image being the only required field.
Most of these parameters correspond to the sam model and have default values, so you don't need to pass all of them. Only pass the ones you need.
Inpaint
Pass an image and a mask, with or without prompt to the generate endpoint to get a new image.
This example shows the above image and the generated mask. However, please note that the redrawing area will strictly adhere to the parts in the mask. For instance, with the code above, the result is: