Bug in batch api on image_url

When using batch api, for the sample input jsonl file, when removing the body.response_format field, it works fine with image_url passed in as url.

with the body.response_format field

getting this error

{"id": "batch_req_67291ee0c6788190969702ec54aa8132", "custom_id": "request_-6945958128825822861", "response": {"status_code": 400, "request_id": "9745167bf61122ced4a9038d274f5563", "body": {"error": {"message": "Invalid image URL: 'messages[1].content[1].image_url.url'. Expected a base64-encoded data URL with an image MIME type (e.g. 'data:image/png;base64,aW1nIGJ5dGVzIGhlcmU='), but got a value without the 'data:' prefix.", "type": "invalid_request_error", "param": "messages[1].content[1].image_url.url", "code": "invalid_value"}}}, "error": null}

Producing an error reported on a different input key may mean that your escaping is not correct for JSON within JSON. Or that the batch API can’t handle things like characters of $ref – or sending response_format at all.

Report back: does removing the images from message content work, or do you get other errors with the response_format as sent?

Does your API request line sent as JSON bytes to the chat completions endpoint work?