Skip to main content
POST
Create trace

Authorizations

X-API-Key
string
header
required

API key for authentication

Body

application/json
agent_id
string
required

ID of the agent that produced the turn. Must be an agent in your workspace

Required string length: 1 - 36
input
required

What the agent was given for this turn. For a general agent, the standalone prompt as a string. For a conversation agent, the history up to the reported output, oldest turn first, in OpenAI chat format

Required string length: 1 - 50000
output
TraceOutput · object
required

What the agent produced for this turn

message_id
string | null

Your own ID for the last user message in input, stored for reference only. Omit if you have none

Required string length: 1 - 255
conversation_id
string | null

Your own ID for the conversation this turn belongs to, stored for reference only. Omit if you have none

Required string length: 1 - 255
metadata
TraceMetadataEntry · object[] | null

Key-value pairs stored with the trace. Prefer OTel gen_ai.* key names where they fit. Omit if you have none

Maximum array length: 100

Response

Successful Response

uuid
string
required

Unique ID for the trace

Required string length: 36
Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

created_at
string
required

When the trace was created (ISO 8601 UTC)

message_id
string | null

The message ID you sent, if any

conversation_id
string | null

The conversation ID you sent, if any