Conversion Examples

Multiple outputs instead of zip

When creating a conversion that generates more than one output file – for example from video to images – the output will be a zip archive containing all the output files.

This behavior can be changed to download each file individually. For this, the allow_multiple_outputs option hasto be specified.

After sending this request, the job information received via callback or polling the status, you will receive a long list of elements inside the output section. In the example mentioned above, this equals one output per frame in the video.

POST /v2/jobs HTTP/1.1
Host: https://api.api2convert.com
X-Oc-Api-Key: <your API key here>
Content-Type: application/json
{
    "input": [{
        "type": "remote",
        "source": "https://example-files.online-convert.com/video/example.avi"
    }],
    "conversion": [{
        "category": "image",
        "target": "jpg",
        "options": {
            "allow_multiple_outputs": true
        }
    }]
}

Getting an image text to a document

To extract the textual information from an image, Optical Character Recognition (OCR) technique is utilized. OCR is a technology that recognizes the text characters from an image and converts it into machine-readable text. It works by analyzing the pixel pattern of the input image and matches it with a known set of character patterns to recognize the characters.
Our API provides two AI-powered OCR engines to extract text from your images. The first OCR engine is named scan and is optimized to extract text from clean document pages captured using a scanner or camera. The accuracy of the output is directly related to the quality of the input image, and the optimal conditions for this engine are 300dpi resolution, black text on a white background, and a character height of around 20pts.
However, if these optimal conditions cannot be met, or if the expected results are not achieved, we offer a second OCR engine called picture. This engine is designed to extract text from any source image and is capable of recognizing text even in noisy images. Please note that using the "picture" OCR engine may result in the loss of formatting in paragraphs. However, the textual information will still be recognized with a high degree of accuracy.

Please note that the language option can be set to specify which language the text is in. This can lead to a better conversion result.

POST /v2/jobs HTTP/1.1
Host: api.api2convert.com
x-oc-api-key: <your API key here>
Content-Type: application/json
Cache-Control: no-cache

{
    "input": [{
        "type": "remote",
        "source": "https://example-files.online-convert.com/raster%20image/png/example.png"
    }],
    "conversion": [{
        "category": "document",
        "target": "txt",
        "options": {
            "ocr": true
            "language": "eng",
            "ocr_engine": "scan"
        }
    }]
}