HTTP/1.1 400 Bad Request with GPT-4 Vision Preview

I keep running into HTTP Request: POST “HTTP/1.1 400 Bad Request” errors using the Python API on some queries using GPT-4 Vision Preview.

This is the code:

response =

It worked fine until a couple of days ago without ever returning errors.
Now, it happens very incosistently on some messages, others work. Messages is valid json code every time and has the same number of tokens.
Any ideas on why this happens? Thanks a lot in advance!

Any lick with ChatGPT4 or turbo
Beta for us?

GPT-4 Turbo works fine also running GPT-4V Preview with example images. Also some of my inputs work, others give the HTTP 400 Bad Request response, usually after 2-3 requests that work okay. Then I have to wait and restart.

Hi, and thanks,

But how do I get GPT-4 Turbo?


GPT-4 turbo is called GPT-4-1106-preview in the API, so you may already have access to it without realizing :laughing:

1 Like

N2U, spot on, I do have it Yayeee!

And thank you.


1 Like

Yayeee , your spot on and yes I do have it.

Always happy to help :heart:
(I was also a bit confused about this to begin with)

OMG! I love Turbo, understand your al so critical, but man - for us users and mear mortals, like4 this user, its a - game changing - life changer! To all those minds at open, thank you.

Ok great. Any ideas on the original problem ? :smiley:

1 Like

Hi, I have run into this 400 Bad request problem with got-4-1106-preview. It seems to happen with non-trivial ‘content’ from ‘system’ and ‘assistant’. When content is from user it seems to work fine.
Has anyone found a solution? It/d be greatly appreciated to get past this blocking issue.

You have different model names in your title and body.

However, you can follow this link to the API Reference, expand messages, and discover that the only role that supports anything other than “string” contents is user.