Get a request's content
The prompt and response kept for one request when the Log content Directive was on. Needs a key with the Read logged content permission. Every read is recorded in the audit log.
Path
- idstringrequired
A
req_…id from theX-Request-IDheader,error.request_id, usage or Logs. It must be a request of the key's own project, made with any of the project's keys in any of its environments.
Response
- requestobject | stringrequired
The body you sent, as received: the JSON parsed, or the text kept when it was cut at the size cap. Headers are never kept, so neither is your API key.
- responseobject | string | nullrequired
What came back: the JSON returned, a stream's output assembled from its events, an embeddings response without its vectors, or the error Inference Bureau returned.
nullwhen the request ended with nothing to keep. - response_kindstring | nullrequired
json,stream,embeddingsorerror. - truncatedobjectrequired
requestandresponse: whether that body was longer than 256 KB and was cut. - bytesobjectrequired
requestandresponse: each body's size before the cut, in bytes of UTF-8. - created_atstringrequired
When the content was stored.
- expires_atstringrequired
When it is deleted: 7 or 30 days after it was stored, by
data.contentRetentionDays.
Errors
- 403 policy_deniedoptional
The key doesn't hold
content:read. Checked before the id is looked at, so it says nothing about any request. - 404 not_foundoptional
No content for this id in the key's project: a request of another project or team, an unknown id, one made with Log content off or Require ZDR on, or content that expired or was deleted when logging was turned off. All of them answer the same.
- 401 invalid_api_keyoptional
No key, an unknown or revoked one, or a management key: management keys can't read content.
- 429 rate_limit_exceededoptional
More than 60 reads in a minute with one key, apart from its inference limits. Retry after
Retry-Afterseconds.
Each successful read writes request.content.view to the team's audit log under key:<id>, as opening the content in Logs does under your user. Content is never part of the request receipt, usage or the Logs export, and the response is sent with Cache-Control: no-store.