Purge generation content
Clears the generation's content — metadata, error, extraction, and the internal recovery state of a paused run — and stamps content_redacted_at.
The usage and audit skeleton is preserved: ids, timestamps, status, stop reason, and the attribution fields (action_id, trigger_id, orchestration_run_id, node_id, node_attempt, agent_version, routing) the billing ledger reads. A purged generation reads back as that skeleton, not a 404.
This does not delete the parent trace's steps object, which holds this generation's content alongside its siblings'. To erase the run's content completely, purge the trace (DELETE /v1/projects/{project_id}/traces/{trace_id}/content), which cascades here.
Idempotent — purging an already-purged generation succeeds and leaves the original content_redacted_at in place.
Request
- Base URL: https://api.naturali.ai
- URL: https://api.naturali.ai/v1/projects/{project_id}/generations/{generation_id}/content
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)
Path parameters
Public ID of the generation
Response
The purged generation skeleton
Example response
{
"id": "gen_V1StGXR8Z5jdHi6B",
"started_by_principal_type": "user",
"started_by_principal_id": "user_V1StGXR8Z5jdHi6B",
"status": "failed",
"stop_reason": "error",
"error": {
"code": "AI_PROVIDER_ERROR",
"message": "Provider returned 402: insufficient credits"
},
"tool_surface": {
"tools": 61,
"bytes": 152161,
"estimated_tokens": 45148
},
"retrieval": [
{
"source_type": "document",
"document_id": "doc_V1StGXR8Z5jdHi6B",
"document_version": 3,
"chunk_id": "dchunk_V1StGXR8Z5jdHi6B",
"page": 2,
"similarity_score": 0.82
}
],
"idempotency_key": "discord-1287654321098765432",
"metadata": {
"author": "John",
"revision": 2
},
"content_redacted_by_principal_type": "user",
"content_redacted_by_principal_id": "user_V1StGXR8Z5jdHi6B"
}Changes
No recorded changes to this operation across all 1 revision of this API.