background to true on POST /v3/router/responses. The AI Gateway stores the response, returns its ID with status: "queued", and processes it asynchronously.
Poll GET /v3/router/responses/{response_id} with the same ID until the response reaches a terminal status. See the Responses API reference for the complete request and response schema.
Quick start
The following examples submit a background response, then poll until processing finishes. Setstore to true; background responses require stored responses.
Response lifecycle
The create request returns the response object with a stableid. Retrieve that same object while it progresses through the following statuses:
Completed responses include
output and completed_at. Failed responses retain the response ID so the error can be retrieved with the same GET request.
Configuration and limitations
Background execution uses the standard Responses API model, input, tools, and response schema. The asynchronous behavior changes when the result becomes available, not the shape of the final response.