Skip to main content
POST
/
v1
/
ingest
/
batch
Ingest a batch of traces (max 100)
curl --request POST \
  --url https://api.trulayer.ai/v1/ingest/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "traces": [
    {
      "id": "<string>",
      "external_id": "<string>",
      "name": "<string>",
      "input": "<string>",
      "output": "<string>",
      "model": "<string>",
      "latency_ms": 123,
      "cost": 123,
      "error": "<string>",
      "metadata": {},
      "spans": [
        {
          "name": "<string>",
          "type": "llm",
          "id": "<string>",
          "parent_span_id": "<string>",
          "input": "<string>",
          "output": "<string>",
          "model": "<string>",
          "latency_ms": 123,
          "cost": 123,
          "error": "<string>",
          "metadata": {},
          "start_time": "2023-11-07T05:31:56Z",
          "end_time": "2023-11-07T05:31:56Z"
        }
      ],
      "events": [
        {
          "message": "<string>",
          "id": "<string>",
          "span_id": "<string>",
          "level": "info",
          "metadata": {}
        }
      ]
    }
  ]
}
'
{
  "ingested": 123,
  "ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}

Authorizations

Authorization
string
header
required

SDK API key (tl_...) or Clerk session JWT

Body

application/json
traces
object[]
required
Required array length: 1 - 100 elements

Response

Batch ingested

ingested
integer
required
ids
string<uuid>[]
required