Sample - OpenAI API
GET/agents/sessions/{session_id}/artifacts/{artifact_id}

Retrieve an agent session artifact

Retrieves immutable metadata for one durable session artifact. See session artifacts.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
session_idstringrequired
The ID of the session that owns the artifact.
artifact_idstringrequired
The immutable session artifact ID.

8 status codes
200The requested session artifact.
idstringrequired
The immutable artifact ID.
objectstringrequired
The object type. Always `agent.session.artifact`.
Allowed:agent.session.artifactDefault:agent.session.artifact
session_idstringrequired
The ID of the session that owns the artifact.
environment_idstringrequired
The ID of the environment that produced the artifact.
turn_idstringrequired
The ID of the completed turn that published the artifact.
pathstringrequired
The original absolute file path in the execution environment.
size_bytesintegerrequired
The immutable artifact size in bytes.
created_atintegerrequired
The Unix timestamp, in seconds, when the artifact was published.
400The request was invalid.
errorobjectrequired
The error returned by the API.
401Authentication or project context was missing.
errorobjectrequired
The error returned by the API.
403The API key lacks the required Responses permission.
errorobjectrequired
The error returned by the API.
404The requested session or event was not found.
errorobjectrequired
The error returned by the API.
409The request conflicted with the current session state.
errorobjectrequired
The error returned by the API.
500An internal error occurred.
errorobjectrequired
The error returned by the API.
503The service is temporarily unavailable.
errorobjectrequired
The error returned by the API.

Error handling

A 400 is returned: The request was invalid. A 401 is returned: Authentication or project context was missing. A 403 is returned: The API key lacks the required Responses permission. A 404 is returned: The requested session or event was not found. A 409 is returned: The request conflicted with the current session state. A 500 is returned: An internal error occurred. A 503 is returned: The service is temporarily unavailable.