Retrieve a response

Retrieve a previously created response by its ID.

GET /responses/{response_id}

Retrieve a stored model response by ID.

Parameters

Path parameters

FieldTypeRequiredDescription
response_idstringYesThe ID of the response to retrieve.

Query parameters

FieldTypeRequiredDescription
streambooleanNoIf set to true, the response is streamed back as server-sent events as its events become available, terminated by a data: [DONE] sentinel. Streaming is only available for in-progress background responses.
starting_afterintegerNoWhen streaming, only events with a sequence number greater than this value are sent (used to resume a stream). Defaults to streaming from the first event.

Response

HTTP 200 — OK

Content Type: application/json

Response

Content Type: text/event-stream

ResponseStreamEvent

python
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.meta.ai/v1",
api_key=os.environ["MODEL_API_KEY"],
)
response = client.responses.retrieve("resp_abc123")
print(response.model_dump_json(indent=2))

For usage examples and previous_response_id patterns, see the Responses feature page.