def test_add_documents_for_private_images(self):
        """A test to add documents with private images using media_download_headers and image_download_headers."""
        documents = [
            {
                "image_field_1": "https://d2k91vq0avo7lq.cloudfront.net/ai_hippo_realistic_small.png",
                "text_field_1": "A private image with a png extension",
                "_id": "1"
            },
            {
                "image_field_1": "https://d2k91vq0avo7lq.cloudfront.net/ai_hippo_realistic_small",
                "text_field_1": "A private image without an extension",
                "_id": "2"
            }
        ]

        kwargs_list = [
            {"media_download_headers": {"marqo_media_header": "media_header_test_key"}},
            {"image_download_headers": {"marqo_media_header": "media_header_test_key"}}
        ]

        for index_name in [self.unstructured_image_index_name, self.structured_image_index_name]:
            tensor_fields = ["image_field_1"] if (
                    index_name == self.unstructured_image_index_name) else None
            for kwargs in kwargs_list:
                with self.subTest(f"{index_name} - {kwargs}"):
                    res = self.client.index(index_name).add_documents(
                        documents, tensor_fields=tensor_fields,
                        **kwargs
                    )
                    self.assertEqual(False, res["errors"], res)
                    self.assertEqual(2, self.client.index(index_name).get_stats()["numberOfDocuments"])
                    self.assertEqual(2, self.client.index(index_name).get_stats()["numberOfVectors"])
A test to add documents with private images using media_download_headers and image_download_headers.
tests/api_tests/v1/tests/api_tests/test_add_documents_common.py