Ingestion API

POST /api/ingest validates normalized JSON traces, stores the raw payload, queues an ingest job, and returns immediately. The generated reference page for this flow is Queue trace ingestion.

Authentication

POST /api/ingest accepts either:
  • a bearer token from the CLI
  • a signed-in browser session

JSON trace upload

JSON uploads can include up to 1,000 traces per request. Long traces are accepted; the server does not reject a trace because of its token count, message count, or per-message content length. The server recounts message tokens and ignores client-supplied token counts for payout-sensitive accounting.

Queued response

The HTTP status is 202.

Server processing

The background worker loads the raw JSON upload blob, then calls the ingest pipeline. The pipeline normalizes, scrubs, rejects high-risk PII, scores, deduplicates, inserts trace/message rows, and writes raw plus derived blobs.