Vertopal
API Menu

Quick Start

Here the simplest flow of Vertopal API requests is explained, to quickly get started.

1. vCredits
Make sure you have enough vCredits to run the tasks or your app is in development status that have development files.
Also, make sure your plan is set to Premium.

2. Authentication
Before starting anything, you need to make sure that you have the App ID and access token of the app because all requests require authentication.
If you don't have credentials, create an APP.

3. Upload
Select your input file and upload it via the upload task.

POST https://api.vertopal.com/v1/upload/file
Authorization: Bearer [APP_TOKEN]

data={
    "app": "[APP_ID]"
}
file=@"/path/to/sample.png"

Store the connector output key of the response in the session, database, file, or somewhere similar.

4. Convert
Now you can convert the uploaded file using the convert task. To connect the previous task, use the connector output key as the connector data key in the convert task.

POST https://api.vertopal.com/v1/convert/file
Authorization: Bearer [APP_TOKEN]

{
    "app": "[APP_ID]",
    "connector": "[UPLOAD_OUTPUT_CONNECTOR]",
    "parameters": {
        "output": "jpg"
    }
}

Please note that this task is executed in a sync mode for better understanding. You should use it in async mode, because in sync mode you may have problems with large files based on mode strategy.
Store the connector output key of the response in the session, database, file, or somewhere similar.

5. Download
You can download the converted file through the URL. For this, you must first request to generate an URL.

POST https://api.vertopal.com/v1/download/url
Authorization: Bearer [APP_TOKEN]

{
    "app": "[APP_ID]",
    "connector": "[CONVERT_OUTPUT_CONNECTOR]"
}

Store the connector output key of the response in the session, database, file, or somewhere similar.

6. Get File
Download the converted file using the URL and save it in a specific location.

POST https://api.vertopal.com/v1/download/url/get
Authorization: Bearer [APP_TOKEN]

{
    "app": "[APP_ID]",
    "connector": "[DOWNLOAD_OUTPUT_CONNECTOR]"
}

So easily! The process is complete and you download your converted file.

Tip
use the Vertopal CLI, if you don't need an advanced API endpoint and you only want to do the conversion.

vertopal convert sample.png --to jpg
Loading, Please Wait...