GET
/
v1
/
runs
curl --request GET \
  --url https://api.lunary.ai/v1/runs
{
  "total": 200,
  "page": 1,
  "limit": 10,
  "data": [
    {
      "type": "llm",
      "name": "gpt-4o",
      "createdAt": "2024-01-01T12:00:00Z",
      "endedAt": "2024-01-01T12:00:03Z",
      "duration": 3,
      "tokens": {
        "completion": 100,
        "prompt": 50,
        "total": 150
      },
      "feedback": null,
      "status": "success",
      "tags": [
        "example"
      ],
      "templateSlug": "example-template",
      "templateVersionId": 1234,
      "input": [
        {
          "role": "user",
          "content": "Hello world!"
        }
      ],
      "output": [
        {
          "role": "assistant",
          "content": "Hello. How are you?"
        }
      ],
      "error": null,
      "user": {
        "id": "11111111",
        "externalId": "user123",
        "createdAt": "2021-12-01T12:00:00Z",
        "lastSeen": "2022-01-01T12:00:00Z",
        "props": {
          "name": "Jane Doe",
          "email": "user1@apple.com"
        }
      },
      "cost": 0.05,
      "params": {
        "temperature": 0.5,
        "maxTokens": 100,
        "tools": []
      },
      "metadata": null
    }
  ]
}

Query Parameters

type
enum<string>
Available options:
llm,
trace,
thread
models
string[]
tags
string[]
tokens
string
exportType
enum<string>
Available options:
csv,
jsonl
minDuration
string
maxDuration
string
startTime
string
endTime
string
parentRunId
string
limit
string
page
string
order
string
sortField
string
sortDirection
enum<string>
Available options:
asc,
desc

Response

200 - application/json
Successful response
total
number
page
number
limit
number
data
object[]