Getting invalid image url in Batch API

I am using the Batch API to process a large number of images. However, I’m encountering a recurring issue where random requests within the batch are failing and returning the error code "invalid_image". The images are stored in a public S3 bucket, and I’ve verified that they are valid. The failures appear to be random since different requests fail in each batch, even when using the same set of images.

I have considered using base64 encoding for the images, but this approach is not feasible due to the 100MB limit on the JSONL file for the Batch API. Therefore, I must use image URLs.

Additionally, I’ve checked the S3 bucket logs via Server Access Logging, and there are no non-200 status codes, so I don’t think aws is blocking the open ai image scraper

What could be causing these random "invalid_image" errors, and how can I resolve this issue?

example of the error
{“id”: “batch_req_ig80WbViYtZkFqzMRCNSjkfa”, “custom_id”: “some_id”, “response”: {“status_code”: 400, “request_id”: “7a7283ee5c309f755980dc2b8be89c8f”, “body”: {“error”: {“message”: “Invalid image.”, “type”: “invalid_request_error”, “param”: null, “code”: “invalid_image”}}}, “error”: null}

Could you send the batch request file that you are sending so that we can check for any errors.
Thank you

How do I send it? I cant post links in the post
Here is the batch id if that helps batch_CKRSktqampZJL85zoPiIRd4P

If you cant send the link , you can just paste the code from the batch file.
The code looks similar to this

type or paste code here
```{"custom_id": "request-1", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-3.5-turbo-0125", "messages": [{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Hello world!"}],"max_tokens": 1000}}
{"custom_id": "request-2", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-3.5-turbo-0125", "messages": [{"role": "system", "content": "You are an unhelpful assistant."},{"role": "user", "content": "Hello world!"}],"max_tokens": 1000}}`Preformatted text`

here is the example json file

{"custom_id": "checkexamstart-0", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-0.jpg"}}]}]}}
{"custom_id": "checkexamstart-1", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-1.jpg"}}]}]}}
{"custom_id": "checkexamstart-2", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-2.jpg"}}]}]}}
{"custom_id": "checkexamstart-3", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-3.jpg"}}]}]}}
{"custom_id": "checkexamstart-4", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-4.jpg"}}]}]}}
{"custom_id": "checkexamstart-5", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-5.jpg"}}]}]}}
{"custom_id": "checkexamstart-6", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-6.jpg"}}]}]}}
{"custom_id": "checkexamstart-7", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-7.jpg"}}]}]}}
{"custom_id": "checkexamstart-8", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-8.jpg"}}]}]}}
{"custom_id": "checkexamstart-9", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-9.jpg"}}]}]}}
{"custom_id": "checkexamstart-10", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-10.jpg"}}]}]}}
{"custom_id": "checkexamstart-11", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-11.jpg"}}]}]}}
{"custom_id": "checkexamstart-12", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-12.jpg"}}]}]}}
{"custom_id": "checkexamstart-13", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-13.jpg"}}]}]}}
{"custom_id": "checkexamstart-14", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-14.jpg"}}]}]}}
{"custom_id": "checkexamstart-15", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-15.jpg"}}]}]}}
{"custom_id": "checkexamstart-16", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-16.jpg"}}]}]}}
{"custom_id": "checkexamstart-17", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-17.jpg"}}]}]}}
{"custom_id": "checkexamstart-18", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-18.jpg"}}]}]}}
{"custom_id": "checkexamstart-19", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-19.jpg"}}]}]}}
{"custom_id": "checkexamstart-20", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-20.jpg"}}]}]}}
{"custom_id": "checkexamstart-21", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-21.jpg"}}]}]}}
{"custom_id": "checkexamstart-22", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-22.jpg"}}]}]}}
{"custom_id": "checkexamstart-23", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-23.jpg"}}]}]}}
{"custom_id": "checkexamstart-24", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-24.jpg"}}]}]}}
{"custom_id": "checkexamstart-25", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-25.jpg"}}]}]}}
{"custom_id": "checkexamstart-26", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-26.jpg"}}]}]}}
{"custom_id": "checkexamstart-27", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-27.jpg"}}]}]}}
{"custom_id": "checkexamstart-28", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-28.jpg"}}]}]}}
{"custom_id": "checkexamstart-29", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-29.jpg"}}]}]}}
{"custom_id": "checkexamstart-30", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-30.jpg"}}]}]}}
{"custom_id": "checkexamstart-31", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-31.jpg"}}]}]}}
{"custom_id": "checkexamstart-32", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-32.jpg"}}]}]}}
{"custom_id": "checkexamstart-33", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-33.jpg"}}]}]}}
{"custom_id": "checkexamstart-34", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-34.jpg"}}]}]}}
{"custom_id": "checkexamstart-35", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-35.jpg"}}]}]}}
{"custom_id": "checkexamstart-36", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-36.jpg"}}]}]}}
{"custom_id": "checkexamstart-37", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-37.jpg"}}]}]}}
{"custom_id": "checkexamstart-38", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-38.jpg"}}]}]}}
{"custom_id": "checkexamstart-39", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-39.jpg"}}]}]}}
{"custom_id": "checkexamstart-40", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-40.jpg"}}]}]}}
{"custom_id": "checkexamstart-41", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-41.jpg"}}]}]}}
{"custom_id": "checkexamstart-42", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-42.jpg"}}]}]}}
{"custom_id": "checkexamstart-43", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-43.jpg"}}]}]}}
{"custom_id": "checkexamstart-44", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-44.jpg"}}]}]}}
{"custom_id": "checkexamstart-45", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o", "response_format": {"type": "json_object"}, "messages": [{"role": "user", "content": [{"type": "text", "text": "please check the exam and return the following json ```is_exam_start: boolean```"}, {"type": "image_url", "image_url": {"url": "https://checkpoint-exams-split-images.s3.ap-south-1.amazonaws.com/checkpoint-1/441-3-null-english/441-3-null-english-45.jpg"}}]}]}}

I’m not sure why you need to make the images publicly available to the world when presenting images to the model, whether it’s for batch processing or API calls…

In any case, check that the Content-Type field of the image files within the Amazon S3 bucket is correctly set to an appropriate MIME type, such as image/jpeg for JPEG images, and make sure that the bucket policy allows public access.

I made them public so gpt could access them, as for the type it is showing up as jpg

but in metadata it shows up as binary/octet-stream

but like I mentioned in the post, the failed images are random and there are no non-200 status codes in aws s3 bucket server access logs and i’m also not seeing any get request for these failed images in the logs.

As an example, you can set the bucket policy as follows:

{
    "Version": "2024-07-10",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:{S3 bucket name goes here}/*"
        }
    ]
}

Additionally, you might want to consider setting the metadata for each image object to image/jpeg.

I’ve heard this before. I think it just borks out at times even if it’s a good image, etc.

Maybe collect all the fails at the end and send a second batch? Or do the same images fail all the time?

Yes, it’s frustrating, but I’m not sure a lot can be done at this time.

What’s the error rate for a large batch?

Maybe collect all the fails at the end and send a second batch?

Yes, I am doing something similar, I am retrying all the failed requests using the completion API and then merging the results. This works

do the same images fail all the time?

No, when I retry the batch requests again other random images which worked in the previous batch fail.

What’s the error rate for a large batch?

So far, for a batch with 298 requests, 69 failed
I tried with a smaller batch of 46 requests and 7 failed.