I created an assistant via the API (using Postman), with “retrieval” tool, empty instructions, and the “gpt-4-turbo-preview” as a model . Using the Assistant Playground I was able to start a thread with a single message and file and got the expected result. When I run a similar API call sequence from Postman - i.e. create a thread → add a message with the proper file_id → run the thread with the same assistant_id → retrieve the run details, I get:
"status": "failed",
...
"last_error": {
"code": "server_error",
"message": "Sorry, something went wrong."
}
I compared the payload of the API calls from the browser to the one from Postman and I do not see any difference. I may be missing something but I cannot see what.
Update Feb 16: I am experiencing the same issue even when trying the scenario described in the Assistants Overview page: it runs fine in the browser, it fails with node.js, curl and postman…
3 Likes
The issue seems to have been related to the API key - which was originally created as “restricted” but with pretty much all permissions enabled. After I changed it to “all” permissions, it started working.
1 Like
No I don’t think so. If you API key had had an issue, it should have explicitly told you so.
server_error
is literally that.
There has been a lot of instability on the API very recently, and whilst it’s got better it still is a little unreliable.
Sometimes you get errors like this:
{
"error" : {
"message": "The server had an error while processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID asdfasdfasdfasdfasdf....................... in your message.)",
"type" : "server_error",
"param" : null,
"code" : null
}
}
And other times like this:
{
"error" : {
"message" : "The server had an error while processing your request. Sorry
about that!",
"type" : "server_error",
"param" : nil,
"code" : nil
}
}
Then again, you could have been suffering from both issues!
You may be right, I am just sharing my experience so far - I tried all possible ways and I could actually reproduce the error by switching API keys. It worked well with the browser session token, it did not work with my original key, it did work with a new key with “all permissions” and also it did start working in few minutes after upgrading the original “restricted” key to “all” permissions. With the original key the API calls were successful, the only glitch was during the run.
1 Like
Thanks!
I’ve spend a few days debugging:
"message" : "The server had an error while processing your request. Sorry
about that!",
"type" : "server_error",
Swapping a restricted api key for an all access api key solved the issue.
I have just had the same experience. I wish the error message was more descriptive.
This workaround helped me too. Thanks for sharing!