{ "data": { "templateId": "insight-narrative-v1", "outputSnapshot": { "version": 1, "generatedAt": "2026-07-08T10:00:00Z", "templateId": "insight-narrative-v1", "scope": { "level": "organization", "label": "Acme Inc." }, "period": { "start": "2026-04-01", "end": "2026-06-30" }, "source": { "type": "customer_payload", "recordCount": 4210, "sampleCount": 1 }, "llm": { "executiveSummary": "Acme's active user base grew steadily through Q2...", "insights": [ { "title": "Free-to-pro conversion is slowing", "body": "Only 8% of new free users converted to pro this quarter, down from 12%.", "category": "implementation_pressure", "evidence": ["1200 pro / 4210 total"] } ], "followUpConsiderations": [ { "title": "Investigate onboarding drop-off", "body": "Session data suggests most churn happens in the first 7 days.", "attentionLevel": "elevated" } ], "confidenceNotes": "Based on a 4210-record sample with moderate breakdown coverage." } }, "usage": { "model": "google/gemini-2.5-flash", "inputTokens": 812, "outputTokens": 340, "costUsd": 0.0021, "providerSlug": "google" } }, "meta": { "requestId": "9f2a...", "persisted": false }}
Request Body
object
required
Hide scope
string
required
One of "organization", "network", or "item".
string
Max 256 chars.
string
User-friendly label for the scope. Max 500 chars.
object
required
Hide input
object
required
Show aggregates
number
Total records the aggregates were computed from.
object
Key metrics as string | number | boolean | null values.
object[]
Up to 20 dimensional breakdowns. Each has dimension: string and rows (up to 100 items of { key, count?, value? }).
object[]
Up to 60 sample records. Each item: { id?: string, fields: object } — fields supports up to 20 keys, each value truncated server-side to ~800 characters.
object
Show context
string
Custom instructions for this scope/period. Max 4000 chars.
string
e.g. "en-CA". Max 32 chars.
string
e.g. "ministry_briefing" — influences tone and framing. Max 64 chars.
string
default:"insight-narrative-v1"
Known values: "insight-narrative-v1", "phabc-data-insights-v1". Returns 400 if unrecognized.
string
UUID of an app in your workspace. Returns 404 if it doesn’t belong to your workspace.
object
Show period
string
Max 32 chars, ISO 8601 recommended.
string
Max 32 chars, ISO 8601 recommended.
string
External reference ID, tracked in billing. Max 256 chars.
string
Override model, e.g. "google/gemini-2.5-flash". Max 200 chars.
The full request body, serialized as JSON, must not exceed 512,000 bytes.