Getting error code 400 on both Vision and PDF base64 input - Response API
OpenAI Developer Community
June 6, 2026
Well, I fixed it: Both Vision and PDF base64 issues:
Images : The curly brackets needed to be removed.
“type”: “input_image”, “image_url”: “data:image/jpeg;base64, {base64_image}”
PDFs : The space before base64_file needed to be removed.
“file_data”:“data:application/pdf;base64, base64_file ”
Don’t know why these issues were not raised over the last year. Go figure… I quess Codex could have picked it up, but I prefer to keep my brain active - helps when one gets older. Time to take a nap…
Discussion in the ATmosphere