I am writing to request assistance with a recurring issue I am experiencing when calling the Chat Completions API from within a Qualtrics survey. The endpoint works correctly when I use the “Test” function inside Qualtrics, but when I preview or run the actual survey, I consistently receive the following error:
“The server had an error processing your request. Sorry about that!”
This occurs even when I use a very simple request with no piped text (for example, asking the model to output “Hello from Qualtrics”). My API key is valid, and I am including the correct authorization header:
Authorization: Bearer <MY_API_KEY> Content-Type: application/json
The request is sent to:
POST https://api.openai.com/v1/chat/completions
Using this minimal JSON body:
{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Say: Hello from Qualtrics." } ], "max_tokens": 60 }
Although the Test function in Qualtrics succeeds, the preview environment repeatedly returns the server error above, and no response content is returned to my survey.
Could you please advise on the possible cause?
Is this issue related to my account, billing status, usage limits, or an internal server error on the model endpoint?
This API integration is part of my PhD research experiment, and resolving this issue is essential for my study design. I would be very grateful for any guidance or support you can provide.
Thank you very much for your assistance.
