OAI-SE Responses API & Vector Stores MEDIUM
PRODUCTION SCENARIO
A customer support portal starts a long-running Responses API request with background set to true. The creation call returns HTTP 200 with status queued, and the UI renders an empty answer as if the work had finished.

How should the application wait for the answer and determine whether generation succeeded?

Answering here is anonymous. Nothing is saved unless you sign in.

Show answer and explanation

Answer: Poll the response by ID while status is queued or in_progress, then read its final status

A background response is acknowledged while still queued, so the client polls by ID while status is queued or in_progress and then branches on the terminal status, handling failed, cancelled and incomplete explicitly. Waiting for non-empty text never terminates on a failed or incomplete response, retrying on empty output duplicates in-flight work, and turning background off restores the timeouts it was introduced to avoid.
Free

Keep practicing OAI-SE

24 original OAI-SE practice questions, each with an explanation and a source link. No account needed.

Start free practice set → Timed, explained, free