Blur Region API
Pricing
25 credits per request
Fixed cost regardless of video length or number of blur regions.
Overview
The Blur Region API allows you to blur specific regions in a video. This is useful for privacy protection, content moderation, or creative effects. You can specify multiple regions to blur with custom blur intensity.
Endpoint
- URL:
POST https://api.revidapi.com/paid/blur-region - Method:
POST
Request
Headers
x-api-key: Required. Your API key for authentication.Content-Type: Required. Must beapplication/json.
Body Parameters
Required Parameters
| Parameter | Type | Description |
|---|---|---|
video_url |
string (URI) | URL of the video file to process |
regions |
array | Array of region objects to blur |
Region Object
| Parameter | Type | Description |
|---|---|---|
x |
integer | X coordinate of the top-left corner of the region |
y |
integer | Y coordinate of the top-left corner of the region |
width |
integer | Width of the blur region in pixels |
height |
integer | Height of the blur region in pixels |
start_time |
string | Start time in format HH:MM:SS.ms or seconds |
end_time |
string | End time in format HH:MM:SS.ms or seconds |
blur_intensity |
integer | Blur intensity (0-100). Default: 50 |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
webhook_url |
string (URI) | URL to receive the result when processing is complete |
id |
string | Custom identifier for tracking the request |
Example Request
{
"video_url": "https://example.com/video.mp4",
"regions": [
{
"x": 100,
"y": 100,
"width": 200,
"height": 200,
"start_time": "00:00:05.000",
"end_time": "00:00:15.000",
"blur_intensity": 50
},
{
"x": 500,
"y": 300,
"width": 150,
"height": 150,
"start_time": "00:00:10.000",
"end_time": "00:00:20.000",
"blur_intensity": 75
}
],
"webhook_url": "https://example.com/webhook",
"id": "blur-request-123"
}
curl -X POST "https://api.revidapi.com/paid/blur-region" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"video_url": "https://example.com/video.mp4",
"regions": [
{
"x": 100,
"y": 100,
"width": 200,
"height": 200,
"start_time": "00:00:05.000",
"end_time": "00:00:15.000",
"blur_intensity": 50
}
],
"webhook_url": "https://example.com/webhook",
"id": "blur-request-123"
}'
Response
Immediate Response (202 Accepted)
When a webhook URL is provided, the API returns an immediate acknowledgment with a task_id:
{
"code": 202,
"id": "blur-request-123",
"task_id": "550e8400-e29b-41d4-a716-446655440000",
"message": "processing"
}
Success Response (via Webhook or Direct)
{
"code": 200,
"id": "blur-request-123",
"task_id": "550e8400-e29b-41d4-a716-446655440000",
"response": {
"video_url": "https://storage.example.com/video/blurred-output.mp4"
},
"message": "success"
}
Error Responses
Invalid Request (400)
{
"code": 400,
"id": "blur-request-123",
"message": "Invalid request: 'video_url' is a required property"
}
Authentication Error (401)
{
"code": 401,
"message": "Invalid API key"
}
Workflow Recommendation
For asynchronous processing:
- Create Task: Send POST request to create the task
- Wait: Add a wait node (30-45 seconds) to allow server processing time
- Check Status: Use GET endpoint to check task status:
GET https://api.revidapi.com/paid/get/job/status/{task_id} - Retrieve Result: Once status is "completed", retrieve the video URL from the response
Usage Notes
- Fixed Pricing: This endpoint charges a fixed 25 credits per request, regardless of video length or number of regions.
- Region Coordinates: Coordinates are in pixels (0,0 is top-left corner of the video).
- Time Format: Times can be specified in
HH:MM:SS.msformat or as seconds (e.g.,5.5for 5.5 seconds). - Multiple Regions: You can blur multiple regions in a single request.
- Blur Intensity: Higher values (0-100) create stronger blur effects.
Common Issues
- Invalid Coordinates: Ensure coordinates are within video dimensions
- Time Overlap: Regions with overlapping times are processed correctly
- Video Format: Ensure video_url is accessible and in a supported format
Best Practices
- Use Webhooks: Always use webhooks for better reliability
- Unique IDs: Provide unique
idvalues for tracking - Coordinate Precision: Use precise coordinates for accurate blur placement
- Blur Intensity: Test different blur intensities to achieve desired effect
- Region Planning: Plan regions carefully to avoid unnecessary processing