Introduction
This documentation provides a detailed step-by-step guide on how to do conversions using the Online UniConverter API.
For using Online UniConverter API, the API key provided is necessary. For API support please feel free to Contact Us.
The Online UniConverter API follows the standards for REST APIs. All requests and response are UTF8 encoded JSON.
HTTP Headers
Requested with JSON, the appropriate HTTP headers are:
{
  Content-Type": "application/json"
}
Request Interface Example
curl --location --request POST 'https://developer-api.media.io/task/video/convert'
  --header 'accessKey: AKD3X39M-LGPJ1SDZVHNHJPXMKI1TWXU4-PQJ82N6G'
  --header 'signature: 831014e94eb8f290a5c7bf64aabdedaf'
  --header 'timestamp: 1609726786'
  --data-raw '{
    "file_id":"f3c951583c95158b53803325a34cbe583c95158b",
    "output_format":"avi",
    "compress_ratio":"0.96",
    "output_resolution":"360p"
  }'
Algorithm Instruction
Security Verification Algorithm
Encryption Algorithm is to sequentially connect method + uri + body + timestamp + accessKey + accessSecret into a string for md5 encryption. "body" is an array composed of get parameter, post parameter, which is sorted in ascending order by the first letter of array "key", and convert the array to a string in json format , such as {file_id=f3c951583c95158b53803325a34cbe583c95158b,output_format=avi}, file_id will be the first as its first letter is F.
Parameter Instruction
Accesskey:Application key. Enterprise can apply it.
AccessSecret:Application secret key, the enterprise can apply it. You can't expose the private key used as an interface request parameter of signature.
Body:It is sorted in ascending order by the first letter of parameter name. If there is a multi-dimensional map, the maps in it also need to be sorted in the same order; otherwise, the verification may fail.
Signature:It's to sequentially connect method + uri + body + timestamp + accessKey + accessSecret into a string for md5 encryption.
Body Calculation Instruction
The body is an array composed of getting parameter, post parameter, sorted in ascending order by the first letter of array "key" and converting it to a string in json format.
How to generate a signature
Step 1: Sort out the body fields
{"compress_ratio":"0.96","file_id":"f3c951583c95158b53803325a34cbe583c95158b","output_format":"avi","output_resolution":"360p"}
Step 2: Method + uri + body + timestamp+ accessKey + accessSecret
POST/task/video/convert{"compress_ratio":"0.96","file_id":"f3c951583c95158b53803325a34cbe583c95158b","output_format":"avi","output_resolution":"360p"}
1609726786AKD3X39M-LGPJ1SDZVHNHJPXMKI1TWXU4-PQJ82N6Gaswfoigtdswxbrlgawd2ikzuz6g2pedz
Step3:Encryption Algorithm is to sequentially connect method + uri + body + timestamp+ accessKey + accessSecret into a string for md5 encryption.
fb81fac0bc6f816a5043b41141b539ee =
md5('POST/task/video/convert{"compress_ratio":"0.96","file_id":"f3c951583c95158b53803325a34cbe583c95158b","output_format":"avi",
"output_resolution":"360p"}1609726786AKD3X39M-LGPJ1SDZVHNHJPXMKI1TWXU4-PQJ82N6Gaswfoigtdswxbrlgawd2ikzuz6g2pedz')
Basic Required API Parameters
Basic Returned API Format