API Documentation
Full OpenAPI spec is available at /api/openapi
POST
/api/uploadGet a Vercel Blob client upload token. Upload directly from the browser.
POST
/api/jobsCreate an analysis job from a Blob URL. Returns job_id immediately (202).
GET
/api/jobsList all analysis jobs. Filter by ?status=succeeded
GET
/api/jobs/:idGet full job details including transcript, tribe_result, narrative.
GET
/api/jobs/:id/heatmapRedirect to cortical activation heatmap PNG.
POST
/api/jobs/:id/narrativeRegenerate narrative with a focus (attention/emotion/memory/language/general).
DELETE
/api/jobs/:idDelete job and associated Blob files.
POST
/api/mcpMCP Streamable HTTP endpoint. Use with Claude Desktop or any MCP client.
GET
/api/mcp/sseLegacy SSE MCP transport for older clients.
GET
/api/healthHealth check — returns status of database, blob, LLM configs.
GET/POST/DELETE
/api/keysManage API keys for agent/programmatic access.
MCP Tools Available
analyze_mediaSubmit a URL for brain analysisget_job_statusCheck processing progressget_resultsRetrieve full analysis resultsget_engagement_timelineGet per-timepoint engagement scoreslist_jobsList recent analysesgenerate_custom_narrativeRe-generate narrative with specific focus