Runs

Ingest run events

This endpoint is for reporting data from platforms not supported by our SDKs.

You can use either your project's Public or Private Key as the Bearer token in the Authorization header.

The expected body is an array of Event objects.

For LLM calls, you would first track a start event with the input data. Once your LLM call succeeds, you would need to send an end event to the API endpoint with the output data from the LLM call.

For a full step-by-step guide on sending LLM data to the Lunary API, see the Custom Integration guide.

POST
/v1/runs/ingest
curl --request POST \
  --url https://api.lunary.ai/v1/runs/ingest \
  --header 'Authorization: Bearer <api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"events":[{"type":"llm","event":"start","runId":"some-unique-id","name":"gpt-4","timestamp":"2022-01-01T00:00:00Z","input":[{"role":"user","content":"Hello world!"}],"tags":["tag1"],"extra":{"temperature":0.5,"max_tokens":100}}]}'

Accepted Keys:

events

Example response:

{
  "results": [
    {
      "id": "some-unique-id",
      "success": true
    }
  ]
}

Request Body

PropertyTypeDescription
eventsObject

Responses

200

Successful ingestion

PropertyTypeDescription
resultsarray

401

Project does not exist

402

Incorrect project id format

Questions? We're here to help.

Email