Skip to main content
Write a trace with POST /v1/traces. Pick the project with the X-Feyn-Project header, using a key from projects.

Fields

string
required
Your id for this run. Writes with the same traceKey in the same project update one trace, so you can post when the request starts and again when it finishes, or safely retry.
object[]
required
The conversation after the run: the request messages plus the completion, including tool turns. Store the messages, not a flattened prompt string.
number
required
When the run started, in Unix milliseconds.
number
When the run finished, in Unix milliseconds.
string
The identifier of the model that produced the output.
string
The last assistant text.
string
The last assistant reasoning, if the model returns it.
number
Cost of the run in USD.
number
Latency in milliseconds.
number
The provider’s HTTP status (200, 429, 500). Leave it out until the call finishes.
object
Flat key-value pairs for filtering, such as run or customer ids. Values must be strings, numbers or booleans; they are stored as strings. Defaults to {}.

Messages

You can send tool calls in the shape your SDK already produces. OpenAI tool_calls (with a nested function) and AI SDK { type: "tool-call" } content parts are both converted to toolCalls.

Errors

400 when a required field is missing, a role is unknown, metadata holds a non-scalar value, or X-Feyn-Project is missing. See errors.