Skip to main content
Replace the background with a color gradient.
https://fapihub.com/v2/rembg/gradient/

Request

Headers

ApiKey
string
required
Your API token.

Body

image
file
required
The image file to process. Send as multipart form data.
top_color
string
required
Top color in RGB format.
bottom_color
string
required
Bottom color in RGB format.

Code Samples

curl -X POST "https://fapihub.com/v2/rembg/gradient/" \
  -H "ApiKey: API_TOKEN" \
  -F "image=@image.jpg" \
  -F "top_color=(255, 140, 0, 255)" \
  -F "bottom_color=(229, 46, 113, 255)"

Responses

Binary image data (the processed image with background removed)