Retrieve a response

Returns a previously created response by id. With stream=true the response is delivered as server-sent events instead of a single JSON body, replaying the run from the beginning and continuing live if it is still going. Streaming a retrieve requires a response created with background: true; on any other response it returns a 400.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

response_idstringRequired

Query parameters

streambooleanOptionalDefaults to false

If true, replay the response as server-sent events. Requires a response created with background: true.

Response

The response object.
idstring
objectstring
statusenum

Lifecycle status. queued and in_progress mean the run is still going; completed, failed, cancelled and incomplete are terminal.

modelstring
outputlist of objects
usageobject
Token usage for the response.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error