API v2 · Image
Image Portrait Enhance
Enhance portrait images with face enhancement and depth effect options.
POST
/api/v2/images/portrait-enhanceAuthentication
Send your API key as a bearer token on every request.
Header
Authorization: Bearer vba_your_api_keyRequest Body
Send JSON with these fields. Required fields must be present unless marked optional.
| Field | Type | Required | Description |
|---|---|---|---|
| image_url | string URL | Yes | Public or BGBlur-uploaded image URL to process. |
| blur_strength | number | No | Blur amount from 0 to 1. Default is 0.7. |
| enhance_face | boolean | No | Enable face enhancement. Default true. |
| depth_effect | boolean | No | Enable portrait depth effect. Default true. |
⚠
Media must be publicly accessible. Pass a direct URL from a public storage bucket — e.g. AWS S3, Google Cloud Storage, Cloudinary, Cloudflare R2, Backblaze B2, Uploadcare, or any CDN URL. Private, signed, or localhost URLs will fail. Supported formats: PNG, JPG, JPEG, WEBP, HEIC.
JSON
{
"image_url": "https://example.com/headshot.jpg",
"blur_strength": 0.7,
"enhance_face": true,
"depth_effect": true
}Response
Successful responses use JSON. Video feature endpoints return an async job_id rather than the final processed video immediately.
| Field | Type | Required | Description |
|---|---|---|---|
| success | boolean | Yes | True when processing succeeded. |
| result_url | string URL | Yes | Processed image URL. |
| credits_used | number | Yes | Credits charged for this request. |
| remaining_credits | number | Yes | Credit balance after processing. |
JSON
{
"success": true,
"result_url": "https://cdn.bgblur.com/results/image.png",
"credits_used": 1,
"remaining_credits": 499
}Example
curl
curl -X POST https://www.bgblur.com/api/v2/images/portrait-enhance \
-H "Authorization: Bearer vba_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/headshot.jpg",
"blur_strength": 0.7,
"enhance_face": true,
"depth_effect": true
}'Tips
- Use the upload image endpoint for local files instead of sending binary data to processing endpoints.
- Start with blur_strength 0.7, then lower it for subtle blur or raise it for stronger privacy.