Remove Background API
Documentation on our Remove Background API!
API Spec
Using unified Create and Fetch API in Image Editing API.
Request task_input
{
"task_input": {
"image": "https://example.com/input.jpg"
}
}
Response task_output
{
"task_output": {
"image_url": "https://img.midjourneyapi.xyz/temp/ac35cf98-4d90-4727-a111-97b84615626b.png",
"image_base64": ""
}
}
Request Example
curl --location 'https://api.goapi.ai/api/image_toolkit/v2/create' \
--header 'X-API-KEY: {YOUR_API_KEY}' \
--header 'Content-Type: application/json' \
--data '{
"task_type": "background_remove",
"result_type": "url",
"task_input": {
"image": "https://example.com/input.jpg"
}
}'
Response Example
{
"code": 200,
"data": {
"task_id": "a0dd9bf5-067a-4968-b86c-26d23fe8772f",
"task_type": "background_remove",
"status": "success",
"task_info": {
"created_at": "2024-03-19T01:38:46.064186Z",
"started_at": "2024-03-19T01:40:21.169627Z",
"completed_at": "2024-03-19T01:40:27.72726Z",
"frozen_credits": 0,
"task_input": {
"image": "https://example.com/input.jpg"
}
},
"task_result": {
"used_credits": 0,
"error_messages": [],
"task_output": {
"image_url": "https://img.midjourneyapi.xyz/temp/ac35cf98-4d90-4727-a111-97b84615626b.png",
"image_base64": ""
}
}
},
"message": "success"
}