Skip to main content
POST /v1/responses has ordinary relay and task-plugin paths. A plugin must declare background support to accept background mode, and inputs must match its model. An ordinary upstream returning a resp_ ID does not mean the platform can retrieve it with GET.

Create and retain

Set background: true on a verified Responses request for a background-capable plugin model, and retain the returned id and status. Use the input already verified for that model; not every media plugin accepts plain conversational text. Submission usually returns queued or in_progress, but may complete quickly. stream and background are separate options. Do not construct a response ID by manually changing a task ID prefix. Persist the returned ID with its business request so refreshes and timeouts do not cause duplicate submissions.

Retrieve an existing response

GET /v1/responses/{response_id} retrieves only host-recorded plugin task responses, scoped to the calling user and project. Discarded results, unavailable plugins, or IDs outside that identity can return 404. There is no general proxy retrieval for arbitrary upstream responses. This example only reads an existing response, up to a bounded number of attempts. Install the Python example dependencies and run:

Status and application results

The current host primarily returns queued, in_progress, completed, and failed. The example also rejects incomplete and cancelled so unsuccessful terminal states cannot become success. Completed output may contain media or other items rather than text. The script only reports lifecycle completion; it does not download artifacts or turn refusals into text answers. Applications must still validate content appropriately. HTTP failures or exhausted local polling attempts do not cancel the task. To resume later, query the same ID. This endpoint returns JSON snapshots; it does not currently provide SSE resumption, starting_after replay, or REST deletion / cancellation. Video tasks use separate video endpoints. Confirm response, data, and artifact retention with the operator. 阅读中文