Premium API Reference

Complete API documentation for the A2VG Premium server-side rendering service.

Overview

The A2VG Premium API provides server-side video rendering capabilities for premium subscribers. This REST API allows you to programmatically generate videos from your WordPress content with professional-grade quality and faster processing times.

Premium Features

  • ? Server-side rendering for faster processing
  • ? Higher quality video output
  • ? No browser limitations
  • ? Batch processing capabilities
  • ? Priority support

Note: This API requires an active Premium subscription. Free users can use the browser-based rendering within the WordPress plugin.

Authentication

All API requests require authentication using an API key. Your API key is provided when you subscribe to the Premium service and can be found in your account dashboard.

API Key Authentication

Include your API key in the Authorization header of all requests:

Authorization: Bearer YOUR_API_KEY

Example Request

curl -X POST https://api.a2vg.com/v1/render \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "123",
    "scenes": [...],
    "settings": {...}
  }'

Base URL

https://api.a2vg.com/v1

All API endpoints are relative to this base URL. Make sure to use HTTPS for all requests.

API Endpoints

POST /renderPremium

Render a video from project data using server-side processing. Returns a job ID that can be used to check rendering status.

Request Body:

{
  "project_id": string,
  "scenes": [
    {
      "id": string,
      "type": "heading" | "paragraph" | "image",
      "content": string,
      "duration": number,
      "settings": object
    }
  ],
  "settings": {
    "width": number,
    "height": number,
    "fps": number,
    "format": "mp4" | "webm",
    "quality": "low" | "medium" | "high",
    "branding": {
      "logo": string,
      "fonts": object,
      "colors": object
    }
  }
}

Response:

{
  "success": true,
  "data": {
    "job_id": "abc123xyz",
    "status": "queued",
    "estimated_time": 120
  }
}

Example:

fetch('https://api.a2vg.com/v1/render', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    project_id: '123',
    scenes: [...],
    settings: {...}
  })
})
.then(response => response.json())
.then(data => console.log('Job ID:', data.data.job_id));
GET /status/{job_id}Premium

Check the status of a video rendering job. Returns current status and download URL when complete.

Response:

{
  "success": true,
  "data": {
    "job_id": "abc123xyz",
    "status": "completed" | "processing" | "failed" | "queued",
    "progress": 100,
    "video_url": "https://cdn.a2vg.com/videos/abc123xyz.mp4",
    "created_at": "2024-01-15T10:30:00Z",
    "completed_at": "2024-01-15T10:32:00Z"
  }
}

Example:

fetch('https://api.a2vg.com/v1/status/abc123xyz', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
})
.then(response => response.json())
.then(data => {
  if (data.data.status === 'completed') {
    console.log('Video ready:', data.data.video_url);
  }
});
GET /jobsPremium

Retrieve a list of your recent rendering jobs with optional filtering and pagination.

Query Parameters:

?status=completed
&limit=20
&offset=0
&sort=created_at

Response:

{
  "success": true,
  "data": {
    "jobs": [
      {
        "job_id": "abc123xyz",
        "status": "completed",
        "created_at": "2024-01-15T10:30:00Z",
        "video_url": "https://cdn.a2vg.com/videos/abc123xyz.mp4"
      }
    ],
    "total": 50,
    "limit": 20,
    "offset": 0
  }
}
DELETE /jobs/{job_id}Premium

Cancel a queued or processing job. Completed or failed jobs cannot be cancelled.

Response:

{
  "success": true,
  "message": "Job cancelled successfully"
}

Rate Limits

API rate limits are based on your Premium subscription tier:

Starter Plan

  • ? 100 requests/hour
  • ? 1,000 requests/day
  • ? Concurrent jobs: 2

Professional Plan

  • ? 500 requests/hour
  • ? 10,000 requests/day
  • ? Concurrent jobs: 5

Rate Limit Headers: Rate limit information is included in response headers:X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200

Error Handling

The API uses standard HTTP status codes and returns errors in a consistent format:

Error Response Format

{
  "success": false,
  "error": {
    "code": "RENDER_FAILED",
    "message": "Video rendering failed due to invalid settings",
    "details": {}
  }
}

Common Status Codes

  • 400: Bad Request - Invalid parameters
  • 401: Unauthorized - Invalid or missing API key
  • 403: Forbidden - Insufficient permissions
  • 429: Too Many Requests - Rate limit exceeded
  • 500: Internal Server Error - Server-side error

Webhooks

Configure webhooks to receive notifications when video rendering jobs complete or fail. Webhooks are configured in your account dashboard.

Webhook Payload

{
  "event": "render.completed" | "render.failed",
  "job_id": "abc123xyz",
  "timestamp": "2024-01-15T10:32:00Z",
  "data": {
    "video_url": "https://cdn.a2vg.com/videos/abc123xyz.mp4",
    "status": "completed"
  }
}

Need Help?

Have questions about the API or need assistance integrating? We're here to help.