Vertopal — Free Online Converter
API Menu

Mode Strategy

For ease of the use of API, tasks are run in sync mode by default.
Depending on how you use the Vertopal API, you can decide whether the tasks will be run in sync or async mode, but we always recommend running all tasks in sync unless the task may take a long time, such as a convert file task.
Network systems may time out the request if an open request takes a long time due to no data transfer.
Here the difference between sync and async mode is more discussed.

After the task is run, the app must wait for a response stating that the task has been completed.
During all this time, the request will be blocked until the final response is received.
Now suppose a convert task takes a few hours, in this case, your app has an open request all this time and may be timed out by a network system at any moment.

After the task is run, the app will immediately receive a response that specifies the task's status, typically running.
The app no longer waits for a response that indicates the task is completed, and the request will be non-blocked for the final response.
In this case, there are several scenarios to get the final response:

  • Monitoring Response: You can see the response to any task at any time by requesting in specific time periods using Monitor Response of Task. When seeing that the task is completed, this is the final response.
  • A callback URL: By specifying a URL in the callback data key, Vertopal will POST the final response after completing the task.

In the async mode, note that if the ["result"] (the default value) is set for the include data key, most of the time you will get a response with an empty result. In this case, we recommend setting ["entity", "result"] as the minimum value for the include data key to get the status of the task.


The example code of this section shows the structure of the Mode Strategy request. You may see the other request structure keys such as data keys and see how to request is authenticated.

Authorization: Bearer [APP_TOKEN]

"app": "[APP_ID]",
"mode": "async",
"callback": "",
"include": ["entity", "result"]

curl -L -X POST '' \
-H 'Authorization: Bearer [APP_TOKEN]' \
-F 'data={
"app": "[APP_ID]",
"mode": "async",
"callback": "",
"include": ["entity", "result"]


HTTP Status Codes

OK 200

The task has been executed successfully without any errors.


The callback is invalid.


The domain of callback is not verified.

The example code of this section shows the structure of the Mode Strategy response. You may see the other response structure keys such as entity keys.

"entity": {
"type": "task",
"endpoint": "v1/example/long/task",
"status": "running",
// other entity keys
"result": {
"output": {},
"error": {},
"warning": {}

Loading, Please Wait...