Skip to main content
GET
/
v1
/
traces
List Traces
curl --request GET \
  --url https://api.agentmark.co/v1/traces \
  --header 'Authorization: <api-key>' \
  --header 'X-Agentmark-App-Id: <x-agentmark-app-id>'
{
  "traces": [
    {
      "id": "abc123-def456",
      "name": "chat-completion",
      "status": "1",
      "latency": 1234.5,
      "cost": 0.0032,
      "tokens": 450,
      "start": 1712764245123,
      "end": 1712764246357
    }
  ]
}

Authorizations

Authorization
string
header
required

Your AgentMark API key. Create one in the dashboard under Settings > API Keys.

Example: Authorization: Bearer am_live_abc123

Headers

X-Agentmark-App-Id
string
required

Your application ID. Found in the dashboard under Settings > General.

Example:

"app_abc123"

Query Parameters

status
enum<string>

Filter by trace status:

  • 0 — Unset
  • 1 — Ok
  • 2 — Error
Available options:
0,
1,
2
name
string

Partial match on trace name.

Maximum string length: 500
latency_gt
integer

Return traces with latency greater than this value (milliseconds).

Required range: x >= 0
latency_lt
integer

Return traces with latency less than this value (milliseconds).

Required range: x >= 0
limit
integer
default:50

Maximum number of traces to return.

Required range: 1 <= x <= 200
offset
integer
default:0

Number of traces to skip for pagination.

Required range: x >= 0

Response

A list of traces.

traces
object[]