Finding the only one I found that seems satisfactory has been link , follow links:
Short documentation:
PHP:
Java
Limitations of the free version
- Maximum 30 conversions per day (every 24 hours)
- Maximum upload limit per file is 100 Megabytes
(Really for something free this surprised me)
How to use
The process is done by REST using a JSON like this:
POST /jobs HTTP/1.1
Host: https://api2.online-convert.com
X-Oc-Api-Key: <sua chave da API key deve vir aqui>
Content-Type: application/json
{
"input": [{
"type": "remote",
"source": "http:\/\/site\/arquivo"
}],
"conversion": [{
"target": "wav"
}]
}
Change <sua chave da API key deve vir aqui>
by your access key (you need to register at link )
If you want to use PHP-ready classes, do so (using onlineconvert-api-sdk-php ):
<?php
define('API_KEY', 'sua chave da API key deve vir aqui');
require 'vendor/autoload.php';
$config = new \OnlineConvert\Configuration();
$config->setApiKey('main', API_KEY);
$client = new \OnlineConvert\Client\OnlineConvertClient($config, 'main');
$syncApi = new \OnlineConvert\Api($client);
The example is sync, but it can also be async:
$asyncApi = new \OnlineConvert\Api($client, true);
Note that it uses autoload, since the installation is done by composer
, that is, if you want to do "manually" it will be a bit laborious because it is necessary to study and understand composer
and autoload
. p>