Create multiple traces in a single API call (transactional). See Traces.
API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....
ID of the inference result this trace belongs to
"ir_123"
Name of the trace
Optional custom trace ID
"id_123"
Optional description of the trace
"Example Name"
Type of trace
SPAN, GENERATION, EVENT, AGENT, TOOL, CHAIN, RETRIEVER, EVALUATOR, EMBEDDING, GUARDRAIL Input data for the trace
Output data from the trace
Error message if the trace failed
"Error message"
Duration in milliseconds
Additional trace attributes
Parent trace ID for hierarchical traces (references id of another trace in batch)
Start time of the trace
End time of the trace
Traces created successfully
"trace_123"
"ir_123"
"fetch_user_data"
SPAN, GENERATION, EVENT, AGENT, TOOL, CHAIN, RETRIEVER, EVALUATOR, EMBEDDING, GUARDRAIL "TOOL"
Human-readable description of the operation. Maximum 32KB.
"Fetches user data from the database by ID"
Input parameters passed to the operation
{ "user_id": "123" }Result returned by the operation
{
"name": "John Doe",
"email": "john@example.com"
}Error message if failed
"Connection timeout"
Execution time in milliseconds
45.5
Additional custom metadata
{ "model": "gpt-4", "temperature": 0.7 }ID of parent trace for hierarchical relationships
"trace_parent_123"