Generations
Get a generation
Returns a single generation record by ID, including its status and the structured error payload when the generation failed (e.g. because the upstream AI provider returned an error).
get/v1/projects/{project_id}/generations/{generation_id}
Request
- Base URL: https://api.naturali.ai
- URL: https://api.naturali.ai/v1/projects/{project_id}/generations/{generation_id}
- 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
generation_idstring required
Public ID of the generation
Response
Generation details
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.