NAV
python

Welcome to PDF.to API documentation

To get a developer key please go todeveloper portal

Authorization: <api_key>

Convert from PDF

PDF to DOCX

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to DOC

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to JPG

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to PNG

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to XLSX

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to XLS

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to PPTX

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to PPT

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to TXT

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to HTML

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to ODT

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to CSV

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to ePub

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to TIFF

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to BMP

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to SVG

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to ZIP

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to WebP

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to GIF

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PDF to PSD

import requests

file_names = ["/path/to/file.pdf"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

Convert to PDF

DOCX to PDF

import requests

file_names = ["/path/to/file.docx"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

DOC to PDF

import requests

file_names = ["/path/to/file.doc"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

import requests

file_names = ["/path/to/file.xlsx"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

DOCX to PDF

import requests

file_names = ["/path/to/file.xls"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

JPG to PDF

import requests

file_names = ["/path/to/file.jpg"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PNG to PDF

import requests

file_names = ["/path/to/file.png"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PPTX to PDF

import requests

file_names = ["/path/to/file.pptx"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PPT to PDF

import requests

file_names = ["/path/to/file.ppt"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

TXT to PDF

import requests

file_names = ["/path/to/file.txt"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

HTML to PDF

import requests

file_names = ["/path/to/file.html"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

ODT to PDF

import requests

file_names = ["/path/to/file.odt"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

CSV to PDF

import requests

file_names = ["/path/to/file.csv"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

ePub to PDF

import requests

file_names = ["/path/to/file.epub"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

BMP to PDF

import requests

file_names = ["/path/to/file.bmp"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

SVG to PDF

import requests

file_names = ["/path/to/file.svg"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

TIFF to PDF

import requests

file_names = ["/path/to/file.tiff"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

WebP to PDF

import requests

file_names = ["/path/to/file.webp"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

GIF to PDF

import requests

file_names = ["/path/to/file.gif"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list

PSD to PDF

import requests

file_names = ["/path/to/file.psd"]
api_key = '<YOUR_API_KEY>'

domain = 'https://api.pdf.to'
api_version = 'api/v1/'
headers = {'Authorization': api_key}

def myfiles():
    files = [('image', open(f, 'rb')) for f in file_names]
    r = requests.post("%s/%simage/" % (domain, api_version), files=files, headers=headers)
    return r.json()

def get_results(job_name, count, type):
    r = requests.post("%s/%sresults/" % (domain, api_version), data={'job_name': job_name, 'count': count, "type": type})
    return r.json()

def download_file(url):
    local_filename = url.split('/')[-1]
    with requests.get(url, stream=True) as r:
        r.raise_for_status()
        with open(local_filename, 'wb') as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)

image = images()
if not image.get('error'):
    results = get_results(image['job_name'], image['count'], image['type'])
    while not results['finished'] or not results['error']:
        results = get_results(word['job_name'], word['count'], word['type'])
        results['finished'] = results['finished']
        time.sleep(5)
        if results['finished']:
            print(results['finished'])
            break
    for f in results['files']:
        file = download_file(f[0])
        print(file)

Will return

/path/to/local/file_processed.png

To make multiple simply put more files in your list