Skip to main content
The ingest endpoint receives batches of SDK ledger entries and stores them as Actions under a Run.

Endpoint

POST /api/v1/ingest/

Auth

Use:
Authorization: Bearer <jwt-or-api-key>

Payload

{
  "run_id": "uuid",
  "entries": [
    {
      "id": "uuid",
      "timestamp": "ISO-8601",
      "action": "search_web",
      "cost_usd": 0.02,
      "duration_ms": 12.3,
      "outcome": "success",
      "tags": ["tool", "search"],
      "payload": {
        "inputs": {"args": [], "kwargs": {"query": "..." }},
        "outputs": {"results": ["..."]}
      }
    }
  ]
}

Behavior

  • Creates the run if it doesn’t exist.
  • Enforces idempotency by skipping duplicate action IDs.
  • Returns 202 Accepted with counts.