Converts the uploaded file to the target format. We recommend running it in the async mode based on mode strategy.
Converts the uploaded file to the target format. We recommend running it in the async mode based on mode strategy.
The output format. If the output format also has a type, separate it with a hyphen.
The input format. If the input format also has a type, separate it with a hyphen.
If this parameter key is not sent, The uploaded file extension (and maybe with a default type) is assumed.
POST https://api.vertopal.com/v1/convert/file
Authorization: Bearer [APP_TOKEN]
data={
"app": "[APP_ID]",
"connector": "[CONNECTOR]",
"include": ["entity", "result"],
"mode": "async",
"parameters": {
"output": "jpg"
}
}
curl -L -X POST 'https://api.vertopal.com/v1/convert/file' \
-H 'Authorization: Bearer [APP_TOKEN]' \
-F 'data={
"app": "[APP_ID]",
"connector": "[CONNECTOR]",
"include": ["entity", "result"],
"mode": "async",
"parameters": {
"output": "jpg"
}
}'
vertopal api -v 1 convert/file \
--app "[APP_ID]" \
--token "[APP_TOKEN]" \
-F data='{
"app": "%app-id%",
"connector": "[CONNECTOR]",
"include": ["entity", "result"],
"mode": "async",
"parameters": {
"output": "jpg"
}
}'
from vertopal.api.v1 import API
API.convert(
output_format="jpg",
app="[APP_ID]",
token="[APP_TOKEN]",
connector="[CONNECTOR]",
input_format=None,
mode=API.ASYNC,
)
use Vertopal\API\Credential;
use Vertopal\API\V1;
require "vendor/autoload.php";
$credential = new Credential("[APP_ID]", "[APP_TOKEN]");
V1::convert(
"jpg",
$credential,
"[CONNECTOR]",
null,
V1::ASYNC
);
The connector for connecting to another task as the data key.
The status of the conversion.
The time elapsed until the conversion was finished in seconds.
The task has been executed successfully without any errors.
The conversion has failed.
The [INPUT] format is not found in the valid input formats.
The [OUTPUT] format is not found in the valid output formats.
The file extension ([FILE_EXTENSION]) does not match the input extension ([INPUT_EXTENSION]).
There is no converter for [INPUT] format to [OUTPUT] format.
The input format has the wrong structure.
The output format has the wrong structure.
{
"entity": {
"id": "[ENTITY_ID]",
"type": "task",
"endpoint": "v1/convert/file",
"status": "running",
"vcredits": 0,
"created_at": "2023-03-23 15:20:05",
"started_at": "2023-03-23 15:20:07",
"completed_at": null
},
"result": {
"output": {},
"error": {},
"warning": {}
}
}