Link Search Menu Expand Document

How to run a background job

We’ve designed a special async mode that is available for almost all endpoints.

In this mode you can process large input files. It is recommended for use by default.

If your call takes more than 25 seconds then you need to run it as a background job that can work for up to 15-20 minutes and can process large documents and files.

When you set async param to true, your call returns jobId param containing unique ID of your background job. Use /job/check to read a background job status to find when your output file is ready for download.

Step by step:

  1. Add the async parameter and set it to true. 2 Enable async mode by setting async input parameter to true. This will tell API method to create background job and immediately return unique id of this new background job in jobId property in the output along with the final url. Use this url to access the output file (if any) once the job is finished.
  2. Now check the status of that new background job using /job/check with jobId parameter set to the jobId value from the previous step. Repeat and check until it returns status as success. Recommended interval for checking is 1-2 seconds for small documents and 10-15 seconds for large documents.