Skip to main content
POST
/
v1
/
traces
/
{trace_id}
/
spans
curl -X POST https://api.playgent.com/v1/traces/trace_ghi789/spans \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "parent_span_id": "span_jkl012",
    "name": "gpt-4-turbo call",
    "kind": "llm",
    "input": {
      "messages": [
        { "role": "system", "content": "You are a helpful assistant." },
        { "role": "user", "content": "What is your refund policy?" }
      ],
      "model": "gpt-4-turbo",
      "temperature": 0.7
    },
    "start_time": "2024-12-16T10:00:00.123Z"
  }'
{
  "span_id": "span_mno345"
}

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.

Add a span to capture a specific operation during agent execution (LLM call, tool invocation, retrieval, etc.).
trace_id
string
required
Parent trace identifier
parent_span_id
string
Parent span ID for nested spans
name
string
required
Span name (e.g., “gpt-4-turbo call”, “vector_search”)
kind
string
required
Span type: llm, tool, retrieval, agent, chain
input
object
required
Span input data
start_time
string
required
ISO 8601 timestamp when span started
span_id
string
required
Unique span identifier
curl -X POST https://api.playgent.com/v1/traces/trace_ghi789/spans \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "parent_span_id": "span_jkl012",
    "name": "gpt-4-turbo call",
    "kind": "llm",
    "input": {
      "messages": [
        { "role": "system", "content": "You are a helpful assistant." },
        { "role": "user", "content": "What is your refund policy?" }
      ],
      "model": "gpt-4-turbo",
      "temperature": 0.7
    },
    "start_time": "2024-12-16T10:00:00.123Z"
  }'
{
  "span_id": "span_mno345"
}