Replace Background using Prompt
Introduction
Welcome to the documentation for our Background Replacer API! Our API is a powerful tool for replacing backgrounds from images, making it easy to isolate the main subject of an image, improve the overall visual quality of your images, and replacing the background based on the given prompt. With our API, you can automate the process of replacing backgrounds by first removing the background and by adding prompt add the background, saving you time and effort.
Getting started
To use the APIs, user has to create the API Key, go to this page API Key (opens in a new tab) page to retrieve the API key you'll use in your requests. After using the Background Replacer API user will get 4 most appropriate output results.
Note: BMP and TIFF formats are currently not supported for images, and the output will be in WebP format.
Usage
curl --location 'https://prodapi.phot.ai/external/api/v2/user_activity/background-generator' \
--header 'x-api-key: Paste your generated api-key here' \
--header 'Content-Type: application/json' \
--data '{
"file_name": "YourInputFileName.jpg", // Replace with the actual input file name as a string
"input_image_link": "https://example.com/your-image.jpg", // Replace with the URL of your input image
"prompt": "YourInputPrompt" // Replace with your specific input prompt
}'
Once you get order_id from response after hitting above request, make a subsequent API call with the order_id in Query Params and the generated API Key in header.
curl --location 'https://prodapi.phot.ai/external/api/v1/user_activity/order-status?order_id=Paste your order_id here'