Skip to main content
GET
/
v1
/
traces
/
{trace_id}
curl https://api.playgent.com/v1/traces/trace_ghi789 \
  -H "Authorization: Bearer your-api-key"
{
  "trace_id": "trace_ghi789",
  "agent_id": "agent_abc123",
  "run_id": "run_def456",
  "status": "completed",
  "duration_ms": 4560,
  "total_cost_usd": 0.0234,
  "spans": [
    {
      "span_id": "span_jkl012",
      "name": "agent_execution",
      "kind": "agent",
      "duration_ms": 4560,
      "children": [
        {
          "span_id": "span_mno345",
          "name": "gpt-4-turbo call",
          "kind": "llm",
          "model": "gpt-4-turbo",
          "tokens": { "input": 234, "output": 156 },
          "cost_usd": 0.0089,
          "duration_ms": 1234
        },
        {
          "span_id": "span_pqr678",
          "name": "search_knowledge_base",
          "kind": "tool",
          "duration_ms": 456,
          "children": [
            {
              "span_id": "span_stu901",
              "name": "embedding generation",
              "kind": "llm",
              "model": "text-embedding-3-small",
              "duration_ms": 89
            }
          ]
        }
      ]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://playgent.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Retrieve the complete trace with all spans organized in a hierarchical tree structure.
trace_id
string
required
Trace identifier
trace_id
string
required
Trace identifier
agent_id
string
required
Associated agent ID
run_id
string
Linked test run ID (if any)
status
string
required
Trace status: running, completed, error
duration_ms
integer
required
Total trace duration in milliseconds
total_cost_usd
number
required
Total cost across all spans
spans
array
required
Hierarchical span tree
curl https://api.playgent.com/v1/traces/trace_ghi789 \
  -H "Authorization: Bearer your-api-key"
{
  "trace_id": "trace_ghi789",
  "agent_id": "agent_abc123",
  "run_id": "run_def456",
  "status": "completed",
  "duration_ms": 4560,
  "total_cost_usd": 0.0234,
  "spans": [
    {
      "span_id": "span_jkl012",
      "name": "agent_execution",
      "kind": "agent",
      "duration_ms": 4560,
      "children": [
        {
          "span_id": "span_mno345",
          "name": "gpt-4-turbo call",
          "kind": "llm",
          "model": "gpt-4-turbo",
          "tokens": { "input": 234, "output": 156 },
          "cost_usd": 0.0089,
          "duration_ms": 1234
        },
        {
          "span_id": "span_pqr678",
          "name": "search_knowledge_base",
          "kind": "tool",
          "duration_ms": 456,
          "children": [
            {
              "span_id": "span_stu901",
              "name": "embedding generation",
              "kind": "llm",
              "model": "text-embedding-3-small",
              "duration_ms": 89
            }
          ]
        }
      ]
    }
  ]
}