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 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 be application/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:

  1. Create Task: Send POST request to create the task
  2. Wait: Add a wait node (30-45 seconds) to allow server processing time
  3. Check Status: Use GET endpoint to check task status: GET https://api.revidapi.com/paid/get/job/status/{task_id}
  4. Retrieve Result: Once status is "completed", retrieve the video URL from the response

Usage Notes

  1. Fixed Pricing: This endpoint charges a fixed 25 credits per request, regardless of video length or number of regions.
  2. Region Coordinates: Coordinates are in pixels (0,0 is top-left corner of the video).
  3. Time Format: Times can be specified in HH:MM:SS.ms format or as seconds (e.g., 5.5 for 5.5 seconds).
  4. Multiple Regions: You can blur multiple regions in a single request.
  5. Blur Intensity: Higher values (0-100) create stronger blur effects.

Common Issues

  1. Invalid Coordinates: Ensure coordinates are within video dimensions
  2. Time Overlap: Regions with overlapping times are processed correctly
  3. Video Format: Ensure video_url is accessible and in a supported format

Best Practices

  1. Use Webhooks: Always use webhooks for better reliability
  2. Unique IDs: Provide unique id values for tracking
  3. Coordinate Precision: Use precise coordinates for accurate blur placement
  4. Blur Intensity: Test different blur intensities to achieve desired effect
  5. Region Planning: Plan regions carefully to avoid unnecessary processing