VIDEO API

convert

Convert a video file from one format to another. Supported formats: mp4, avi, mkv, mov, wmv, flv, webm, mpeg, mpg, 3gp, ogv, ts
Credits Required: 10.0/MB
File size is rounded up to the nearest MB — minimum billable size is 1 MB

PARAMETERS

NAME TYPE REQUIRED DESCRIPTION ADDITIONAL CREDITS PER ITEM EXAMPLE
video string Yes Base64 encoded video data (max 100MB) None
base64_encoded_video_string_here
output_format string Yes Target video format (e.g. mp4, avi, mkv, mov, webm) None
mp4

RESPONSE EXAMPLE

{
    "status": "success",
    "message": "Video converted successfully",
    "data":
    {
        "video": "base64_encoded_result_video"
    }
}

CODE EXAMPLES

<?php

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest($endpoint, $PostFields)
{
    $token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    $base_url = 'https://apicentral.dev';

    $Curl = curl_init();

    curl_setopt_array(
        $Curl,
        [
            CURLOPT_URL => $base_url . '/' . $endpoint,
            CURLOPT_POST => true,
            CURLOPT_POSTFIELDS => http_build_query($PostFields),
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_TIMEOUT => 30,
            CURLOPT_HTTPHEADER =>
            [
                'Authorization: Bearer ' . $token,
                'Content-Type: application/x-www-form-urlencoded'
            ]
        ]
    );

    $Response = curl_exec($Curl);
    $Data = json_decode($Response, true);

    if (curl_errno($Curl))
        return ['error' => curl_error($Curl)];

    curl_close($Curl); // Omit in PHP 8 and above

    return $Data;
}

// ================================================================
// API-specific usage
// ================================================================
$endpoint = 'Video/convert';
$PostFields = 
[
  'video' => 'base64_encoded_video_string_here',
  'output_format' => 'mp4',
];

$Data = processAPIRequest($endpoint, $PostFields);

$status = $Data['status'];
$message = $Data['message'];
$data = $Data['data'] ?? null;
?>

import requests
import json

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, Data):
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'
    Headers = {'Authorization': 'Bearer ' + token}

    try:
        Response = requests.post(base_url + '/' + endpoint, json=Data, headers=Headers)
        return Response.json()
    except Exception as e:
        return {'error': str(e)}

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/convert'
Data = 
{
  "video": "base64_encoded_video_string_here",
  "output_format": "mp4"
}

ResData = process_api_request(endpoint, Data)

status = ResData.get('status')
message = ResData.get('message')
data = ResData.get('data')

const axios = require('axios');

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest(endpoint, Data)
{
    const token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    const base_url = 'https://apicentral.dev';

    return axios.post(
        base_url + '/' + endpoint,
        Data,
        {
            headers: {'Authorization': 'Bearer ' + token}
        }
    );
}

// ================================================================
// API-specific usage
// ================================================================
const Data = 
{
  "video": "base64_encoded_video_string_here",
  "output_format": "mp4"
};

processAPIRequest('Video/convert', Data)
.then(Response =>
{
    const status = Response.data.status;
    const message = Response.data.message;
    const data = Response.data.data;
})
.catch(Error => { const error = Error.message; });

import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import java.time.Duration;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static JsonObject processAPIRequest(String endpoint, String jsonPayload) throws Exception
    {
        String token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        String base_url = "https://apicentral.dev";

        HttpClient Client = HttpClient.newBuilder()
            .connectTimeout(Duration.ofSeconds(30))
            .build();

        HttpRequest Request = HttpRequest.newBuilder()
            .uri(URI.create(base_url + "/" + endpoint))
            .header("Authorization", "Bearer " + token)
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
            .build();

        HttpResponse<String> Response = Client.send(Request, HttpResponse.BodyHandlers.ofString());

        return JsonParser.parseString(Response.body()).getAsJsonObject();
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static void main(String[] args)
    {
        String endpoint = "Video/convert";
        String JsonPayload = """
        
        {
          "video": "base64_encoded_video_string_here",
          "output_format": "mp4"
        }
        """;

        try
        {
            JsonObject ResData = processAPIRequest(endpoint, JsonPayload);
            String status = ResData.get("status").getAsString();
            String message = ResData.get("message").getAsString();
            Object data = ResData.has("data") ? ResData.get("data") : null;
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}

using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static async Task<dynamic> ProcessAPIRequest(string endpoint, string jsonPayload)
    {
        string token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        string base_url = "https://apicentral.dev";

        using var Client = new HttpClient();
        Client.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);

        var content = new StringContent(jsonPayload, Encoding.UTF8, "application/json");

        var Response = await Client.PostAsync(base_url + "/" + endpoint, content);
        var Result = await Response.Content.ReadAsStringAsync();

        return JsonConvert.DeserializeObject(Result);
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static async Task Main()
    {
        var endpoint = "Video/convert";
        var json_payload = @"
        {
          "video": "base64_encoded_video_string_here",
          "output_format": "mp4"
        }";

        dynamic ResData = await ProcessAPIRequest(endpoint, json_payload);

        string status = ResData.status;
        string message = ResData.message;
        object data = ResData.data;
    }
}

package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "io"
)

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint string, jsonPayload []byte) (map[string]interface{}, error) {
    token := "YOUR_API_TOKEN_HERE" // Configure your token here
    base_url := "https://apicentral.dev"

    Client := &http.Client{}
    Request, err := http.NewRequest("POST", base_url+"/"+endpoint, bytes.NewBuffer(jsonPayload))

    if err != nil {
        return nil, err
    }

    Request.Header.Set("Authorization", "Bearer " + token)
    Request.Header.Set("Content-Type", "application/json")

    Response, err := Client.Do(Request)

    if err != nil {
        return nil, err
    }

    defer Response.Body.Close()

    Body, _ := io.ReadAll(Response.Body)

    var ResData map[string]interface{}
    json.Unmarshal(Body, &ResData)

    return ResData, nil
}

// ================================================================
// API-specific usage
// ================================================================
func main() {
    JsonPayload := []byte(`
    {
      "video": "base64_encoded_video_string_here",
      "output_format": "mp4"
    }`)

    ResData, err := processAPIRequest("Video/convert", JsonPayload)

    if err != nil {
        fmt.Println("Error:", err)
        return
    }

    status := ResData["status"]
    message := ResData["message"]
    data := ResData["data"]

    fmt.Println(status, message, data)
}

require 'net/http'
require 'uri'
require 'json'

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, data)
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'

    uri = URI(base_url + '/' + endpoint)
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true

    request = Net::HTTP::Post.new(uri)
    request['Authorization'] = 'Bearer ' + token
    request['Content-Type'] = 'application/json'
    request.body = data.to_json

    response = http.request(request)
    JSON.parse(response.body)
end

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/convert'
data = 
{
  "video": "base64_encoded_video_string_here",
  "output_format": "mp4"
}

res_data = process_api_request(endpoint, data)

status = res_data['status']
message = res_data['message']
data = res_data['data']

import Foundation

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint: String, jsonPayload: Data, completion: @escaping ([String: Any]?) -> Void)
{
    let token = "YOUR_API_TOKEN_HERE" // Configure your token here
    let base_url = "https://apicentral.dev"

    let requestUrl = URL(string: base_url + "/" + endpoint)!
    var request = URLRequest(url: requestUrl)
    request.httpMethod = "POST"
    request.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
    request.setValue("application/json", forHTTPHeaderField: "Content-Type")
    request.httpBody = jsonPayload

    let task = URLSession.shared.dataTask(with: request) { data, response, error in
        if let error = error {
            print("Error: \(error)")
            completion(nil)
            return
        }

        guard let data = data else {
            completion(nil)
            return
        }

        let resData = try? JSONSerialization.jsonObject(with: data) as? [String: Any]
        completion(resData)
    }

    task.resume()
}

// ================================================================
// API-specific usage
// ================================================================
let endpoint = "Video/convert"
let JsonPayload = """

    {
      "video": "base64_encoded_video_string_here",
      "output_format": "mp4"
    }
""".data(using: .utf8)!

processAPIRequest(endpoint: endpoint, jsonPayload: JsonPayload) { resData in
    let status = resData?["status"] as? String
    let message = resData?["message"] as? String
    let data = resData?["data"]
}

import java.net.http.HttpClient
import java.net.http.HttpRequest
import java.net.http.HttpResponse
import java.net.URI
import java.time.Duration
import com.google.gson.JsonObject
import com.google.gson.JsonParser

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fun processAPIRequest(endpoint: String, jsonPayload: String): JsonObject
{
    val token = "YOUR_API_TOKEN_HERE" // Configure your token here
    val base_url = "https://apicentral.dev"

    val client = HttpClient.newBuilder()
        .connectTimeout(Duration.ofSeconds(30))
        .build()

    val request = HttpRequest.newBuilder()
        .uri(URI.create(base_url + "/" + endpoint))
        .header("Authorization", "Bearer " + token)
        .header("Content-Type", "application/json")
        .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
        .build()

    val response = client.send(request, HttpResponse.BodyHandlers.ofString())

    return JsonParser.parseString(response.body()).asJsonObject
}

// ================================================================
// API-specific usage
// ================================================================
fun main() {
    val endpoint = "Video/convert"
    val jsonPayload = """
    
    {
      "video": "base64_encoded_video_string_here",
      "output_format": "mp4"
    }
    """.trimIndent()

    try {
        val resData = processAPIRequest(endpoint, jsonPayload)
        val status = resData.get("status").asString
        val message = resData.get("message").asString
        val data = if (resData.has("data")) resData.get("data") else null
    } catch (e: Exception) {
        e.printStackTrace()
    }
}

import 'dart:convert';
import 'package:http/http.dart' as http;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
Future<Map<String, dynamic>> processAPIRequest(String endpoint, Map<String, dynamic> data) async
{
    final token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    final base_url = 'https://apicentral.dev';
    final headers = {
        'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/json'
    };

    final response = await http.post(Uri.parse(base_url + '/' + endpoint), headers: headers, body: jsonEncode(data));

    return jsonDecode(response.body);
}

// ================================================================
// API-specific usage
// ================================================================
void main() async {
    final endpoint = 'Video/convert';
    final data = 
    {
      "video": "base64_encoded_video_string_here",
      "output_format": "mp4"
    };

    try {
        final resData = await processAPIRequest(endpoint, data);
        final status = resData['status'];
        final message = resData['message'];
        final data = resData['data'];
    } catch (e) {
        print('Error: $e');
    }
}

use reqwest::blocking::Client;
use serde_json::Value;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fn process_api_request(endpoint: &str, json_payload: &str) -> Result<Value, Box<dyn std::error::Error>>
{
    let token = "YOUR_API_TOKEN_HERE"; // Configure your token here
    let base_url = "https://apicentral.dev";

    let client = Client::new();

    let response = client
        .post(format!("{}/{}", base_url, endpoint))
        .header("Authorization", format!("Bearer {}", token))
        .header("Content-Type", "application/json")
        .body(json_payload.to_string())
        .send()?;

    let res_data: Value = serde_json::from_str(&response.text()?)?;

    Ok(res_data)
}

// ================================================================
// API-specific usage
// ================================================================
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let endpoint = "Video/convert";
    let json_payload = r#"
    
    {
      "video": "base64_encoded_video_string_here",
      "output_format": "mp4"
    }
    "#;

    let res_data = process_api_request(endpoint, json_payload)?;

    let status = &res_data["status"];
    let message = &res_data["message"];
    let data = &res_data["data"];

    println!("{} {} {:?}", status, message, data);

    Ok(())
}

curl -X POST 'https://apicentral.dev/Video/convert' \
    -H 'Authorization: Bearer YOUR_API_TOKEN_HERE' \
    -H 'Content-Type: application/json' \
    -d '
    {
      "video": "base64_encoded_video_string_here",
      "output_format": "mp4"
    }'

compress

Compress a video file by adjusting its quality (1-100). Output format is MP4
Credits Required: 10.0/MB
File size is rounded up to the nearest MB — minimum billable size is 1 MB

PARAMETERS

NAME TYPE REQUIRED DESCRIPTION ADDITIONAL CREDITS PER ITEM EXAMPLE
video string Yes Base64 encoded video data (max 100MB) None
base64_encoded_video_string_here
quality int Yes Target quality (1-100). Higher values mean better quality. Common values: 25, 50, 75 None
50

RESPONSE EXAMPLE

{
    "status": "success",
    "message": "Video compressed successfully",
    "data":
    {
        "video": "base64_encoded_result_video"
    }
}

CODE EXAMPLES

<?php

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest($endpoint, $PostFields)
{
    $token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    $base_url = 'https://apicentral.dev';

    $Curl = curl_init();

    curl_setopt_array(
        $Curl,
        [
            CURLOPT_URL => $base_url . '/' . $endpoint,
            CURLOPT_POST => true,
            CURLOPT_POSTFIELDS => http_build_query($PostFields),
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_TIMEOUT => 30,
            CURLOPT_HTTPHEADER =>
            [
                'Authorization: Bearer ' . $token,
                'Content-Type: application/x-www-form-urlencoded'
            ]
        ]
    );

    $Response = curl_exec($Curl);
    $Data = json_decode($Response, true);

    if (curl_errno($Curl))
        return ['error' => curl_error($Curl)];

    curl_close($Curl); // Omit in PHP 8 and above

    return $Data;
}

// ================================================================
// API-specific usage
// ================================================================
$endpoint = 'Video/compress';
$PostFields = 
[
  'video' => 'base64_encoded_video_string_here',
  'quality' => 50,
];

$Data = processAPIRequest($endpoint, $PostFields);

$status = $Data['status'];
$message = $Data['message'];
$data = $Data['data'] ?? null;
?>

import requests
import json

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, Data):
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'
    Headers = {'Authorization': 'Bearer ' + token}

    try:
        Response = requests.post(base_url + '/' + endpoint, json=Data, headers=Headers)
        return Response.json()
    except Exception as e:
        return {'error': str(e)}

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/compress'
Data = 
{
  "video": "base64_encoded_video_string_here",
  "quality": 50
}

ResData = process_api_request(endpoint, Data)

status = ResData.get('status')
message = ResData.get('message')
data = ResData.get('data')

const axios = require('axios');

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest(endpoint, Data)
{
    const token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    const base_url = 'https://apicentral.dev';

    return axios.post(
        base_url + '/' + endpoint,
        Data,
        {
            headers: {'Authorization': 'Bearer ' + token}
        }
    );
}

// ================================================================
// API-specific usage
// ================================================================
const Data = 
{
  "video": "base64_encoded_video_string_here",
  "quality": 50
};

processAPIRequest('Video/compress', Data)
.then(Response =>
{
    const status = Response.data.status;
    const message = Response.data.message;
    const data = Response.data.data;
})
.catch(Error => { const error = Error.message; });

import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import java.time.Duration;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static JsonObject processAPIRequest(String endpoint, String jsonPayload) throws Exception
    {
        String token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        String base_url = "https://apicentral.dev";

        HttpClient Client = HttpClient.newBuilder()
            .connectTimeout(Duration.ofSeconds(30))
            .build();

        HttpRequest Request = HttpRequest.newBuilder()
            .uri(URI.create(base_url + "/" + endpoint))
            .header("Authorization", "Bearer " + token)
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
            .build();

        HttpResponse<String> Response = Client.send(Request, HttpResponse.BodyHandlers.ofString());

        return JsonParser.parseString(Response.body()).getAsJsonObject();
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static void main(String[] args)
    {
        String endpoint = "Video/compress";
        String JsonPayload = """
        
        {
          "video": "base64_encoded_video_string_here",
          "quality": 50
        }
        """;

        try
        {
            JsonObject ResData = processAPIRequest(endpoint, JsonPayload);
            String status = ResData.get("status").getAsString();
            String message = ResData.get("message").getAsString();
            Object data = ResData.has("data") ? ResData.get("data") : null;
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}

using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static async Task<dynamic> ProcessAPIRequest(string endpoint, string jsonPayload)
    {
        string token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        string base_url = "https://apicentral.dev";

        using var Client = new HttpClient();
        Client.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);

        var content = new StringContent(jsonPayload, Encoding.UTF8, "application/json");

        var Response = await Client.PostAsync(base_url + "/" + endpoint, content);
        var Result = await Response.Content.ReadAsStringAsync();

        return JsonConvert.DeserializeObject(Result);
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static async Task Main()
    {
        var endpoint = "Video/compress";
        var json_payload = @"
        {
          "video": "base64_encoded_video_string_here",
          "quality": 50
        }";

        dynamic ResData = await ProcessAPIRequest(endpoint, json_payload);

        string status = ResData.status;
        string message = ResData.message;
        object data = ResData.data;
    }
}

package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "io"
)

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint string, jsonPayload []byte) (map[string]interface{}, error) {
    token := "YOUR_API_TOKEN_HERE" // Configure your token here
    base_url := "https://apicentral.dev"

    Client := &http.Client{}
    Request, err := http.NewRequest("POST", base_url+"/"+endpoint, bytes.NewBuffer(jsonPayload))

    if err != nil {
        return nil, err
    }

    Request.Header.Set("Authorization", "Bearer " + token)
    Request.Header.Set("Content-Type", "application/json")

    Response, err := Client.Do(Request)

    if err != nil {
        return nil, err
    }

    defer Response.Body.Close()

    Body, _ := io.ReadAll(Response.Body)

    var ResData map[string]interface{}
    json.Unmarshal(Body, &ResData)

    return ResData, nil
}

// ================================================================
// API-specific usage
// ================================================================
func main() {
    JsonPayload := []byte(`
    {
      "video": "base64_encoded_video_string_here",
      "quality": 50
    }`)

    ResData, err := processAPIRequest("Video/compress", JsonPayload)

    if err != nil {
        fmt.Println("Error:", err)
        return
    }

    status := ResData["status"]
    message := ResData["message"]
    data := ResData["data"]

    fmt.Println(status, message, data)
}

require 'net/http'
require 'uri'
require 'json'

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, data)
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'

    uri = URI(base_url + '/' + endpoint)
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true

    request = Net::HTTP::Post.new(uri)
    request['Authorization'] = 'Bearer ' + token
    request['Content-Type'] = 'application/json'
    request.body = data.to_json

    response = http.request(request)
    JSON.parse(response.body)
end

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/compress'
data = 
{
  "video": "base64_encoded_video_string_here",
  "quality": 50
}

res_data = process_api_request(endpoint, data)

status = res_data['status']
message = res_data['message']
data = res_data['data']

import Foundation

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint: String, jsonPayload: Data, completion: @escaping ([String: Any]?) -> Void)
{
    let token = "YOUR_API_TOKEN_HERE" // Configure your token here
    let base_url = "https://apicentral.dev"

    let requestUrl = URL(string: base_url + "/" + endpoint)!
    var request = URLRequest(url: requestUrl)
    request.httpMethod = "POST"
    request.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
    request.setValue("application/json", forHTTPHeaderField: "Content-Type")
    request.httpBody = jsonPayload

    let task = URLSession.shared.dataTask(with: request) { data, response, error in
        if let error = error {
            print("Error: \(error)")
            completion(nil)
            return
        }

        guard let data = data else {
            completion(nil)
            return
        }

        let resData = try? JSONSerialization.jsonObject(with: data) as? [String: Any]
        completion(resData)
    }

    task.resume()
}

// ================================================================
// API-specific usage
// ================================================================
let endpoint = "Video/compress"
let JsonPayload = """

    {
      "video": "base64_encoded_video_string_here",
      "quality": 50
    }
""".data(using: .utf8)!

processAPIRequest(endpoint: endpoint, jsonPayload: JsonPayload) { resData in
    let status = resData?["status"] as? String
    let message = resData?["message"] as? String
    let data = resData?["data"]
}

import java.net.http.HttpClient
import java.net.http.HttpRequest
import java.net.http.HttpResponse
import java.net.URI
import java.time.Duration
import com.google.gson.JsonObject
import com.google.gson.JsonParser

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fun processAPIRequest(endpoint: String, jsonPayload: String): JsonObject
{
    val token = "YOUR_API_TOKEN_HERE" // Configure your token here
    val base_url = "https://apicentral.dev"

    val client = HttpClient.newBuilder()
        .connectTimeout(Duration.ofSeconds(30))
        .build()

    val request = HttpRequest.newBuilder()
        .uri(URI.create(base_url + "/" + endpoint))
        .header("Authorization", "Bearer " + token)
        .header("Content-Type", "application/json")
        .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
        .build()

    val response = client.send(request, HttpResponse.BodyHandlers.ofString())

    return JsonParser.parseString(response.body()).asJsonObject
}

// ================================================================
// API-specific usage
// ================================================================
fun main() {
    val endpoint = "Video/compress"
    val jsonPayload = """
    
    {
      "video": "base64_encoded_video_string_here",
      "quality": 50
    }
    """.trimIndent()

    try {
        val resData = processAPIRequest(endpoint, jsonPayload)
        val status = resData.get("status").asString
        val message = resData.get("message").asString
        val data = if (resData.has("data")) resData.get("data") else null
    } catch (e: Exception) {
        e.printStackTrace()
    }
}

import 'dart:convert';
import 'package:http/http.dart' as http;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
Future<Map<String, dynamic>> processAPIRequest(String endpoint, Map<String, dynamic> data) async
{
    final token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    final base_url = 'https://apicentral.dev';
    final headers = {
        'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/json'
    };

    final response = await http.post(Uri.parse(base_url + '/' + endpoint), headers: headers, body: jsonEncode(data));

    return jsonDecode(response.body);
}

// ================================================================
// API-specific usage
// ================================================================
void main() async {
    final endpoint = 'Video/compress';
    final data = 
    {
      "video": "base64_encoded_video_string_here",
      "quality": 50
    };

    try {
        final resData = await processAPIRequest(endpoint, data);
        final status = resData['status'];
        final message = resData['message'];
        final data = resData['data'];
    } catch (e) {
        print('Error: $e');
    }
}

use reqwest::blocking::Client;
use serde_json::Value;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fn process_api_request(endpoint: &str, json_payload: &str) -> Result<Value, Box<dyn std::error::Error>>
{
    let token = "YOUR_API_TOKEN_HERE"; // Configure your token here
    let base_url = "https://apicentral.dev";

    let client = Client::new();

    let response = client
        .post(format!("{}/{}", base_url, endpoint))
        .header("Authorization", format!("Bearer {}", token))
        .header("Content-Type", "application/json")
        .body(json_payload.to_string())
        .send()?;

    let res_data: Value = serde_json::from_str(&response.text()?)?;

    Ok(res_data)
}

// ================================================================
// API-specific usage
// ================================================================
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let endpoint = "Video/compress";
    let json_payload = r#"
    
    {
      "video": "base64_encoded_video_string_here",
      "quality": 50
    }
    "#;

    let res_data = process_api_request(endpoint, json_payload)?;

    let status = &res_data["status"];
    let message = &res_data["message"];
    let data = &res_data["data"];

    println!("{} {} {:?}", status, message, data);

    Ok(())
}

curl -X POST 'https://apicentral.dev/Video/compress' \
    -H 'Authorization: Bearer YOUR_API_TOKEN_HERE' \
    -H 'Content-Type: application/json' \
    -d '
    {
      "video": "base64_encoded_video_string_here",
      "quality": 50
    }'

trim

Trim a video file by specifying start and end time in seconds (max duration 3600 seconds)
Credits Required: 10.0/MB
File size is rounded up to the nearest MB — minimum billable size is 1 MB

PARAMETERS

NAME TYPE REQUIRED DESCRIPTION ADDITIONAL CREDITS PER ITEM EXAMPLE
video string Yes Base64 encoded video data (max 100MB) None
base64_encoded_video_string_here
start_time float Yes Start time in seconds (e.g. 0, 5.5, 30) None
5
end_time float Yes End time in seconds (e.g. 10, 60.5, 120) None
30

RESPONSE EXAMPLE

{
    "status": "success",
    "message": "Video trimmed successfully",
    "data":
    {
        "video": "base64_encoded_result_video"
    }
}

CODE EXAMPLES

<?php

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest($endpoint, $PostFields)
{
    $token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    $base_url = 'https://apicentral.dev';

    $Curl = curl_init();

    curl_setopt_array(
        $Curl,
        [
            CURLOPT_URL => $base_url . '/' . $endpoint,
            CURLOPT_POST => true,
            CURLOPT_POSTFIELDS => http_build_query($PostFields),
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_TIMEOUT => 30,
            CURLOPT_HTTPHEADER =>
            [
                'Authorization: Bearer ' . $token,
                'Content-Type: application/x-www-form-urlencoded'
            ]
        ]
    );

    $Response = curl_exec($Curl);
    $Data = json_decode($Response, true);

    if (curl_errno($Curl))
        return ['error' => curl_error($Curl)];

    curl_close($Curl); // Omit in PHP 8 and above

    return $Data;
}

// ================================================================
// API-specific usage
// ================================================================
$endpoint = 'Video/trim';
$PostFields = 
[
  'video' => 'base64_encoded_video_string_here',
  'start_time' => 5.0,
  'end_time' => 30.0,
];

$Data = processAPIRequest($endpoint, $PostFields);

$status = $Data['status'];
$message = $Data['message'];
$data = $Data['data'] ?? null;
?>

import requests
import json

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, Data):
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'
    Headers = {'Authorization': 'Bearer ' + token}

    try:
        Response = requests.post(base_url + '/' + endpoint, json=Data, headers=Headers)
        return Response.json()
    except Exception as e:
        return {'error': str(e)}

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/trim'
Data = 
{
  "video": "base64_encoded_video_string_here",
  "start_time": 5,
  "end_time": 30
}

ResData = process_api_request(endpoint, Data)

status = ResData.get('status')
message = ResData.get('message')
data = ResData.get('data')

const axios = require('axios');

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest(endpoint, Data)
{
    const token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    const base_url = 'https://apicentral.dev';

    return axios.post(
        base_url + '/' + endpoint,
        Data,
        {
            headers: {'Authorization': 'Bearer ' + token}
        }
    );
}

// ================================================================
// API-specific usage
// ================================================================
const Data = 
{
  "video": "base64_encoded_video_string_here",
  "start_time": 5,
  "end_time": 30
};

processAPIRequest('Video/trim', Data)
.then(Response =>
{
    const status = Response.data.status;
    const message = Response.data.message;
    const data = Response.data.data;
})
.catch(Error => { const error = Error.message; });

import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import java.time.Duration;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static JsonObject processAPIRequest(String endpoint, String jsonPayload) throws Exception
    {
        String token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        String base_url = "https://apicentral.dev";

        HttpClient Client = HttpClient.newBuilder()
            .connectTimeout(Duration.ofSeconds(30))
            .build();

        HttpRequest Request = HttpRequest.newBuilder()
            .uri(URI.create(base_url + "/" + endpoint))
            .header("Authorization", "Bearer " + token)
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
            .build();

        HttpResponse<String> Response = Client.send(Request, HttpResponse.BodyHandlers.ofString());

        return JsonParser.parseString(Response.body()).getAsJsonObject();
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static void main(String[] args)
    {
        String endpoint = "Video/trim";
        String JsonPayload = """
        
        {
          "video": "base64_encoded_video_string_here",
          "start_time": 5,
          "end_time": 30
        }
        """;

        try
        {
            JsonObject ResData = processAPIRequest(endpoint, JsonPayload);
            String status = ResData.get("status").getAsString();
            String message = ResData.get("message").getAsString();
            Object data = ResData.has("data") ? ResData.get("data") : null;
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}

using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static async Task<dynamic> ProcessAPIRequest(string endpoint, string jsonPayload)
    {
        string token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        string base_url = "https://apicentral.dev";

        using var Client = new HttpClient();
        Client.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);

        var content = new StringContent(jsonPayload, Encoding.UTF8, "application/json");

        var Response = await Client.PostAsync(base_url + "/" + endpoint, content);
        var Result = await Response.Content.ReadAsStringAsync();

        return JsonConvert.DeserializeObject(Result);
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static async Task Main()
    {
        var endpoint = "Video/trim";
        var json_payload = @"
        {
          "video": "base64_encoded_video_string_here",
          "start_time": 5,
          "end_time": 30
        }";

        dynamic ResData = await ProcessAPIRequest(endpoint, json_payload);

        string status = ResData.status;
        string message = ResData.message;
        object data = ResData.data;
    }
}

package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "io"
)

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint string, jsonPayload []byte) (map[string]interface{}, error) {
    token := "YOUR_API_TOKEN_HERE" // Configure your token here
    base_url := "https://apicentral.dev"

    Client := &http.Client{}
    Request, err := http.NewRequest("POST", base_url+"/"+endpoint, bytes.NewBuffer(jsonPayload))

    if err != nil {
        return nil, err
    }

    Request.Header.Set("Authorization", "Bearer " + token)
    Request.Header.Set("Content-Type", "application/json")

    Response, err := Client.Do(Request)

    if err != nil {
        return nil, err
    }

    defer Response.Body.Close()

    Body, _ := io.ReadAll(Response.Body)

    var ResData map[string]interface{}
    json.Unmarshal(Body, &ResData)

    return ResData, nil
}

// ================================================================
// API-specific usage
// ================================================================
func main() {
    JsonPayload := []byte(`
    {
      "video": "base64_encoded_video_string_here",
      "start_time": 5,
      "end_time": 30
    }`)

    ResData, err := processAPIRequest("Video/trim", JsonPayload)

    if err != nil {
        fmt.Println("Error:", err)
        return
    }

    status := ResData["status"]
    message := ResData["message"]
    data := ResData["data"]

    fmt.Println(status, message, data)
}

require 'net/http'
require 'uri'
require 'json'

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, data)
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'

    uri = URI(base_url + '/' + endpoint)
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true

    request = Net::HTTP::Post.new(uri)
    request['Authorization'] = 'Bearer ' + token
    request['Content-Type'] = 'application/json'
    request.body = data.to_json

    response = http.request(request)
    JSON.parse(response.body)
end

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/trim'
data = 
{
  "video": "base64_encoded_video_string_here",
  "start_time": 5,
  "end_time": 30
}

res_data = process_api_request(endpoint, data)

status = res_data['status']
message = res_data['message']
data = res_data['data']

import Foundation

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint: String, jsonPayload: Data, completion: @escaping ([String: Any]?) -> Void)
{
    let token = "YOUR_API_TOKEN_HERE" // Configure your token here
    let base_url = "https://apicentral.dev"

    let requestUrl = URL(string: base_url + "/" + endpoint)!
    var request = URLRequest(url: requestUrl)
    request.httpMethod = "POST"
    request.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
    request.setValue("application/json", forHTTPHeaderField: "Content-Type")
    request.httpBody = jsonPayload

    let task = URLSession.shared.dataTask(with: request) { data, response, error in
        if let error = error {
            print("Error: \(error)")
            completion(nil)
            return
        }

        guard let data = data else {
            completion(nil)
            return
        }

        let resData = try? JSONSerialization.jsonObject(with: data) as? [String: Any]
        completion(resData)
    }

    task.resume()
}

// ================================================================
// API-specific usage
// ================================================================
let endpoint = "Video/trim"
let JsonPayload = """

    {
      "video": "base64_encoded_video_string_here",
      "start_time": 5,
      "end_time": 30
    }
""".data(using: .utf8)!

processAPIRequest(endpoint: endpoint, jsonPayload: JsonPayload) { resData in
    let status = resData?["status"] as? String
    let message = resData?["message"] as? String
    let data = resData?["data"]
}

import java.net.http.HttpClient
import java.net.http.HttpRequest
import java.net.http.HttpResponse
import java.net.URI
import java.time.Duration
import com.google.gson.JsonObject
import com.google.gson.JsonParser

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fun processAPIRequest(endpoint: String, jsonPayload: String): JsonObject
{
    val token = "YOUR_API_TOKEN_HERE" // Configure your token here
    val base_url = "https://apicentral.dev"

    val client = HttpClient.newBuilder()
        .connectTimeout(Duration.ofSeconds(30))
        .build()

    val request = HttpRequest.newBuilder()
        .uri(URI.create(base_url + "/" + endpoint))
        .header("Authorization", "Bearer " + token)
        .header("Content-Type", "application/json")
        .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
        .build()

    val response = client.send(request, HttpResponse.BodyHandlers.ofString())

    return JsonParser.parseString(response.body()).asJsonObject
}

// ================================================================
// API-specific usage
// ================================================================
fun main() {
    val endpoint = "Video/trim"
    val jsonPayload = """
    
    {
      "video": "base64_encoded_video_string_here",
      "start_time": 5,
      "end_time": 30
    }
    """.trimIndent()

    try {
        val resData = processAPIRequest(endpoint, jsonPayload)
        val status = resData.get("status").asString
        val message = resData.get("message").asString
        val data = if (resData.has("data")) resData.get("data") else null
    } catch (e: Exception) {
        e.printStackTrace()
    }
}

import 'dart:convert';
import 'package:http/http.dart' as http;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
Future<Map<String, dynamic>> processAPIRequest(String endpoint, Map<String, dynamic> data) async
{
    final token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    final base_url = 'https://apicentral.dev';
    final headers = {
        'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/json'
    };

    final response = await http.post(Uri.parse(base_url + '/' + endpoint), headers: headers, body: jsonEncode(data));

    return jsonDecode(response.body);
}

// ================================================================
// API-specific usage
// ================================================================
void main() async {
    final endpoint = 'Video/trim';
    final data = 
    {
      "video": "base64_encoded_video_string_here",
      "start_time": 5,
      "end_time": 30
    };

    try {
        final resData = await processAPIRequest(endpoint, data);
        final status = resData['status'];
        final message = resData['message'];
        final data = resData['data'];
    } catch (e) {
        print('Error: $e');
    }
}

use reqwest::blocking::Client;
use serde_json::Value;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fn process_api_request(endpoint: &str, json_payload: &str) -> Result<Value, Box<dyn std::error::Error>>
{
    let token = "YOUR_API_TOKEN_HERE"; // Configure your token here
    let base_url = "https://apicentral.dev";

    let client = Client::new();

    let response = client
        .post(format!("{}/{}", base_url, endpoint))
        .header("Authorization", format!("Bearer {}", token))
        .header("Content-Type", "application/json")
        .body(json_payload.to_string())
        .send()?;

    let res_data: Value = serde_json::from_str(&response.text()?)?;

    Ok(res_data)
}

// ================================================================
// API-specific usage
// ================================================================
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let endpoint = "Video/trim";
    let json_payload = r#"
    
    {
      "video": "base64_encoded_video_string_here",
      "start_time": 5,
      "end_time": 30
    }
    "#;

    let res_data = process_api_request(endpoint, json_payload)?;

    let status = &res_data["status"];
    let message = &res_data["message"];
    let data = &res_data["data"];

    println!("{} {} {:?}", status, message, data);

    Ok(())
}

curl -X POST 'https://apicentral.dev/Video/trim' \
    -H 'Authorization: Bearer YOUR_API_TOKEN_HERE' \
    -H 'Content-Type: application/json' \
    -d '
    {
      "video": "base64_encoded_video_string_here",
      "start_time": 5,
      "end_time": 30
    }'

adjustVolume

Adjust the audio volume of a video file. Volume is expressed as a percentage (1-500), where 100 is the original volume
Credits Required: 10.0/MB
File size is rounded up to the nearest MB — minimum billable size is 1 MB

PARAMETERS

NAME TYPE REQUIRED DESCRIPTION ADDITIONAL CREDITS PER ITEM EXAMPLE
video string Yes Base64 encoded video data (max 100MB) None
base64_encoded_video_string_here
volume int Yes Volume percentage (1-500). 100 = original, 50 = half, 200 = double None
150

RESPONSE EXAMPLE

{
    "status": "success",
    "message": "Video volume adjusted successfully",
    "data":
    {
        "video": "base64_encoded_result_video"
    }
}

CODE EXAMPLES

<?php

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest($endpoint, $PostFields)
{
    $token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    $base_url = 'https://apicentral.dev';

    $Curl = curl_init();

    curl_setopt_array(
        $Curl,
        [
            CURLOPT_URL => $base_url . '/' . $endpoint,
            CURLOPT_POST => true,
            CURLOPT_POSTFIELDS => http_build_query($PostFields),
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_TIMEOUT => 30,
            CURLOPT_HTTPHEADER =>
            [
                'Authorization: Bearer ' . $token,
                'Content-Type: application/x-www-form-urlencoded'
            ]
        ]
    );

    $Response = curl_exec($Curl);
    $Data = json_decode($Response, true);

    if (curl_errno($Curl))
        return ['error' => curl_error($Curl)];

    curl_close($Curl); // Omit in PHP 8 and above

    return $Data;
}

// ================================================================
// API-specific usage
// ================================================================
$endpoint = 'Video/adjustVolume';
$PostFields = 
[
  'video' => 'base64_encoded_video_string_here',
  'volume' => 150,
];

$Data = processAPIRequest($endpoint, $PostFields);

$status = $Data['status'];
$message = $Data['message'];
$data = $Data['data'] ?? null;
?>

import requests
import json

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, Data):
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'
    Headers = {'Authorization': 'Bearer ' + token}

    try:
        Response = requests.post(base_url + '/' + endpoint, json=Data, headers=Headers)
        return Response.json()
    except Exception as e:
        return {'error': str(e)}

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/adjustVolume'
Data = 
{
  "video": "base64_encoded_video_string_here",
  "volume": 150
}

ResData = process_api_request(endpoint, Data)

status = ResData.get('status')
message = ResData.get('message')
data = ResData.get('data')

const axios = require('axios');

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest(endpoint, Data)
{
    const token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    const base_url = 'https://apicentral.dev';

    return axios.post(
        base_url + '/' + endpoint,
        Data,
        {
            headers: {'Authorization': 'Bearer ' + token}
        }
    );
}

// ================================================================
// API-specific usage
// ================================================================
const Data = 
{
  "video": "base64_encoded_video_string_here",
  "volume": 150
};

processAPIRequest('Video/adjustVolume', Data)
.then(Response =>
{
    const status = Response.data.status;
    const message = Response.data.message;
    const data = Response.data.data;
})
.catch(Error => { const error = Error.message; });

import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import java.time.Duration;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static JsonObject processAPIRequest(String endpoint, String jsonPayload) throws Exception
    {
        String token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        String base_url = "https://apicentral.dev";

        HttpClient Client = HttpClient.newBuilder()
            .connectTimeout(Duration.ofSeconds(30))
            .build();

        HttpRequest Request = HttpRequest.newBuilder()
            .uri(URI.create(base_url + "/" + endpoint))
            .header("Authorization", "Bearer " + token)
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
            .build();

        HttpResponse<String> Response = Client.send(Request, HttpResponse.BodyHandlers.ofString());

        return JsonParser.parseString(Response.body()).getAsJsonObject();
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static void main(String[] args)
    {
        String endpoint = "Video/adjustVolume";
        String JsonPayload = """
        
        {
          "video": "base64_encoded_video_string_here",
          "volume": 150
        }
        """;

        try
        {
            JsonObject ResData = processAPIRequest(endpoint, JsonPayload);
            String status = ResData.get("status").getAsString();
            String message = ResData.get("message").getAsString();
            Object data = ResData.has("data") ? ResData.get("data") : null;
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}

using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static async Task<dynamic> ProcessAPIRequest(string endpoint, string jsonPayload)
    {
        string token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        string base_url = "https://apicentral.dev";

        using var Client = new HttpClient();
        Client.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);

        var content = new StringContent(jsonPayload, Encoding.UTF8, "application/json");

        var Response = await Client.PostAsync(base_url + "/" + endpoint, content);
        var Result = await Response.Content.ReadAsStringAsync();

        return JsonConvert.DeserializeObject(Result);
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static async Task Main()
    {
        var endpoint = "Video/adjustVolume";
        var json_payload = @"
        {
          "video": "base64_encoded_video_string_here",
          "volume": 150
        }";

        dynamic ResData = await ProcessAPIRequest(endpoint, json_payload);

        string status = ResData.status;
        string message = ResData.message;
        object data = ResData.data;
    }
}

package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "io"
)

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint string, jsonPayload []byte) (map[string]interface{}, error) {
    token := "YOUR_API_TOKEN_HERE" // Configure your token here
    base_url := "https://apicentral.dev"

    Client := &http.Client{}
    Request, err := http.NewRequest("POST", base_url+"/"+endpoint, bytes.NewBuffer(jsonPayload))

    if err != nil {
        return nil, err
    }

    Request.Header.Set("Authorization", "Bearer " + token)
    Request.Header.Set("Content-Type", "application/json")

    Response, err := Client.Do(Request)

    if err != nil {
        return nil, err
    }

    defer Response.Body.Close()

    Body, _ := io.ReadAll(Response.Body)

    var ResData map[string]interface{}
    json.Unmarshal(Body, &ResData)

    return ResData, nil
}

// ================================================================
// API-specific usage
// ================================================================
func main() {
    JsonPayload := []byte(`
    {
      "video": "base64_encoded_video_string_here",
      "volume": 150
    }`)

    ResData, err := processAPIRequest("Video/adjustVolume", JsonPayload)

    if err != nil {
        fmt.Println("Error:", err)
        return
    }

    status := ResData["status"]
    message := ResData["message"]
    data := ResData["data"]

    fmt.Println(status, message, data)
}

require 'net/http'
require 'uri'
require 'json'

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, data)
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'

    uri = URI(base_url + '/' + endpoint)
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true

    request = Net::HTTP::Post.new(uri)
    request['Authorization'] = 'Bearer ' + token
    request['Content-Type'] = 'application/json'
    request.body = data.to_json

    response = http.request(request)
    JSON.parse(response.body)
end

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/adjustVolume'
data = 
{
  "video": "base64_encoded_video_string_here",
  "volume": 150
}

res_data = process_api_request(endpoint, data)

status = res_data['status']
message = res_data['message']
data = res_data['data']

import Foundation

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint: String, jsonPayload: Data, completion: @escaping ([String: Any]?) -> Void)
{
    let token = "YOUR_API_TOKEN_HERE" // Configure your token here
    let base_url = "https://apicentral.dev"

    let requestUrl = URL(string: base_url + "/" + endpoint)!
    var request = URLRequest(url: requestUrl)
    request.httpMethod = "POST"
    request.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
    request.setValue("application/json", forHTTPHeaderField: "Content-Type")
    request.httpBody = jsonPayload

    let task = URLSession.shared.dataTask(with: request) { data, response, error in
        if let error = error {
            print("Error: \(error)")
            completion(nil)
            return
        }

        guard let data = data else {
            completion(nil)
            return
        }

        let resData = try? JSONSerialization.jsonObject(with: data) as? [String: Any]
        completion(resData)
    }

    task.resume()
}

// ================================================================
// API-specific usage
// ================================================================
let endpoint = "Video/adjustVolume"
let JsonPayload = """

    {
      "video": "base64_encoded_video_string_here",
      "volume": 150
    }
""".data(using: .utf8)!

processAPIRequest(endpoint: endpoint, jsonPayload: JsonPayload) { resData in
    let status = resData?["status"] as? String
    let message = resData?["message"] as? String
    let data = resData?["data"]
}

import java.net.http.HttpClient
import java.net.http.HttpRequest
import java.net.http.HttpResponse
import java.net.URI
import java.time.Duration
import com.google.gson.JsonObject
import com.google.gson.JsonParser

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fun processAPIRequest(endpoint: String, jsonPayload: String): JsonObject
{
    val token = "YOUR_API_TOKEN_HERE" // Configure your token here
    val base_url = "https://apicentral.dev"

    val client = HttpClient.newBuilder()
        .connectTimeout(Duration.ofSeconds(30))
        .build()

    val request = HttpRequest.newBuilder()
        .uri(URI.create(base_url + "/" + endpoint))
        .header("Authorization", "Bearer " + token)
        .header("Content-Type", "application/json")
        .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
        .build()

    val response = client.send(request, HttpResponse.BodyHandlers.ofString())

    return JsonParser.parseString(response.body()).asJsonObject
}

// ================================================================
// API-specific usage
// ================================================================
fun main() {
    val endpoint = "Video/adjustVolume"
    val jsonPayload = """
    
    {
      "video": "base64_encoded_video_string_here",
      "volume": 150
    }
    """.trimIndent()

    try {
        val resData = processAPIRequest(endpoint, jsonPayload)
        val status = resData.get("status").asString
        val message = resData.get("message").asString
        val data = if (resData.has("data")) resData.get("data") else null
    } catch (e: Exception) {
        e.printStackTrace()
    }
}

import 'dart:convert';
import 'package:http/http.dart' as http;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
Future<Map<String, dynamic>> processAPIRequest(String endpoint, Map<String, dynamic> data) async
{
    final token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    final base_url = 'https://apicentral.dev';
    final headers = {
        'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/json'
    };

    final response = await http.post(Uri.parse(base_url + '/' + endpoint), headers: headers, body: jsonEncode(data));

    return jsonDecode(response.body);
}

// ================================================================
// API-specific usage
// ================================================================
void main() async {
    final endpoint = 'Video/adjustVolume';
    final data = 
    {
      "video": "base64_encoded_video_string_here",
      "volume": 150
    };

    try {
        final resData = await processAPIRequest(endpoint, data);
        final status = resData['status'];
        final message = resData['message'];
        final data = resData['data'];
    } catch (e) {
        print('Error: $e');
    }
}

use reqwest::blocking::Client;
use serde_json::Value;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fn process_api_request(endpoint: &str, json_payload: &str) -> Result<Value, Box<dyn std::error::Error>>
{
    let token = "YOUR_API_TOKEN_HERE"; // Configure your token here
    let base_url = "https://apicentral.dev";

    let client = Client::new();

    let response = client
        .post(format!("{}/{}", base_url, endpoint))
        .header("Authorization", format!("Bearer {}", token))
        .header("Content-Type", "application/json")
        .body(json_payload.to_string())
        .send()?;

    let res_data: Value = serde_json::from_str(&response.text()?)?;

    Ok(res_data)
}

// ================================================================
// API-specific usage
// ================================================================
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let endpoint = "Video/adjustVolume";
    let json_payload = r#"
    
    {
      "video": "base64_encoded_video_string_here",
      "volume": 150
    }
    "#;

    let res_data = process_api_request(endpoint, json_payload)?;

    let status = &res_data["status"];
    let message = &res_data["message"];
    let data = &res_data["data"];

    println!("{} {} {:?}", status, message, data);

    Ok(())
}

curl -X POST 'https://apicentral.dev/Video/adjustVolume' \
    -H 'Authorization: Bearer YOUR_API_TOKEN_HERE' \
    -H 'Content-Type: application/json' \
    -d '
    {
      "video": "base64_encoded_video_string_here",
      "volume": 150
    }'

changeSpeed

Change the playback speed of a video file. Speed is expressed as a percentage (50-200), where 100 is the original speed
Credits Required: 10.0/MB
File size is rounded up to the nearest MB — minimum billable size is 1 MB

PARAMETERS

NAME TYPE REQUIRED DESCRIPTION ADDITIONAL CREDITS PER ITEM EXAMPLE
video string Yes Base64 encoded video data (max 100MB) None
base64_encoded_video_string_here
speed int Yes Speed percentage (50-200). 100 = original, 50 = half speed, 200 = double speed None
150

RESPONSE EXAMPLE

{
    "status": "success",
    "message": "Video speed changed successfully",
    "data":
    {
        "video": "base64_encoded_result_video"
    }
}

CODE EXAMPLES

<?php

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest($endpoint, $PostFields)
{
    $token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    $base_url = 'https://apicentral.dev';

    $Curl = curl_init();

    curl_setopt_array(
        $Curl,
        [
            CURLOPT_URL => $base_url . '/' . $endpoint,
            CURLOPT_POST => true,
            CURLOPT_POSTFIELDS => http_build_query($PostFields),
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_TIMEOUT => 30,
            CURLOPT_HTTPHEADER =>
            [
                'Authorization: Bearer ' . $token,
                'Content-Type: application/x-www-form-urlencoded'
            ]
        ]
    );

    $Response = curl_exec($Curl);
    $Data = json_decode($Response, true);

    if (curl_errno($Curl))
        return ['error' => curl_error($Curl)];

    curl_close($Curl); // Omit in PHP 8 and above

    return $Data;
}

// ================================================================
// API-specific usage
// ================================================================
$endpoint = 'Video/changeSpeed';
$PostFields = 
[
  'video' => 'base64_encoded_video_string_here',
  'speed' => 150,
];

$Data = processAPIRequest($endpoint, $PostFields);

$status = $Data['status'];
$message = $Data['message'];
$data = $Data['data'] ?? null;
?>

import requests
import json

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, Data):
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'
    Headers = {'Authorization': 'Bearer ' + token}

    try:
        Response = requests.post(base_url + '/' + endpoint, json=Data, headers=Headers)
        return Response.json()
    except Exception as e:
        return {'error': str(e)}

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/changeSpeed'
Data = 
{
  "video": "base64_encoded_video_string_here",
  "speed": 150
}

ResData = process_api_request(endpoint, Data)

status = ResData.get('status')
message = ResData.get('message')
data = ResData.get('data')

const axios = require('axios');

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest(endpoint, Data)
{
    const token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    const base_url = 'https://apicentral.dev';

    return axios.post(
        base_url + '/' + endpoint,
        Data,
        {
            headers: {'Authorization': 'Bearer ' + token}
        }
    );
}

// ================================================================
// API-specific usage
// ================================================================
const Data = 
{
  "video": "base64_encoded_video_string_here",
  "speed": 150
};

processAPIRequest('Video/changeSpeed', Data)
.then(Response =>
{
    const status = Response.data.status;
    const message = Response.data.message;
    const data = Response.data.data;
})
.catch(Error => { const error = Error.message; });

import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import java.time.Duration;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static JsonObject processAPIRequest(String endpoint, String jsonPayload) throws Exception
    {
        String token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        String base_url = "https://apicentral.dev";

        HttpClient Client = HttpClient.newBuilder()
            .connectTimeout(Duration.ofSeconds(30))
            .build();

        HttpRequest Request = HttpRequest.newBuilder()
            .uri(URI.create(base_url + "/" + endpoint))
            .header("Authorization", "Bearer " + token)
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
            .build();

        HttpResponse<String> Response = Client.send(Request, HttpResponse.BodyHandlers.ofString());

        return JsonParser.parseString(Response.body()).getAsJsonObject();
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static void main(String[] args)
    {
        String endpoint = "Video/changeSpeed";
        String JsonPayload = """
        
        {
          "video": "base64_encoded_video_string_here",
          "speed": 150
        }
        """;

        try
        {
            JsonObject ResData = processAPIRequest(endpoint, JsonPayload);
            String status = ResData.get("status").getAsString();
            String message = ResData.get("message").getAsString();
            Object data = ResData.has("data") ? ResData.get("data") : null;
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}

using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static async Task<dynamic> ProcessAPIRequest(string endpoint, string jsonPayload)
    {
        string token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        string base_url = "https://apicentral.dev";

        using var Client = new HttpClient();
        Client.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);

        var content = new StringContent(jsonPayload, Encoding.UTF8, "application/json");

        var Response = await Client.PostAsync(base_url + "/" + endpoint, content);
        var Result = await Response.Content.ReadAsStringAsync();

        return JsonConvert.DeserializeObject(Result);
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static async Task Main()
    {
        var endpoint = "Video/changeSpeed";
        var json_payload = @"
        {
          "video": "base64_encoded_video_string_here",
          "speed": 150
        }";

        dynamic ResData = await ProcessAPIRequest(endpoint, json_payload);

        string status = ResData.status;
        string message = ResData.message;
        object data = ResData.data;
    }
}

package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "io"
)

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint string, jsonPayload []byte) (map[string]interface{}, error) {
    token := "YOUR_API_TOKEN_HERE" // Configure your token here
    base_url := "https://apicentral.dev"

    Client := &http.Client{}
    Request, err := http.NewRequest("POST", base_url+"/"+endpoint, bytes.NewBuffer(jsonPayload))

    if err != nil {
        return nil, err
    }

    Request.Header.Set("Authorization", "Bearer " + token)
    Request.Header.Set("Content-Type", "application/json")

    Response, err := Client.Do(Request)

    if err != nil {
        return nil, err
    }

    defer Response.Body.Close()

    Body, _ := io.ReadAll(Response.Body)

    var ResData map[string]interface{}
    json.Unmarshal(Body, &ResData)

    return ResData, nil
}

// ================================================================
// API-specific usage
// ================================================================
func main() {
    JsonPayload := []byte(`
    {
      "video": "base64_encoded_video_string_here",
      "speed": 150
    }`)

    ResData, err := processAPIRequest("Video/changeSpeed", JsonPayload)

    if err != nil {
        fmt.Println("Error:", err)
        return
    }

    status := ResData["status"]
    message := ResData["message"]
    data := ResData["data"]

    fmt.Println(status, message, data)
}

require 'net/http'
require 'uri'
require 'json'

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, data)
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'

    uri = URI(base_url + '/' + endpoint)
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true

    request = Net::HTTP::Post.new(uri)
    request['Authorization'] = 'Bearer ' + token
    request['Content-Type'] = 'application/json'
    request.body = data.to_json

    response = http.request(request)
    JSON.parse(response.body)
end

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/changeSpeed'
data = 
{
  "video": "base64_encoded_video_string_here",
  "speed": 150
}

res_data = process_api_request(endpoint, data)

status = res_data['status']
message = res_data['message']
data = res_data['data']

import Foundation

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint: String, jsonPayload: Data, completion: @escaping ([String: Any]?) -> Void)
{
    let token = "YOUR_API_TOKEN_HERE" // Configure your token here
    let base_url = "https://apicentral.dev"

    let requestUrl = URL(string: base_url + "/" + endpoint)!
    var request = URLRequest(url: requestUrl)
    request.httpMethod = "POST"
    request.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
    request.setValue("application/json", forHTTPHeaderField: "Content-Type")
    request.httpBody = jsonPayload

    let task = URLSession.shared.dataTask(with: request) { data, response, error in
        if let error = error {
            print("Error: \(error)")
            completion(nil)
            return
        }

        guard let data = data else {
            completion(nil)
            return
        }

        let resData = try? JSONSerialization.jsonObject(with: data) as? [String: Any]
        completion(resData)
    }

    task.resume()
}

// ================================================================
// API-specific usage
// ================================================================
let endpoint = "Video/changeSpeed"
let JsonPayload = """

    {
      "video": "base64_encoded_video_string_here",
      "speed": 150
    }
""".data(using: .utf8)!

processAPIRequest(endpoint: endpoint, jsonPayload: JsonPayload) { resData in
    let status = resData?["status"] as? String
    let message = resData?["message"] as? String
    let data = resData?["data"]
}

import java.net.http.HttpClient
import java.net.http.HttpRequest
import java.net.http.HttpResponse
import java.net.URI
import java.time.Duration
import com.google.gson.JsonObject
import com.google.gson.JsonParser

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fun processAPIRequest(endpoint: String, jsonPayload: String): JsonObject
{
    val token = "YOUR_API_TOKEN_HERE" // Configure your token here
    val base_url = "https://apicentral.dev"

    val client = HttpClient.newBuilder()
        .connectTimeout(Duration.ofSeconds(30))
        .build()

    val request = HttpRequest.newBuilder()
        .uri(URI.create(base_url + "/" + endpoint))
        .header("Authorization", "Bearer " + token)
        .header("Content-Type", "application/json")
        .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
        .build()

    val response = client.send(request, HttpResponse.BodyHandlers.ofString())

    return JsonParser.parseString(response.body()).asJsonObject
}

// ================================================================
// API-specific usage
// ================================================================
fun main() {
    val endpoint = "Video/changeSpeed"
    val jsonPayload = """
    
    {
      "video": "base64_encoded_video_string_here",
      "speed": 150
    }
    """.trimIndent()

    try {
        val resData = processAPIRequest(endpoint, jsonPayload)
        val status = resData.get("status").asString
        val message = resData.get("message").asString
        val data = if (resData.has("data")) resData.get("data") else null
    } catch (e: Exception) {
        e.printStackTrace()
    }
}

import 'dart:convert';
import 'package:http/http.dart' as http;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
Future<Map<String, dynamic>> processAPIRequest(String endpoint, Map<String, dynamic> data) async
{
    final token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    final base_url = 'https://apicentral.dev';
    final headers = {
        'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/json'
    };

    final response = await http.post(Uri.parse(base_url + '/' + endpoint), headers: headers, body: jsonEncode(data));

    return jsonDecode(response.body);
}

// ================================================================
// API-specific usage
// ================================================================
void main() async {
    final endpoint = 'Video/changeSpeed';
    final data = 
    {
      "video": "base64_encoded_video_string_here",
      "speed": 150
    };

    try {
        final resData = await processAPIRequest(endpoint, data);
        final status = resData['status'];
        final message = resData['message'];
        final data = resData['data'];
    } catch (e) {
        print('Error: $e');
    }
}

use reqwest::blocking::Client;
use serde_json::Value;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fn process_api_request(endpoint: &str, json_payload: &str) -> Result<Value, Box<dyn std::error::Error>>
{
    let token = "YOUR_API_TOKEN_HERE"; // Configure your token here
    let base_url = "https://apicentral.dev";

    let client = Client::new();

    let response = client
        .post(format!("{}/{}", base_url, endpoint))
        .header("Authorization", format!("Bearer {}", token))
        .header("Content-Type", "application/json")
        .body(json_payload.to_string())
        .send()?;

    let res_data: Value = serde_json::from_str(&response.text()?)?;

    Ok(res_data)
}

// ================================================================
// API-specific usage
// ================================================================
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let endpoint = "Video/changeSpeed";
    let json_payload = r#"
    
    {
      "video": "base64_encoded_video_string_here",
      "speed": 150
    }
    "#;

    let res_data = process_api_request(endpoint, json_payload)?;

    let status = &res_data["status"];
    let message = &res_data["message"];
    let data = &res_data["data"];

    println!("{} {} {:?}", status, message, data);

    Ok(())
}

curl -X POST 'https://apicentral.dev/Video/changeSpeed' \
    -H 'Authorization: Bearer YOUR_API_TOKEN_HERE' \
    -H 'Content-Type: application/json' \
    -d '
    {
      "video": "base64_encoded_video_string_here",
      "speed": 150
    }'

merge

Merge multiple video files into a single video file sequentially
Credits Required: 0.0
File size is rounded up to the nearest MB — minimum billable size is 1 MB

PARAMETERS

NAME TYPE REQUIRED DESCRIPTION ADDITIONAL CREDITS PER ITEM EXAMPLE
Videos array Yes Array of base64 encoded video strings (min 2, max 20 files, each max 100MB, total max 500MB) 10.0/MB
[
    "base64_encoded_video_1_here",
    "base64_encoded_video_2_here",
    "base64_encoded_video_3_here"
]

RESPONSE EXAMPLE

{
    "status": "success",
    "message": "Video files merged successfully",
    "data":
    {
        "video": "base64_encoded_result_video"
    }
}

CODE EXAMPLES

<?php

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest($endpoint, $PostFields)
{
    $token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    $base_url = 'https://apicentral.dev';

    $Curl = curl_init();

    curl_setopt_array(
        $Curl,
        [
            CURLOPT_URL => $base_url . '/' . $endpoint,
            CURLOPT_POST => true,
            CURLOPT_POSTFIELDS => http_build_query($PostFields),
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_TIMEOUT => 30,
            CURLOPT_HTTPHEADER =>
            [
                'Authorization: Bearer ' . $token,
                'Content-Type: application/x-www-form-urlencoded'
            ]
        ]
    );

    $Response = curl_exec($Curl);
    $Data = json_decode($Response, true);

    if (curl_errno($Curl))
        return ['error' => curl_error($Curl)];

    curl_close($Curl); // Omit in PHP 8 and above

    return $Data;
}

// ================================================================
// API-specific usage
// ================================================================
$endpoint = 'Video/merge';
$PostFields = 
[
  'Videos' => 
  [
    '0' => 'base64_encoded_video_1_here',
    '1' => 'base64_encoded_video_2_here',
    '2' => 'base64_encoded_video_3_here',
  ],
];

$Data = processAPIRequest($endpoint, $PostFields);

$status = $Data['status'];
$message = $Data['message'];
$data = $Data['data'] ?? null;
?>

import requests
import json

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, Data):
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'
    Headers = {'Authorization': 'Bearer ' + token}

    try:
        Response = requests.post(base_url + '/' + endpoint, json=Data, headers=Headers)
        return Response.json()
    except Exception as e:
        return {'error': str(e)}

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/merge'
Data = 
{
  "Videos": 
  {
    "0": "base64_encoded_video_1_here",
    "1": "base64_encoded_video_2_here",
    "2": "base64_encoded_video_3_here"
  }
}

ResData = process_api_request(endpoint, Data)

status = ResData.get('status')
message = ResData.get('message')
data = ResData.get('data')

const axios = require('axios');

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest(endpoint, Data)
{
    const token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    const base_url = 'https://apicentral.dev';

    return axios.post(
        base_url + '/' + endpoint,
        Data,
        {
            headers: {'Authorization': 'Bearer ' + token}
        }
    );
}

// ================================================================
// API-specific usage
// ================================================================
const Data = 
{
  "Videos": 
  {
    "0": "base64_encoded_video_1_here",
    "1": "base64_encoded_video_2_here",
    "2": "base64_encoded_video_3_here"
  }
};

processAPIRequest('Video/merge', Data)
.then(Response =>
{
    const status = Response.data.status;
    const message = Response.data.message;
    const data = Response.data.data;
})
.catch(Error => { const error = Error.message; });

import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import java.time.Duration;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static JsonObject processAPIRequest(String endpoint, String jsonPayload) throws Exception
    {
        String token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        String base_url = "https://apicentral.dev";

        HttpClient Client = HttpClient.newBuilder()
            .connectTimeout(Duration.ofSeconds(30))
            .build();

        HttpRequest Request = HttpRequest.newBuilder()
            .uri(URI.create(base_url + "/" + endpoint))
            .header("Authorization", "Bearer " + token)
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
            .build();

        HttpResponse<String> Response = Client.send(Request, HttpResponse.BodyHandlers.ofString());

        return JsonParser.parseString(Response.body()).getAsJsonObject();
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static void main(String[] args)
    {
        String endpoint = "Video/merge";
        String JsonPayload = """
        
        {
          "Videos": 
          {
            "0": "base64_encoded_video_1_here",
            "1": "base64_encoded_video_2_here",
            "2": "base64_encoded_video_3_here"
          }
        }
        """;

        try
        {
            JsonObject ResData = processAPIRequest(endpoint, JsonPayload);
            String status = ResData.get("status").getAsString();
            String message = ResData.get("message").getAsString();
            Object data = ResData.has("data") ? ResData.get("data") : null;
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}

using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static async Task<dynamic> ProcessAPIRequest(string endpoint, string jsonPayload)
    {
        string token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        string base_url = "https://apicentral.dev";

        using var Client = new HttpClient();
        Client.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);

        var content = new StringContent(jsonPayload, Encoding.UTF8, "application/json");

        var Response = await Client.PostAsync(base_url + "/" + endpoint, content);
        var Result = await Response.Content.ReadAsStringAsync();

        return JsonConvert.DeserializeObject(Result);
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static async Task Main()
    {
        var endpoint = "Video/merge";
        var json_payload = @"
        {
          "Videos": 
          {
            "0": "base64_encoded_video_1_here",
            "1": "base64_encoded_video_2_here",
            "2": "base64_encoded_video_3_here"
          }
        }";

        dynamic ResData = await ProcessAPIRequest(endpoint, json_payload);

        string status = ResData.status;
        string message = ResData.message;
        object data = ResData.data;
    }
}

package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "io"
)

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint string, jsonPayload []byte) (map[string]interface{}, error) {
    token := "YOUR_API_TOKEN_HERE" // Configure your token here
    base_url := "https://apicentral.dev"

    Client := &http.Client{}
    Request, err := http.NewRequest("POST", base_url+"/"+endpoint, bytes.NewBuffer(jsonPayload))

    if err != nil {
        return nil, err
    }

    Request.Header.Set("Authorization", "Bearer " + token)
    Request.Header.Set("Content-Type", "application/json")

    Response, err := Client.Do(Request)

    if err != nil {
        return nil, err
    }

    defer Response.Body.Close()

    Body, _ := io.ReadAll(Response.Body)

    var ResData map[string]interface{}
    json.Unmarshal(Body, &ResData)

    return ResData, nil
}

// ================================================================
// API-specific usage
// ================================================================
func main() {
    JsonPayload := []byte(`
    {
      "Videos": 
      {
        "0": "base64_encoded_video_1_here",
        "1": "base64_encoded_video_2_here",
        "2": "base64_encoded_video_3_here"
      }
    }`)

    ResData, err := processAPIRequest("Video/merge", JsonPayload)

    if err != nil {
        fmt.Println("Error:", err)
        return
    }

    status := ResData["status"]
    message := ResData["message"]
    data := ResData["data"]

    fmt.Println(status, message, data)
}

require 'net/http'
require 'uri'
require 'json'

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, data)
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'

    uri = URI(base_url + '/' + endpoint)
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true

    request = Net::HTTP::Post.new(uri)
    request['Authorization'] = 'Bearer ' + token
    request['Content-Type'] = 'application/json'
    request.body = data.to_json

    response = http.request(request)
    JSON.parse(response.body)
end

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/merge'
data = 
{
  "Videos": 
  {
    "0": "base64_encoded_video_1_here",
    "1": "base64_encoded_video_2_here",
    "2": "base64_encoded_video_3_here"
  }
}

res_data = process_api_request(endpoint, data)

status = res_data['status']
message = res_data['message']
data = res_data['data']

import Foundation

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint: String, jsonPayload: Data, completion: @escaping ([String: Any]?) -> Void)
{
    let token = "YOUR_API_TOKEN_HERE" // Configure your token here
    let base_url = "https://apicentral.dev"

    let requestUrl = URL(string: base_url + "/" + endpoint)!
    var request = URLRequest(url: requestUrl)
    request.httpMethod = "POST"
    request.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
    request.setValue("application/json", forHTTPHeaderField: "Content-Type")
    request.httpBody = jsonPayload

    let task = URLSession.shared.dataTask(with: request) { data, response, error in
        if let error = error {
            print("Error: \(error)")
            completion(nil)
            return
        }

        guard let data = data else {
            completion(nil)
            return
        }

        let resData = try? JSONSerialization.jsonObject(with: data) as? [String: Any]
        completion(resData)
    }

    task.resume()
}

// ================================================================
// API-specific usage
// ================================================================
let endpoint = "Video/merge"
let JsonPayload = """

    {
      "Videos": 
      {
        "0": "base64_encoded_video_1_here",
        "1": "base64_encoded_video_2_here",
        "2": "base64_encoded_video_3_here"
      }
    }
""".data(using: .utf8)!

processAPIRequest(endpoint: endpoint, jsonPayload: JsonPayload) { resData in
    let status = resData?["status"] as? String
    let message = resData?["message"] as? String
    let data = resData?["data"]
}

import java.net.http.HttpClient
import java.net.http.HttpRequest
import java.net.http.HttpResponse
import java.net.URI
import java.time.Duration
import com.google.gson.JsonObject
import com.google.gson.JsonParser

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fun processAPIRequest(endpoint: String, jsonPayload: String): JsonObject
{
    val token = "YOUR_API_TOKEN_HERE" // Configure your token here
    val base_url = "https://apicentral.dev"

    val client = HttpClient.newBuilder()
        .connectTimeout(Duration.ofSeconds(30))
        .build()

    val request = HttpRequest.newBuilder()
        .uri(URI.create(base_url + "/" + endpoint))
        .header("Authorization", "Bearer " + token)
        .header("Content-Type", "application/json")
        .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
        .build()

    val response = client.send(request, HttpResponse.BodyHandlers.ofString())

    return JsonParser.parseString(response.body()).asJsonObject
}

// ================================================================
// API-specific usage
// ================================================================
fun main() {
    val endpoint = "Video/merge"
    val jsonPayload = """
    
    {
      "Videos": 
      {
        "0": "base64_encoded_video_1_here",
        "1": "base64_encoded_video_2_here",
        "2": "base64_encoded_video_3_here"
      }
    }
    """.trimIndent()

    try {
        val resData = processAPIRequest(endpoint, jsonPayload)
        val status = resData.get("status").asString
        val message = resData.get("message").asString
        val data = if (resData.has("data")) resData.get("data") else null
    } catch (e: Exception) {
        e.printStackTrace()
    }
}

import 'dart:convert';
import 'package:http/http.dart' as http;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
Future<Map<String, dynamic>> processAPIRequest(String endpoint, Map<String, dynamic> data) async
{
    final token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    final base_url = 'https://apicentral.dev';
    final headers = {
        'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/json'
    };

    final response = await http.post(Uri.parse(base_url + '/' + endpoint), headers: headers, body: jsonEncode(data));

    return jsonDecode(response.body);
}

// ================================================================
// API-specific usage
// ================================================================
void main() async {
    final endpoint = 'Video/merge';
    final data = 
    {
      "Videos": 
      {
        "0": "base64_encoded_video_1_here",
        "1": "base64_encoded_video_2_here",
        "2": "base64_encoded_video_3_here"
      }
    };

    try {
        final resData = await processAPIRequest(endpoint, data);
        final status = resData['status'];
        final message = resData['message'];
        final data = resData['data'];
    } catch (e) {
        print('Error: $e');
    }
}

use reqwest::blocking::Client;
use serde_json::Value;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fn process_api_request(endpoint: &str, json_payload: &str) -> Result<Value, Box<dyn std::error::Error>>
{
    let token = "YOUR_API_TOKEN_HERE"; // Configure your token here
    let base_url = "https://apicentral.dev";

    let client = Client::new();

    let response = client
        .post(format!("{}/{}", base_url, endpoint))
        .header("Authorization", format!("Bearer {}", token))
        .header("Content-Type", "application/json")
        .body(json_payload.to_string())
        .send()?;

    let res_data: Value = serde_json::from_str(&response.text()?)?;

    Ok(res_data)
}

// ================================================================
// API-specific usage
// ================================================================
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let endpoint = "Video/merge";
    let json_payload = r#"
    
    {
      "Videos": 
      {
        "0": "base64_encoded_video_1_here",
        "1": "base64_encoded_video_2_here",
        "2": "base64_encoded_video_3_here"
      }
    }
    "#;

    let res_data = process_api_request(endpoint, json_payload)?;

    let status = &res_data["status"];
    let message = &res_data["message"];
    let data = &res_data["data"];

    println!("{} {} {:?}", status, message, data);

    Ok(())
}

curl -X POST 'https://apicentral.dev/Video/merge' \
    -H 'Authorization: Bearer YOUR_API_TOKEN_HERE' \
    -H 'Content-Type: application/json' \
    -d '
    {
      "Videos": 
      {
        "0": "base64_encoded_video_1_here",
        "1": "base64_encoded_video_2_here",
        "2": "base64_encoded_video_3_here"
      }
    }'

extractInfo

Extract metadata and technical information from a video file: format, duration, bitrate, video codec, resolution, frame rate, audio codec, sample rate, channels
Credits Required: 1.0

PARAMETERS

NAME TYPE REQUIRED DESCRIPTION ADDITIONAL CREDITS PER ITEM EXAMPLE
video string Yes Base64 encoded video data (max 100MB) None
base64_encoded_video_string_here

RESPONSE EXAMPLE

{
    "status": "success",
    "message": "Video info extracted successfully",
    "data":
    {
        "format": "mp4",
        "duration": 120.50,
        "bitrate": 2500000,
        "size": 37500000,
        "video_codec": "h264",
        "width": 1920,
        "height": 1080,
        "frame_rate": "30/1",
        "audio_codec": "aac",
        "audio_sample_rate": 44100,
        "audio_channels": 2
    }
}

CODE EXAMPLES

<?php

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest($endpoint, $PostFields)
{
    $token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    $base_url = 'https://apicentral.dev';

    $Curl = curl_init();

    curl_setopt_array(
        $Curl,
        [
            CURLOPT_URL => $base_url . '/' . $endpoint,
            CURLOPT_POST => true,
            CURLOPT_POSTFIELDS => http_build_query($PostFields),
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_TIMEOUT => 30,
            CURLOPT_HTTPHEADER =>
            [
                'Authorization: Bearer ' . $token,
                'Content-Type: application/x-www-form-urlencoded'
            ]
        ]
    );

    $Response = curl_exec($Curl);
    $Data = json_decode($Response, true);

    if (curl_errno($Curl))
        return ['error' => curl_error($Curl)];

    curl_close($Curl); // Omit in PHP 8 and above

    return $Data;
}

// ================================================================
// API-specific usage
// ================================================================
$endpoint = 'Video/extractInfo';
$PostFields = 
[
  'video' => 'base64_encoded_video_string_here',
];

$Data = processAPIRequest($endpoint, $PostFields);

$status = $Data['status'];
$message = $Data['message'];
$data = $Data['data'] ?? null;
?>

import requests
import json

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, Data):
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'
    Headers = {'Authorization': 'Bearer ' + token}

    try:
        Response = requests.post(base_url + '/' + endpoint, json=Data, headers=Headers)
        return Response.json()
    except Exception as e:
        return {'error': str(e)}

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/extractInfo'
Data = 
{
  "video": "base64_encoded_video_string_here"
}

ResData = process_api_request(endpoint, Data)

status = ResData.get('status')
message = ResData.get('message')
data = ResData.get('data')

const axios = require('axios');

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest(endpoint, Data)
{
    const token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    const base_url = 'https://apicentral.dev';

    return axios.post(
        base_url + '/' + endpoint,
        Data,
        {
            headers: {'Authorization': 'Bearer ' + token}
        }
    );
}

// ================================================================
// API-specific usage
// ================================================================
const Data = 
{
  "video": "base64_encoded_video_string_here"
};

processAPIRequest('Video/extractInfo', Data)
.then(Response =>
{
    const status = Response.data.status;
    const message = Response.data.message;
    const data = Response.data.data;
})
.catch(Error => { const error = Error.message; });

import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import java.time.Duration;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static JsonObject processAPIRequest(String endpoint, String jsonPayload) throws Exception
    {
        String token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        String base_url = "https://apicentral.dev";

        HttpClient Client = HttpClient.newBuilder()
            .connectTimeout(Duration.ofSeconds(30))
            .build();

        HttpRequest Request = HttpRequest.newBuilder()
            .uri(URI.create(base_url + "/" + endpoint))
            .header("Authorization", "Bearer " + token)
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
            .build();

        HttpResponse<String> Response = Client.send(Request, HttpResponse.BodyHandlers.ofString());

        return JsonParser.parseString(Response.body()).getAsJsonObject();
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static void main(String[] args)
    {
        String endpoint = "Video/extractInfo";
        String JsonPayload = """
        
        {
          "video": "base64_encoded_video_string_here"
        }
        """;

        try
        {
            JsonObject ResData = processAPIRequest(endpoint, JsonPayload);
            String status = ResData.get("status").getAsString();
            String message = ResData.get("message").getAsString();
            Object data = ResData.has("data") ? ResData.get("data") : null;
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}

using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static async Task<dynamic> ProcessAPIRequest(string endpoint, string jsonPayload)
    {
        string token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        string base_url = "https://apicentral.dev";

        using var Client = new HttpClient();
        Client.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);

        var content = new StringContent(jsonPayload, Encoding.UTF8, "application/json");

        var Response = await Client.PostAsync(base_url + "/" + endpoint, content);
        var Result = await Response.Content.ReadAsStringAsync();

        return JsonConvert.DeserializeObject(Result);
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static async Task Main()
    {
        var endpoint = "Video/extractInfo";
        var json_payload = @"
        {
          "video": "base64_encoded_video_string_here"
        }";

        dynamic ResData = await ProcessAPIRequest(endpoint, json_payload);

        string status = ResData.status;
        string message = ResData.message;
        object data = ResData.data;
    }
}

package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "io"
)

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint string, jsonPayload []byte) (map[string]interface{}, error) {
    token := "YOUR_API_TOKEN_HERE" // Configure your token here
    base_url := "https://apicentral.dev"

    Client := &http.Client{}
    Request, err := http.NewRequest("POST", base_url+"/"+endpoint, bytes.NewBuffer(jsonPayload))

    if err != nil {
        return nil, err
    }

    Request.Header.Set("Authorization", "Bearer " + token)
    Request.Header.Set("Content-Type", "application/json")

    Response, err := Client.Do(Request)

    if err != nil {
        return nil, err
    }

    defer Response.Body.Close()

    Body, _ := io.ReadAll(Response.Body)

    var ResData map[string]interface{}
    json.Unmarshal(Body, &ResData)

    return ResData, nil
}

// ================================================================
// API-specific usage
// ================================================================
func main() {
    JsonPayload := []byte(`
    {
      "video": "base64_encoded_video_string_here"
    }`)

    ResData, err := processAPIRequest("Video/extractInfo", JsonPayload)

    if err != nil {
        fmt.Println("Error:", err)
        return
    }

    status := ResData["status"]
    message := ResData["message"]
    data := ResData["data"]

    fmt.Println(status, message, data)
}

require 'net/http'
require 'uri'
require 'json'

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, data)
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'

    uri = URI(base_url + '/' + endpoint)
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true

    request = Net::HTTP::Post.new(uri)
    request['Authorization'] = 'Bearer ' + token
    request['Content-Type'] = 'application/json'
    request.body = data.to_json

    response = http.request(request)
    JSON.parse(response.body)
end

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/extractInfo'
data = 
{
  "video": "base64_encoded_video_string_here"
}

res_data = process_api_request(endpoint, data)

status = res_data['status']
message = res_data['message']
data = res_data['data']

import Foundation

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint: String, jsonPayload: Data, completion: @escaping ([String: Any]?) -> Void)
{
    let token = "YOUR_API_TOKEN_HERE" // Configure your token here
    let base_url = "https://apicentral.dev"

    let requestUrl = URL(string: base_url + "/" + endpoint)!
    var request = URLRequest(url: requestUrl)
    request.httpMethod = "POST"
    request.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
    request.setValue("application/json", forHTTPHeaderField: "Content-Type")
    request.httpBody = jsonPayload

    let task = URLSession.shared.dataTask(with: request) { data, response, error in
        if let error = error {
            print("Error: \(error)")
            completion(nil)
            return
        }

        guard let data = data else {
            completion(nil)
            return
        }

        let resData = try? JSONSerialization.jsonObject(with: data) as? [String: Any]
        completion(resData)
    }

    task.resume()
}

// ================================================================
// API-specific usage
// ================================================================
let endpoint = "Video/extractInfo"
let JsonPayload = """

    {
      "video": "base64_encoded_video_string_here"
    }
""".data(using: .utf8)!

processAPIRequest(endpoint: endpoint, jsonPayload: JsonPayload) { resData in
    let status = resData?["status"] as? String
    let message = resData?["message"] as? String
    let data = resData?["data"]
}

import java.net.http.HttpClient
import java.net.http.HttpRequest
import java.net.http.HttpResponse
import java.net.URI
import java.time.Duration
import com.google.gson.JsonObject
import com.google.gson.JsonParser

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fun processAPIRequest(endpoint: String, jsonPayload: String): JsonObject
{
    val token = "YOUR_API_TOKEN_HERE" // Configure your token here
    val base_url = "https://apicentral.dev"

    val client = HttpClient.newBuilder()
        .connectTimeout(Duration.ofSeconds(30))
        .build()

    val request = HttpRequest.newBuilder()
        .uri(URI.create(base_url + "/" + endpoint))
        .header("Authorization", "Bearer " + token)
        .header("Content-Type", "application/json")
        .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
        .build()

    val response = client.send(request, HttpResponse.BodyHandlers.ofString())

    return JsonParser.parseString(response.body()).asJsonObject
}

// ================================================================
// API-specific usage
// ================================================================
fun main() {
    val endpoint = "Video/extractInfo"
    val jsonPayload = """
    
    {
      "video": "base64_encoded_video_string_here"
    }
    """.trimIndent()

    try {
        val resData = processAPIRequest(endpoint, jsonPayload)
        val status = resData.get("status").asString
        val message = resData.get("message").asString
        val data = if (resData.has("data")) resData.get("data") else null
    } catch (e: Exception) {
        e.printStackTrace()
    }
}

import 'dart:convert';
import 'package:http/http.dart' as http;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
Future<Map<String, dynamic>> processAPIRequest(String endpoint, Map<String, dynamic> data) async
{
    final token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    final base_url = 'https://apicentral.dev';
    final headers = {
        'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/json'
    };

    final response = await http.post(Uri.parse(base_url + '/' + endpoint), headers: headers, body: jsonEncode(data));

    return jsonDecode(response.body);
}

// ================================================================
// API-specific usage
// ================================================================
void main() async {
    final endpoint = 'Video/extractInfo';
    final data = 
    {
      "video": "base64_encoded_video_string_here"
    };

    try {
        final resData = await processAPIRequest(endpoint, data);
        final status = resData['status'];
        final message = resData['message'];
        final data = resData['data'];
    } catch (e) {
        print('Error: $e');
    }
}

use reqwest::blocking::Client;
use serde_json::Value;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fn process_api_request(endpoint: &str, json_payload: &str) -> Result<Value, Box<dyn std::error::Error>>
{
    let token = "YOUR_API_TOKEN_HERE"; // Configure your token here
    let base_url = "https://apicentral.dev";

    let client = Client::new();

    let response = client
        .post(format!("{}/{}", base_url, endpoint))
        .header("Authorization", format!("Bearer {}", token))
        .header("Content-Type", "application/json")
        .body(json_payload.to_string())
        .send()?;

    let res_data: Value = serde_json::from_str(&response.text()?)?;

    Ok(res_data)
}

// ================================================================
// API-specific usage
// ================================================================
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let endpoint = "Video/extractInfo";
    let json_payload = r#"
    
    {
      "video": "base64_encoded_video_string_here"
    }
    "#;

    let res_data = process_api_request(endpoint, json_payload)?;

    let status = &res_data["status"];
    let message = &res_data["message"];
    let data = &res_data["data"];

    println!("{} {} {:?}", status, message, data);

    Ok(())
}

curl -X POST 'https://apicentral.dev/Video/extractInfo' \
    -H 'Authorization: Bearer YOUR_API_TOKEN_HERE' \
    -H 'Content-Type: application/json' \
    -d '
    {
      "video": "base64_encoded_video_string_here"
    }'

multiTool

Apply multiple video operations in a single request: convert, compress, trim, adjust volume, change speed. Each enabled operation costs 10 credits per MB
Credits Required: 0.0
File size is rounded up to the nearest MB — minimum billable size is 1 MB

PARAMETERS

NAME TYPE REQUIRED DESCRIPTION ADDITIONAL CREDITS PER ITEM EXAMPLE
video string Yes Base64 encoded video data (max 100MB) None
base64_encoded_video_string_here
output_format string No Target video format (e.g. mp4, avi, mkv, mov). Leave empty to keep original format 10.0/MB
mp4
quality int No Target quality (1-100). 0 or empty to skip compression 10.0/MB
0
trim_start float No Trim start time in seconds (0 to skip trimming) 10.0/MB
0
trim_end float No Trim end time in seconds (0 to skip trimming) None
0
volume int No Volume percentage (1-500). 100 = original volume, 0 or empty to skip 10.0/MB
100
speed int No Speed percentage (50-200). 100 = original speed, 0 or empty to skip 10.0/MB
100

RESPONSE EXAMPLE

{
    "status": "success",
    "message": "Video processed successfully (3 operations applied)",
    "data":
    {
        "video": "base64_encoded_result_video"
    }
}

ADDITIONAL INFO

Base cost is 0.0 credits.
- Each operation (convert, compress, trim, adjust volume, change speed): +10.0 credits per MB (min 1 MB)
- Total cost = operations count * 10.0 * file size in MB
At least one operation must be enabled.

CODE EXAMPLES

<?php

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest($endpoint, $PostFields)
{
    $token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    $base_url = 'https://apicentral.dev';

    $Curl = curl_init();

    curl_setopt_array(
        $Curl,
        [
            CURLOPT_URL => $base_url . '/' . $endpoint,
            CURLOPT_POST => true,
            CURLOPT_POSTFIELDS => http_build_query($PostFields),
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_TIMEOUT => 30,
            CURLOPT_HTTPHEADER =>
            [
                'Authorization: Bearer ' . $token,
                'Content-Type: application/x-www-form-urlencoded'
            ]
        ]
    );

    $Response = curl_exec($Curl);
    $Data = json_decode($Response, true);

    if (curl_errno($Curl))
        return ['error' => curl_error($Curl)];

    curl_close($Curl); // Omit in PHP 8 and above

    return $Data;
}

// ================================================================
// API-specific usage
// ================================================================
$endpoint = 'Video/multiTool';
$PostFields = 
[
  'video' => 'base64_encoded_video_string_here',
  'output_format' => 'mp4',
  'quality' => 0,
  'trim_start' => 0,
  'trim_end' => 0,
  'volume' => 100,
  'speed' => 100,
];

$Data = processAPIRequest($endpoint, $PostFields);

$status = $Data['status'];
$message = $Data['message'];
$data = $Data['data'] ?? null;
?>

import requests
import json

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, Data):
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'
    Headers = {'Authorization': 'Bearer ' + token}

    try:
        Response = requests.post(base_url + '/' + endpoint, json=Data, headers=Headers)
        return Response.json()
    except Exception as e:
        return {'error': str(e)}

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/multiTool'
Data = 
{
  "video": "base64_encoded_video_string_here",
  "output_format": "mp4",
  "quality": 0,
  "trim_start": 0,
  "trim_end": 0,
  "volume": 100,
  "speed": 100
}

ResData = process_api_request(endpoint, Data)

status = ResData.get('status')
message = ResData.get('message')
data = ResData.get('data')

const axios = require('axios');

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
function processAPIRequest(endpoint, Data)
{
    const token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    const base_url = 'https://apicentral.dev';

    return axios.post(
        base_url + '/' + endpoint,
        Data,
        {
            headers: {'Authorization': 'Bearer ' + token}
        }
    );
}

// ================================================================
// API-specific usage
// ================================================================
const Data = 
{
  "video": "base64_encoded_video_string_here",
  "output_format": "mp4",
  "quality": 0,
  "trim_start": 0,
  "trim_end": 0,
  "volume": 100,
  "speed": 100
};

processAPIRequest('Video/multiTool', Data)
.then(Response =>
{
    const status = Response.data.status;
    const message = Response.data.message;
    const data = Response.data.data;
})
.catch(Error => { const error = Error.message; });

import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import java.time.Duration;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static JsonObject processAPIRequest(String endpoint, String jsonPayload) throws Exception
    {
        String token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        String base_url = "https://apicentral.dev";

        HttpClient Client = HttpClient.newBuilder()
            .connectTimeout(Duration.ofSeconds(30))
            .build();

        HttpRequest Request = HttpRequest.newBuilder()
            .uri(URI.create(base_url + "/" + endpoint))
            .header("Authorization", "Bearer " + token)
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
            .build();

        HttpResponse<String> Response = Client.send(Request, HttpResponse.BodyHandlers.ofString());

        return JsonParser.parseString(Response.body()).getAsJsonObject();
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static void main(String[] args)
    {
        String endpoint = "Video/multiTool";
        String JsonPayload = """
        
        {
          "video": "base64_encoded_video_string_here",
          "output_format": "mp4",
          "quality": 0,
          "trim_start": 0,
          "trim_end": 0,
          "volume": 100,
          "speed": 100
        }
        """;

        try
        {
            JsonObject ResData = processAPIRequest(endpoint, JsonPayload);
            String status = ResData.get("status").getAsString();
            String message = ResData.get("message").getAsString();
            Object data = ResData.has("data") ? ResData.get("data") : null;
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}

using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class ApiExample
{
    // ================================================================
    // Generic method - copy once, reuse for all APIs
    // ================================================================
    public static async Task<dynamic> ProcessAPIRequest(string endpoint, string jsonPayload)
    {
        string token = "YOUR_API_TOKEN_HERE"; // Configure your token here
        string base_url = "https://apicentral.dev";

        using var Client = new HttpClient();
        Client.DefaultRequestHeaders.Add("Authorization", "Bearer " + token);

        var content = new StringContent(jsonPayload, Encoding.UTF8, "application/json");

        var Response = await Client.PostAsync(base_url + "/" + endpoint, content);
        var Result = await Response.Content.ReadAsStringAsync();

        return JsonConvert.DeserializeObject(Result);
    }

    // ================================================================
    // API-specific usage
    // ================================================================
    public static async Task Main()
    {
        var endpoint = "Video/multiTool";
        var json_payload = @"
        {
          "video": "base64_encoded_video_string_here",
          "output_format": "mp4",
          "quality": 0,
          "trim_start": 0,
          "trim_end": 0,
          "volume": 100,
          "speed": 100
        }";

        dynamic ResData = await ProcessAPIRequest(endpoint, json_payload);

        string status = ResData.status;
        string message = ResData.message;
        object data = ResData.data;
    }
}

package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "io"
)

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint string, jsonPayload []byte) (map[string]interface{}, error) {
    token := "YOUR_API_TOKEN_HERE" // Configure your token here
    base_url := "https://apicentral.dev"

    Client := &http.Client{}
    Request, err := http.NewRequest("POST", base_url+"/"+endpoint, bytes.NewBuffer(jsonPayload))

    if err != nil {
        return nil, err
    }

    Request.Header.Set("Authorization", "Bearer " + token)
    Request.Header.Set("Content-Type", "application/json")

    Response, err := Client.Do(Request)

    if err != nil {
        return nil, err
    }

    defer Response.Body.Close()

    Body, _ := io.ReadAll(Response.Body)

    var ResData map[string]interface{}
    json.Unmarshal(Body, &ResData)

    return ResData, nil
}

// ================================================================
// API-specific usage
// ================================================================
func main() {
    JsonPayload := []byte(`
    {
      "video": "base64_encoded_video_string_here",
      "output_format": "mp4",
      "quality": 0,
      "trim_start": 0,
      "trim_end": 0,
      "volume": 100,
      "speed": 100
    }`)

    ResData, err := processAPIRequest("Video/multiTool", JsonPayload)

    if err != nil {
        fmt.Println("Error:", err)
        return
    }

    status := ResData["status"]
    message := ResData["message"]
    data := ResData["data"]

    fmt.Println(status, message, data)
}

require 'net/http'
require 'uri'
require 'json'

# ================================================================
# Generic function - copy once, reuse for all APIs
# ================================================================
def process_api_request(endpoint, data)
    token = 'YOUR_API_TOKEN_HERE'  # Configure your token here
    base_url = 'https://apicentral.dev'

    uri = URI(base_url + '/' + endpoint)
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true

    request = Net::HTTP::Post.new(uri)
    request['Authorization'] = 'Bearer ' + token
    request['Content-Type'] = 'application/json'
    request.body = data.to_json

    response = http.request(request)
    JSON.parse(response.body)
end

# ================================================================
# API-specific usage
# ================================================================
endpoint = 'Video/multiTool'
data = 
{
  "video": "base64_encoded_video_string_here",
  "output_format": "mp4",
  "quality": 0,
  "trim_start": 0,
  "trim_end": 0,
  "volume": 100,
  "speed": 100
}

res_data = process_api_request(endpoint, data)

status = res_data['status']
message = res_data['message']
data = res_data['data']

import Foundation

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
func processAPIRequest(endpoint: String, jsonPayload: Data, completion: @escaping ([String: Any]?) -> Void)
{
    let token = "YOUR_API_TOKEN_HERE" // Configure your token here
    let base_url = "https://apicentral.dev"

    let requestUrl = URL(string: base_url + "/" + endpoint)!
    var request = URLRequest(url: requestUrl)
    request.httpMethod = "POST"
    request.setValue("Bearer " + token, forHTTPHeaderField: "Authorization")
    request.setValue("application/json", forHTTPHeaderField: "Content-Type")
    request.httpBody = jsonPayload

    let task = URLSession.shared.dataTask(with: request) { data, response, error in
        if let error = error {
            print("Error: \(error)")
            completion(nil)
            return
        }

        guard let data = data else {
            completion(nil)
            return
        }

        let resData = try? JSONSerialization.jsonObject(with: data) as? [String: Any]
        completion(resData)
    }

    task.resume()
}

// ================================================================
// API-specific usage
// ================================================================
let endpoint = "Video/multiTool"
let JsonPayload = """

    {
      "video": "base64_encoded_video_string_here",
      "output_format": "mp4",
      "quality": 0,
      "trim_start": 0,
      "trim_end": 0,
      "volume": 100,
      "speed": 100
    }
""".data(using: .utf8)!

processAPIRequest(endpoint: endpoint, jsonPayload: JsonPayload) { resData in
    let status = resData?["status"] as? String
    let message = resData?["message"] as? String
    let data = resData?["data"]
}

import java.net.http.HttpClient
import java.net.http.HttpRequest
import java.net.http.HttpResponse
import java.net.URI
import java.time.Duration
import com.google.gson.JsonObject
import com.google.gson.JsonParser

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fun processAPIRequest(endpoint: String, jsonPayload: String): JsonObject
{
    val token = "YOUR_API_TOKEN_HERE" // Configure your token here
    val base_url = "https://apicentral.dev"

    val client = HttpClient.newBuilder()
        .connectTimeout(Duration.ofSeconds(30))
        .build()

    val request = HttpRequest.newBuilder()
        .uri(URI.create(base_url + "/" + endpoint))
        .header("Authorization", "Bearer " + token)
        .header("Content-Type", "application/json")
        .POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
        .build()

    val response = client.send(request, HttpResponse.BodyHandlers.ofString())

    return JsonParser.parseString(response.body()).asJsonObject
}

// ================================================================
// API-specific usage
// ================================================================
fun main() {
    val endpoint = "Video/multiTool"
    val jsonPayload = """
    
    {
      "video": "base64_encoded_video_string_here",
      "output_format": "mp4",
      "quality": 0,
      "trim_start": 0,
      "trim_end": 0,
      "volume": 100,
      "speed": 100
    }
    """.trimIndent()

    try {
        val resData = processAPIRequest(endpoint, jsonPayload)
        val status = resData.get("status").asString
        val message = resData.get("message").asString
        val data = if (resData.has("data")) resData.get("data") else null
    } catch (e: Exception) {
        e.printStackTrace()
    }
}

import 'dart:convert';
import 'package:http/http.dart' as http;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
Future<Map<String, dynamic>> processAPIRequest(String endpoint, Map<String, dynamic> data) async
{
    final token = 'YOUR_API_TOKEN_HERE'; // Configure your token here
    final base_url = 'https://apicentral.dev';
    final headers = {
        'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/json'
    };

    final response = await http.post(Uri.parse(base_url + '/' + endpoint), headers: headers, body: jsonEncode(data));

    return jsonDecode(response.body);
}

// ================================================================
// API-specific usage
// ================================================================
void main() async {
    final endpoint = 'Video/multiTool';
    final data = 
    {
      "video": "base64_encoded_video_string_here",
      "output_format": "mp4",
      "quality": 0,
      "trim_start": 0,
      "trim_end": 0,
      "volume": 100,
      "speed": 100
    };

    try {
        final resData = await processAPIRequest(endpoint, data);
        final status = resData['status'];
        final message = resData['message'];
        final data = resData['data'];
    } catch (e) {
        print('Error: $e');
    }
}

use reqwest::blocking::Client;
use serde_json::Value;

// ================================================================
// Generic function - copy once, reuse for all APIs
// ================================================================
fn process_api_request(endpoint: &str, json_payload: &str) -> Result<Value, Box<dyn std::error::Error>>
{
    let token = "YOUR_API_TOKEN_HERE"; // Configure your token here
    let base_url = "https://apicentral.dev";

    let client = Client::new();

    let response = client
        .post(format!("{}/{}", base_url, endpoint))
        .header("Authorization", format!("Bearer {}", token))
        .header("Content-Type", "application/json")
        .body(json_payload.to_string())
        .send()?;

    let res_data: Value = serde_json::from_str(&response.text()?)?;

    Ok(res_data)
}

// ================================================================
// API-specific usage
// ================================================================
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let endpoint = "Video/multiTool";
    let json_payload = r#"
    
    {
      "video": "base64_encoded_video_string_here",
      "output_format": "mp4",
      "quality": 0,
      "trim_start": 0,
      "trim_end": 0,
      "volume": 100,
      "speed": 100
    }
    "#;

    let res_data = process_api_request(endpoint, json_payload)?;

    let status = &res_data["status"];
    let message = &res_data["message"];
    let data = &res_data["data"];

    println!("{} {} {:?}", status, message, data);

    Ok(())
}

curl -X POST 'https://apicentral.dev/Video/multiTool' \
    -H 'Authorization: Bearer YOUR_API_TOKEN_HERE' \
    -H 'Content-Type: application/json' \
    -d '
    {
      "video": "base64_encoded_video_string_here",
      "output_format": "mp4",
      "quality": 0,
      "trim_start": 0,
      "trim_end": 0,
      "volume": 100,
      "speed": 100
    }'