API Reference

brVideo API

Complete API reference for brVideo video processing endpoints. Upload files, create jobs, track progress, and execute tools programmatically.

Base URL

https://api.ngi.video

Authentication

Most endpoints require authentication via Bearer token. Include the token in the Authorization header:

Authorization: Bearer YOUR_API_TOKEN

Some endpoints (like /health and /upload) are publicly accessible.

Endpoints

GET/health

Health check endpoint to verify API availability

Response

{
  "status": "healthy | degraded",
  "version": "string"
}
POST/upload

Upload a video file for processing

Request

{
  "file": "multipart/form-data"
}

Response

{
  "file_id": "string",
  "url": "string"
}
POST/compress

Create a video compression job

Request

{
  "file_id": "string",
  "quality": "number (0-100)",
  "output_format": "string (optional)"
}

Response

{
  "job_id": "string",
  "status": "queued"
}
POST/upscale

Create a video upscaling job

Request

{
  "file_id": "string",
  "scale": "number (2-4)",
  "model": "string (optional)"
}

Response

{
  "job_id": "string",
  "status": "queued"
}
GET/jobs

List all jobs (requires authentication)

Response

{
  "jobs": "array<Job>",
  "total": "number"
}
GET/jobs/{job_id}

Get status and details for a specific job

Response

{
  "job_id": "string",
  "status": "queued | running | completed | failed",
  "progress": "number (0-100)",
  "output_url": "string (if completed)",
  "error_message": "string (if failed)"
}
GET/tools

List all available CLI tools

Response

{
  "tools": "array<Tool>"
}
GET/tools/{tool_id}/schema

Get argument schema for a specific tool

Response

{
  "tool_id": "string",
  "schema": "object",
  "parameters": "array<Parameter>"
}
POST/tools/{tool_id}/execute

Execute a tool with provided arguments

Request

{
  "arguments": "object"
}

Response

{
  "job_id": "string",
  "status": "queued"
}

Code Examples

Upload a file

curl -X POST https://api.ngi.video/upload \
  -F "file=@video.mp4"

Compress a video

const response = await fetch('https://api.ngi.video/compress', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    file_id: 'file_123',
    quality: 75,
    output_format: 'mp4'
  })
});
const job = await response.json();

Check job status

import requests

response = requests.get(
    'https://api.ngi.video/jobs/job_123',
    headers={'Authorization': 'Bearer YOUR_TOKEN'}
)
job = response.json()
print(f"Status: {job['status']}, Progress: {job['progress']}%")

Status Codes

200 OK

Request successful

400 Bad Request

Invalid request parameters

401 Unauthorized

Authentication required

500 Server Error

Internal server error

Rate Limits

API rate limits are applied per API key to ensure fair usage:

  • Free tier: 100 requests/hour
  • Pro tier: 1,000 requests/hour
  • Enterprise: Custom limits

Rate limit headers are included in all responses: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Need Help?

For API support, feature requests, or to report issues, visit our support page or contact us directly.