I’ve been having this problem for the last 10 days. I get this error on most of my requests with more than 5000 tokens and I end up looping the request and trying and I get 10 bad requests in a row. For requests with less than 400 tokens, I get 1 error in 5-10 requests. I have tried all the ways I can think of and I am about to give up, please someone show me the way out
The api endpoint I use is: https://api.openai.com/v1/chat/completions
Coding language I use: pure php and curl. no libraries
Below are all the responses. I have saved in my database