GPT-4o / gpt-4-turbo API sends error 500 when providing images

We can’t see what image you are trying to send and if the mime type matches the image format, which must be a properly-formed file, not a byte stream.

example code to load image from file: