Skip to content

Blur Region API

Pricing

25 credits per request

Fixed cost regardless of video length or number of blur regions.

Overview

The Blur Region API blurs specified regions in a video. Typically used to remove old captions after detection.

Domain: api.revidapi.com


Endpoint

POST https://revidapi.com/v1/blur-region

Authentication: Required - Header x-api-key


Request

Headers

  • x-api-key: Required. Your API key for authentication.
  • Content-Type: Required. Must be application/json.

Body Parameters

Required Parameters

Parameter Type Description
video_url string Video URL to blur (http/https)
blur_regions array List of regions to blur [{x, y, w, h}, ...]

Optional Parameters

Parameter Type Default Description
blur_strength integer 30 Blur intensity (5-50)
expand_pixels integer 10 Expand blur region (pixels)
video_size object - {width, height} video dimensions (from detect result)
webhook_url string - URL to receive result
id string - Custom identifier

blur_regions Format

[{"x": 45, "y": 657, "w": 486, "h": 62}]

Get from: result.caption_area or result.lower_half.caption_area of detect-caption. You can multiply w, h (e.g. 1.3, 1.2) to expand the blur region.

blur_strength Guide

Value Result When to use
10-20 Light blur Thin text, simple background
30 Medium blur ⭐ Default, suitable for most
40-50 Strong blur Thick text, complex background

expand_pixels Guide

Value Result When to use
0 No expansion Detection region is accurate
10 Light expansion ⭐ Default, safe
20-30 Heavy expansion Detection region may be offset

Response

Immediate Response (Task Created)

{
  "task_id": "e0733bdd-aabe-4720-a81b-85af6bfe55d9",
  "status": "pending",
  "message": "Blur task created",
  "type": "blur"
}

Task Status (GET /paid/get/job/status/{task_id})

✅ Completed

{
  "task_id": "e0733bdd-aabe-4720-a81b-85af6bfe55d9",
  "type": "blur",
  "status": "completed",
  "progress": 100,
  "message": "Blur applied successfully",
  "result": {
    "video_url": "/output/blurred_xxx.mp4",
    "blur_area": {"x": 35, "y": 647, "w": 506, "h": 82}
  },
  "created_at": "2025-12-22T11:39:51.694796"
}

⏳ Processing / ❌ Failed

Same structure as other task endpoints.


Response Fields

result.video_url

Relative path. Full URL: https://edit.revidapi.com{{ result.video_url }}

result.blur_area

Blurred region (after expansion): x, y, w, h


Example (Working Payload)

{
  "video_url": "https://edit.revidapi.com/output/video_xxx.mp4",
  "blur_regions": [{"x": 45, "y": 657, "w": 486, "h": 62}],
  "blur_strength": 50,
  "expand_pixels": 10,
  "video_size": {"width": 576, "height": 1024}
}

Usage Notes

  1. POST returns immediately with task_id (does not wait for processing)
  2. GET task status to retrieve results (poll in loop)
  3. video_url is relative path - prepend domain to download
  4. blur_regions can contain multiple regions - will be combined
  5. Original audio is preserved (copy stream)

Workflow

POST /paid/detect-caption
    ↓
Get caption_area
    ↓
POST /paid/blur-region (use caption_area)
    ↓
GET /paid/get/job/status/{task_id} (loop)
    ↓
Download blurred video

Tips

  1. If blur is not enough: Increase blur_strength to 40-50
  2. If blur is too wide: Decrease expand_pixels to 5
  3. If blur position is offset: Check caption_area from detect

Common Issues

  1. Invalid region coordinates: Ensure coordinates are within video dimensions
  2. Blur not visible: Increase blur_strength or check if region is correct
  3. Multiple regions: All regions in blur_regions array will be blurred

Best Practices

  1. Use webhooks: Always use webhooks for better reliability
  2. Unique IDs: Provide unique id values for tracking
  3. Region accuracy: Use caption_area from detect-caption for accurate positioning
  4. Expand pixels: Use default expand_pixels: 10 to ensure complete blur coverage