Skip to content

Image Downloads

Using Headers

The add_documents, update_documents, and search endpoints all download images (provided the input includes a downloadable image URL). In certain instances, headers will be needed to authenticate these URLs before image download.

In cases like these, use the image_download_headers parameter to specify these headers in A JSON-serialised, URL encoded dictionary. See example usage below:

Image download headers usage in add_documents

import marqo

mq = marqo.Client(url="http://localhost:8882")


            "Title": "Treatise on the future of hippos",
            "img": "",
    image_download_headers={"Authorization": "iu498nc1n89v48v6w4f"},
    image_download_headers={"Authorization": "iu498nc1n89v48v6w4f"},