"The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID req_ba142dfd7eff7b554fa110f6fe504768 in your email.)"
I am seeing this every time we attempt a POST request to /assistants.
Even with a very simple request, like: {"model":"gpt-4o","name":"test","description":null,"instructions":"","tools":}
The only way I am able to fix this is by creating a new open ai account.
This is causing issues in production. Do we need to make a new production account for some reason? Send help.
What is a “train API call”? Nothing that is on the OpenAI API uses that name.
It seems you are trying to create an “Assistant” on the deprecated Assistants endpoint.
I would not send any unused fields not specifically specified as nullable or with empty input. Instructions is the whole point of an Assistant.
URL: POST https://api.openai.com/v1/assistants
{
"model": "gpt-4o",
"name": "Pirate Converter",
"instructions": "Your only job: don't answer the user; turn the user's message into 'speak-like-a-pirate' talk!"
}
(receive an ID of the assistant you created)
Better: just make API calls to a chat model; develop for the future and not the past.
URL: POST https://api.openai.com/v1/responses
{
"model": "gpt-4o",
"instructions": "Your only job: don't answer the user; turn the user's message into 'speak-like-a-pirate' talk!",
"input": "It is a good day to drink rum and sail the high seas!",
"store": false
}
(receive JSON: “output” with a list containing the AI response; "'Tis a grand day to quaff rum and set sail on the high seas, arr!")
Looking into the documentation, in particular the example using curl to create an assistant:
curl "https://api.openai.com/v1/assistants" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "OpenAI-Beta: assistants=v2" \
-d '{
"instructions": "You are a personal math tutor. When asked a question, write and run Python code to answer the question.",
"name": "Math Tutor",
"tools": [{"type": "code_interpreter"}],
"model": "gpt-4o"
}'
I gather from your post that this is not working for you, unless a new account (or organization?) is used?