Recursively generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
completion_cost is the estimated USD cost for the completion.
Omitted unless included in selects.
completion_cost_details is the USD cost breakdown for completion-side
categories; per-category values are under raw. Omitted unless included in
selects.
completion_token_details is the completion-side token breakdown by category;
per-category counts are under raw. Omitted unless included in selects.
completion_tokens is the completion-side token count.
Omitted unless included in selects.
end_time is when the root run ended (RFC3339 date-time).
JSON null if the run is still in progress. Omitted unless included in selects.
error is the full root run error message when the run failed.
Omitted unless included in selects.
error_preview is a short error summary when the run failed.
Omitted unless included in selects.
first_token_time is when the first output token was produced (RFC3339
date-time), for streamed runs when that metadata exists. Omitted unless included
in selects.
inputs is the full root run input payload.
Omitted unless included in selects.
inputs_preview is a truncated text preview of inputs.
Omitted unless included in selects.
latency is wall-clock duration from start to end in seconds.
Omitted unless included in selects.
name is a human-readable label for the root run (for example the model name,
function name, or step name chosen when the run was traced). Omitted unless
included in selects.
op is a numeric code identifying the root run's run_type (for example LLM
vs.
tool vs. chain). Encoded as a number for compatibility with legacy clients;
prefer the string run_type on RunResponse when available. Omitted unless
included in selects.
outputs is the full root run output payload.
Omitted unless included in selects.
outputs_preview is a truncated text preview of outputs.
Omitted unless included in selects.
prompt_cost is the estimated USD cost for the prompt.
Omitted unless included in selects.
prompt_cost_details is the USD cost breakdown for prompt-side categories;
per-category values are under raw. Omitted unless included in selects.
prompt_token_details is the prompt-side token breakdown by category;
per-category counts are under nested raw. Omitted unless included in
selects.
prompt_tokens is the prompt-side token count.
Omitted unless included in selects.
start_time is when the trace started (RFC3339 date-time).
Omitted unless included in selects.
thread_id is the conversation thread UUID that contains this trace.
Matches the thread_id path parameter of the request. Omitted unless included
in selects.
total_cost is the estimated total USD cost for the root run.
Omitted unless included in selects.
total_tokens is the total token count (prompt plus completion).
Omitted unless included in selects.
trace_id is the UUID of this trace (the root run).
Returned when TRACE_ID is in selects, or when selects is omitted entirely
(sole fallback field).