API Reference
POST /remove-bg
Remove image background — MakePhotos API reference.
POST /api/v1/remove-bg
Remove the background from a Cloudinary-hosted image.
Request
curl -X POST "https://makephotos.ai/api/v1/remove-bg?key=mk_live_..." \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://res.cloudinary.com/.../product.jpg"
}'Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
image_url | string | Yes | Cloudinary URL of the input image |
The image must be hosted on Cloudinary (res.cloudinary.com). Upload images first using the upload endpoint.
Response
{
"result_url": "https://res.cloudinary.com/.../e_background_removal/product.jpg",
"credits_used": 10,
"credits_remaining": {
"monthly": 40,
"topup": 10,
"total": 50
}
}| Field | Type | Description |
|---|---|---|
result_url | string | URL with background removal transformation applied |
credits_used | number | Always 10 |
credits_remaining | object | Updated credit balances |
Errors
| Status | Code | Description |
|---|---|---|
| 400 | invalid_params | Missing image_url or not a Cloudinary URL |
| 401 | invalid_api_key | Invalid or missing API key |
| 402 | insufficient_credits | Less than 10 credits available |
| 403 | no_active_subscription | No active subscription |
Credit cost
Background removal costs a flat 10 credits per image, regardless of image size or resolution.