Skip to main content
Events are a discriminated union on type: "llm" or "tool". Both share the common fields below and add a type-specific properties object. The SDK validates events against this contract before sending; the ingest API validates again on receipt.

Common fields

string
required
Client-generated UUIDv4 identifying the event. Unique within your space — the deduplication key. Generate it once per event and reuse it across retries.
"llm" | "tool"
required
Event type discriminator.
string
Set by the ingest API from your API key. Any client-supplied value is overridden — omit it.
string
UUIDv4 shared by the events of one logical operation. See Traces.
number
required
Call start, milliseconds since the Unix epoch.
number
required
Call end, milliseconds since the Unix epoch.
number
required
Call duration in milliseconds, typically endTimeMs - startTimeMs.
object
required
Outcome of the call.
object
required
Where the event came from.
object
required
Identifiers the dashboard aggregates by. The object is required but every field is optional — send {} when none apply.
Record<string, string | number>
required
Custom dimensions. Values must be strings or numbers — send {} when none apply.

LLM events

LLM events set type: "llm" and carry properties.llm:
string
required
Model identifier as the provider names it, for example gpt-5.4-nano or claude-haiku-4-5.
string
The API base URL the request was served from, for example https://api.openai.com/v1. The ingest API resolves provider and cost from it; the SDK wrappers capture it automatically, so set it only for manual capture.
string
The platform that executed the request, for example openai or openrouter. Derived by the ingest API from the API base URL — omit it.
string
Model maker, for example anthropic. Derived by the ingest API from the model name when recognized — omit it.
object
What was sent to the model.
object
What the model returned.
object
required
Token usage. All fields are required — use 0 where a provider does not report a breakdown.
object
USD cost breakdown: { inputUncachedUsd, inputCacheReadUsd, inputCacheWriteUsd, outputUsd, totalUsd }. Computed by the ingest API from its model catalog when the model is recognized — omit it.

Tool events

Tool events set type: "tool" and carry properties.tool:
string
required
Tool name, for example get_weather.
string
Serialized tool input, typically JSON.
string
Serialized tool output, typically JSON.

Example events