Defaults to the lightweight skeleton projection (no per-span I/O); pass
fields=full (or fields=io,metadata) for per-span input/output/metadata.
Args:
auth (DualStampedAuth): Resolved credential context (API key or user
session token); scopes the read to its project and stamps the
rate-limit identity.
trace_id (str): Trace to fetch.
fields (str | None): Comma-separated projection groups (e.g. io,
metadata) or an alias (skeleton/full). None selects
the default skeleton projection.
Returns:
PublicTraceDetailResponse: The trace with span skeletons, plus per-span
I/O when the projection requests it.
Raises:
HTTPException: 400 if fields is invalid, 404 if the trace is missing
or outside the key’s project, 500 on a reader failure.
Target project for the request. Required when authenticating with a user session token (a user credential is only meaningful scoped to a project); for an API key it is optional and, if given, must match the key's project.
Response
Successful Response
Full trace payload plus a backend-built link to its UI detail view.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"traceroot","colors":{"primary":"#0f172a","light":"#FFFFFF","dark":"#000000"},"logo":{"light":"https://mintcdn.com/tracerootai/w6ZCi-88-jgYww6Q/logo/light.png?fit=max\u0026auto=format\u0026n=w6ZCi-88-jgYww6Q\u0026q=85\u0026s=923b414b9ceb5508b3852e0695a57a7d","dark":"https://mintcdn.com/tracerootai/w6ZCi-88-jgYww6Q/logo/dark.png?fit=max\u0026auto=format\u0026n=w6ZCi-88-jgYww6Q\u0026q=85\u0026s=ef53cb295cc00e48fc76dd371b7e6bbc","href":"https://traceroot.ai"},"favicon":"https://mintcdn.com/tracerootai/spyQTeLHpHTv8unV/logo/favicon.png?fit=max\u0026auto=format\u0026n=spyQTeLHpHTv8unV\u0026q=85\u0026s=5050ccc8990b316a62ef037190ee65e3","navbar":{"links":[{"href":"https://github.com/traceroot-ai/traceroot/tree/main/examples","label":"Examples"},{"href":"https://app.traceroot.ai","label":"traceroot Cloud"},{"icon":"discord","href":"https://discord.gg/TM2m3CtKuC","label":"Discord"}],"primary":{"type":"github","label":"Github","href":"https://github.com/traceroot-ai/traceroot"}},"footer":{"socials":{"github":"https://github.com/traceroot-ai","x":"https://x.com/TraceRootAI","linkedin":"https://www.linkedin.com/company/traceroot-ai","discord":"https://discord.gg/TM2m3CtKuC"}},"search":{},"fonts":{"heading":{"family":"Inter"},"body":{"family":"Inter"}},"integrations":{"posthog":{"apiKey":"phc_X8eeQUsyMb7bk5sw0msmN8ARBxurlVyQxC0uvHVul7C","apiHost":"https://us.i.posthog.com"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"thumbnails":{"appearance":"light","background":"https://mintcdn.com/tracerootai/w6ZCi-88-jgYww6Q/images/og-background.png?fit=max\u0026auto=format\u0026n=w6ZCi-88-jgYww6Q\u0026q=85\u0026s=659b20de18b6b429609af39183e06e79"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"tracerootai","hasAudioNarration":false,"actualSubdomain":"tracerootai","customDomains":["traceroot.ai"],"gitSource":{"type":"github","owner":"traceroot-ai","repo":"traceroot","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aed09b8176e2ff210e31c31","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"API Reference","count":58},{"language":"default","tag":"Endpoints","count":57},{"language":"default","tag":"Documentation","count":36},{"language":"default","tag":"Integrations","count":26},{"language":"default","tag":"Frameworks","count":15},{"language":"default","tag":"Features","count":13},{"language":"default","tag":"Tracing","count":12},{"language":"default","tag":"Offline Eval","count":10},{"language":"default","tag":"Detectors","count":9},{"language":"default","tag":"Alerts","count":8}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/traces/get-trace","slug":"/api-reference/traces/get-trace","pageMetadata":{"title":"Get Trace","description":"Get a single trace for the caller's project.\n\nDefaults to the lightweight `skeleton` projection (no per-span I/O); pass\n`fields=full` (or `fields=io,metadata`) for per-span input/output/metadata.\n\nArgs:\n auth (DualStampedAuth): Resolved credential context (API key or user\n session token); scopes the read to its project and stamps the\n rate-limit identity.\n trace_id (str): Trace to fetch.\n fields (str | None): Comma-separated projection groups (e.g. ``io``,\n ``metadata``) or an alias (``skeleton``/``full``). ``None`` selects\n the default `skeleton` projection.\n\nReturns:\n PublicTraceDetailResponse: The trace with span skeletons, plus per-span\n I/O when the projection requests it.\n\nRaises:\n HTTPException: 400 if `fields` is invalid, 404 if the trace is missing\n or outside the key's project, 500 on a reader failure.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/traces/{trace_id}","href":"/api-reference/traces/get-trace","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Get a single trace for the caller’s project.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Defaults to the lightweight \", _jsx(_components.code, {\n children: \"skeleton\"\n }), \" projection (no per-span I/O); pass\\n\", _jsx(_components.code, {\n children: \"fields=full\"\n }), \" (or \", _jsx(_components.code, {\n children: \"fields=io,metadata\"\n }), \") for per-span input/output/metadata.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Args:\\nauth (DualStampedAuth): Resolved credential context (API key or user\\nsession token); scopes the read to its project and stamps the\\nrate-limit identity.\\ntrace_id (str): Trace to fetch.\\nfields (str | None): Comma-separated projection groups (e.g. \", _jsx(_components.code, {\n children: \"io\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"metadata\"\n }), \") or an alias (\", _jsx(_components.code, {\n children: \"skeleton\"\n }), \"/\", _jsx(_components.code, {\n children: \"full\"\n }), \"). \", _jsx(_components.code, {\n children: \"None\"\n }), \" selects\\nthe default \", _jsx(_components.code, {\n children: \"skeleton\"\n }), \" projection.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Returns:\\nPublicTraceDetailResponse: The trace with span skeletons, plus per-span\\nI/O when the projection requests it.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Raises:\\nHTTPException: 400 if \", _jsx(_components.code, {\n children: \"fields\"\n }), \" is invalid, 404 if the trace is missing\\nor outside the key’s project, 500 on a reader failure.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get Trace","description":"Get a single trace for the caller's project.\n\nDefaults to the lightweight `skeleton` projection (no per-span I/O); pass\n`fields=full` (or `fields=io,metadata`) for per-span input/output/metadata.\n\nArgs:\n auth (DualStampedAuth): Resolved credential context (API key or user\n session token); scopes the read to its project and stamps the\n rate-limit identity.\n trace_id (str): Trace to fetch.\n fields (str | None): Comma-separated projection groups (e.g. ``io``,\n ``metadata``) or an alias (``skeleton``/``full``). ``None`` selects\n the default `skeleton` projection.\n\nReturns:\n PublicTraceDetailResponse: The trace with span skeletons, plus per-span\n I/O when the projection requests it.\n\nRaises:\n HTTPException: 400 if `fields` is invalid, 404 if the trace is missing\n or outside the key's project, 500 on a reader failure.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/traces/{trace_id}","href":"/api-reference/traces/get-trace","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Get a single trace for the caller's project.\n\nDefaults to the lightweight `skeleton` projection (no per-span I/O); pass\n`fields=full` (or `fields=io,metadata`) for per-span input/output/metadata.\n\nArgs:\n auth (DualStampedAuth): Resolved credential context (API key or user\n session token); scopes the read to its project and stamps the\n rate-limit identity.\n trace_id (str): Trace to fetch.\n fields (str | None): Comma-separated projection groups (e.g. ``io``,\n ``metadata``) or an alias (``skeleton``/``full``). ``None`` selects\n the default `skeleton` projection.\n\nReturns:\n PublicTraceDetailResponse: The trace with span skeletons, plus per-span\n I/O when the projection requests it.\n\nRaises:\n HTTPException: 400 if `fields` is invalid, 404 if the trace is missing\n or outside the key's project, 500 on a reader failure.","operationId":"get_trace","parameters":["74b0cafb-b54f-419d-95e9-9da5de062b67","70abd5ca-eabd-4634-befc-fe77f755dcc5","f9abd373-05e2-445c-b1c4-1d701afdda8a"],"responses":{"200":"7c33eb52-a206-466a-b707-af401decfdc6","400":"78178112-9548-4f10-be1e-9efa7748eddf","401":"d1dfa34a-c34a-4897-9d59-4ddb91ef419d","404":"175b589c-4f02-47c7-ade8-4eb7268e179e","422":"c7ceab4d-b749-4f80-bc1a-1738fee45c00","500":"30ddefe3-a66b-4869-9282-52ed9f5e2a41","503":"f5c31732-790e-4c3c-b21d-61c1520ed1e0"},"security":["71b3dcd9-2aed-407d-ad97-dbd211423322"],"summary":"Get Trace","tags":["Traces"],"x-tool":{"description":"Fetch one trace with its span tree. Defaults to the lightweight skeleton projection; pass fields=full for per-span input/output/metadata.","enabled":true,"name":"get_trace"},"method":"get","type":"path","servers":["8ae2b8ec-5d46-4cd6-b341-439f21217297","44011aa4-1038-4223-aaf9-82d2181cca8b"],"path":"/api/v1/public/traces/{trace_id}","baseUrlOptions":["https://app.traceroot.ai","{baseUrl}"],"title":"Get Trace","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"74b0cafb-b54f-419d-95e9-9da5de062b67":{"in":"path","name":"trace_id","required":true,"schema":{"title":"Trace Id","type":"string","isRequired":true,"uniqueKey":"","typeLabel":"string"}},"70abd5ca-eabd-4634-befc-fe77f755dcc5":{"description":"Comma-separated field groups to include: 'core' (tree/timing/status, always included), 'usage' (tokens/cost), 'io' (per-span input/output), 'metadata' (per-span metadata). Aliases: 'skeleton' (core,usage), 'full' (everything). Unknown groups return 400.","in":"query","name":"fields","required":false,"schema":{"oneOf":[{"type":"string","title":"Fields","description":"Comma-separated field groups to include: 'core' (tree/timing/status, always included), 'usage' (tokens/cost), 'io' (per-span input/output), 'metadata' (per-span metadata). Aliases: 'skeleton' (core,usage), 'full' (everything). Unknown groups return 400.","uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","title":"Fields","description":"Comma-separated field groups to include: 'core' (tree/timing/status, always included), 'usage' (tokens/cost), 'io' (per-span input/output), 'metadata' (per-span metadata). Aliases: 'skeleton' (core,usage), 'full' (everything). Unknown groups return 400.","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"}},"f9abd373-05e2-445c-b1c4-1d701afdda8a":{"description":"Target project for the request. Required when authenticating with a user session token (a user credential is only meaningful scoped to a project); for an API key it is optional and, if given, must match the key's project.","in":"query","name":"project_id","required":false,"schema":{"oneOf":[{"type":"string","title":"Project Id","description":"Target project for the request. Required when authenticating with a user session token (a user credential is only meaningful scoped to a project); for an API key it is optional and, if given, must match the key's project.","uniqueKey":"oneOf.0","typeLabel":"string"},{"type":"null","title":"Project Id","description":"Target project for the request. Required when authenticating with a user session token (a user credential is only meaningful scoped to a project); for an API key it is optional and, if given, must match the key's project.","uniqueKey":"oneOf.1","typeLabel":"null"}],"isRequired":false,"uniqueKey":"","typeLabel":"string | null"}}},"responses":{"7c33eb52-a206-466a-b707-af401decfdc6":{"content":{"application/json":{"schema":{"description":"Full trace payload plus a backend-built link to its UI detail view.","properties":{"git_ref":{"oneOf":[{"type":"string","title":"Git Ref","isRequired":true,"uniqueKey":"git_ref.oneOf.0","typeLabel":"string"},{"type":"null","title":"Git Ref","isRequired":true,"uniqueKey":"git_ref.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"git_ref","typeLabel":"string | null"},"git_repo":{"oneOf":[{"type":"string","title":"Git Repo","isRequired":true,"uniqueKey":"git_repo.oneOf.0","typeLabel":"string"},{"type":"null","title":"Git Repo","isRequired":true,"uniqueKey":"git_repo.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"git_repo","typeLabel":"string | null"},"input":{"oneOf":[{"type":"string","title":"Input","isRequired":true,"uniqueKey":"input.oneOf.0","typeLabel":"string"},{"type":"null","title":"Input","isRequired":true,"uniqueKey":"input.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"input","typeLabel":"string | null"},"metadata":{"oneOf":[{"type":"string","title":"Metadata","isRequired":true,"uniqueKey":"metadata.oneOf.0","typeLabel":"string"},{"type":"null","title":"Metadata","isRequired":true,"uniqueKey":"metadata.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"metadata","typeLabel":"string | null"},"name":{"title":"Name","type":"string","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"output":{"oneOf":[{"type":"string","title":"Output","isRequired":true,"uniqueKey":"output.oneOf.0","typeLabel":"string"},{"type":"null","title":"Output","isRequired":true,"uniqueKey":"output.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"output","typeLabel":"string | null"},"project_id":{"title":"Project Id","type":"string","isRequired":true,"uniqueKey":"project_id","typeLabel":"string"},"session_id":{"oneOf":[{"type":"string","title":"Session Id","isRequired":true,"uniqueKey":"session_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Session Id","isRequired":true,"uniqueKey":"session_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"session_id","typeLabel":"string | null"},"spans":{"items":{"description":"A span skeleton plus its per-span I/O blobs (``input``/``output``/``metadata``).\n\nThe projection-capable superset returned by the trace get/export endpoints.\nThe blobs default to ``None`` and are populated only when the caller requests\nthe matching field group (``io``/``metadata``; see\n``rest.projection``). The default ``skeleton`` projection leaves them ``None``\nand never runs the bulk span-I/O query, so there is no payload or query-cost\nregression for the dashboard. Keeping the fields present (as ``null``) rather\nthan omitting them is additive: a few bytes per span, and it matches the\nfields the shipped CLI's generated types already declare.\n\nOne internal-only exception: the dashboard's trace-detail read leaves a small\nSDK span-path subset in ``metadata`` on the skeleton, which it needs to\nrebuild the tree of an in-flight trace. The public routes drop it (see\n``rest.projection.drop_span_tree_metadata``), so for API clients the contract\nabove holds exactly: ``metadata`` is ``null`` unless requested.","properties":{"cost":{"oneOf":[{"type":"number","title":"Cost","isRequired":true,"uniqueKey":"spans.items.[INDEX].cost.oneOf.0","typeLabel":"number"},{"type":"null","title":"Cost","isRequired":true,"uniqueKey":"spans.items.[INDEX].cost.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"spans.items.[INDEX].cost","typeLabel":"number | null"},"input_tokens":{"oneOf":[{"type":"integer","title":"Input Tokens","isRequired":true,"uniqueKey":"spans.items.[INDEX].input_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Input Tokens","isRequired":true,"uniqueKey":"spans.items.[INDEX].input_tokens.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"spans.items.[INDEX].input_tokens","typeLabel":"integer | null"},"model_name":{"oneOf":[{"type":"string","title":"Model Name","isRequired":true,"uniqueKey":"spans.items.[INDEX].model_name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Model Name","isRequired":true,"uniqueKey":"spans.items.[INDEX].model_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"spans.items.[INDEX].model_name","typeLabel":"string | null"},"name":{"title":"Name","type":"string","isRequired":true,"uniqueKey":"spans.items.[INDEX].name","typeLabel":"string"},"output_tokens":{"oneOf":[{"type":"integer","title":"Output Tokens","isRequired":true,"uniqueKey":"spans.items.[INDEX].output_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Output Tokens","isRequired":true,"uniqueKey":"spans.items.[INDEX].output_tokens.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"spans.items.[INDEX].output_tokens","typeLabel":"integer | null"},"parent_span_id":{"oneOf":[{"type":"string","title":"Parent Span Id","isRequired":true,"uniqueKey":"spans.items.[INDEX].parent_span_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Parent Span Id","isRequired":true,"uniqueKey":"spans.items.[INDEX].parent_span_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"spans.items.[INDEX].parent_span_id","typeLabel":"string | null"},"span_end_time":{"oneOf":[{"type":"string","title":"Span End Time","format":"date-time","isRequired":true,"uniqueKey":"spans.items.[INDEX].span_end_time.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","title":"Span End Time","isRequired":true,"uniqueKey":"spans.items.[INDEX].span_end_time.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"spans.items.[INDEX].span_end_time","typeLabel":"string\u003cdate-time> | null"},"span_id":{"title":"Span Id","type":"string","isRequired":true,"uniqueKey":"spans.items.[INDEX].span_id","typeLabel":"string"},"span_kind":{"title":"Span Kind","type":"string","isRequired":true,"uniqueKey":"spans.items.[INDEX].span_kind","typeLabel":"string"},"span_start_time":{"format":"date-time","title":"Span Start Time","type":"string","isRequired":true,"uniqueKey":"spans.items.[INDEX].span_start_time","typeLabel":"string\u003cdate-time>"},"status":{"title":"Status","type":"string","isRequired":true,"uniqueKey":"spans.items.[INDEX].status","typeLabel":"string"},"status_message":{"oneOf":[{"type":"string","title":"Status Message","isRequired":true,"uniqueKey":"spans.items.[INDEX].status_message.oneOf.0","typeLabel":"string"},{"type":"null","title":"Status Message","isRequired":true,"uniqueKey":"spans.items.[INDEX].status_message.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"spans.items.[INDEX].status_message","typeLabel":"string | null"},"total_tokens":{"oneOf":[{"type":"integer","title":"Total Tokens","isRequired":true,"uniqueKey":"spans.items.[INDEX].total_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Total Tokens","isRequired":true,"uniqueKey":"spans.items.[INDEX].total_tokens.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"spans.items.[INDEX].total_tokens","typeLabel":"integer | null"},"trace_id":{"title":"Trace Id","type":"string","isRequired":true,"uniqueKey":"spans.items.[INDEX].trace_id","typeLabel":"string"},"cost_details":{"additionalProperties":{"type":"number","uniqueKey":"spans.items.[INDEX].cost_details.additionalProperties","typeLabel":"number"},"default":{},"title":"Cost Details","type":"object","uniqueKey":"spans.items.[INDEX].cost_details","typeLabel":"Cost Details · object"},"error_type":{"default":"","title":"Error Type","type":"string","uniqueKey":"spans.items.[INDEX].error_type","typeLabel":"string"},"git_source_file":{"oneOf":[{"type":"string","title":"Git Source File","uniqueKey":"spans.items.[INDEX].git_source_file.oneOf.0","typeLabel":"string"},{"type":"null","title":"Git Source File","uniqueKey":"spans.items.[INDEX].git_source_file.oneOf.1","typeLabel":"null"}],"uniqueKey":"spans.items.[INDEX].git_source_file","typeLabel":"string | null"},"git_source_function":{"oneOf":[{"type":"string","title":"Git Source Function","uniqueKey":"spans.items.[INDEX].git_source_function.oneOf.0","typeLabel":"string"},{"type":"null","title":"Git Source Function","uniqueKey":"spans.items.[INDEX].git_source_function.oneOf.1","typeLabel":"null"}],"uniqueKey":"spans.items.[INDEX].git_source_function","typeLabel":"string | null"},"git_source_line":{"oneOf":[{"type":"integer","title":"Git Source Line","uniqueKey":"spans.items.[INDEX].git_source_line.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Git Source Line","uniqueKey":"spans.items.[INDEX].git_source_line.oneOf.1","typeLabel":"null"}],"uniqueKey":"spans.items.[INDEX].git_source_line","typeLabel":"integer | null"},"input":{"oneOf":[{"type":"string","title":"Input","uniqueKey":"spans.items.[INDEX].input.oneOf.0","typeLabel":"string"},{"type":"null","title":"Input","uniqueKey":"spans.items.[INDEX].input.oneOf.1","typeLabel":"null"}],"uniqueKey":"spans.items.[INDEX].input","typeLabel":"string | null"},"metadata":{"oneOf":[{"type":"string","title":"Metadata","uniqueKey":"spans.items.[INDEX].metadata.oneOf.0","typeLabel":"string"},{"type":"null","title":"Metadata","uniqueKey":"spans.items.[INDEX].metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"spans.items.[INDEX].metadata","typeLabel":"string | null"},"output":{"oneOf":[{"type":"string","title":"Output","uniqueKey":"spans.items.[INDEX].output.oneOf.0","typeLabel":"string"},{"type":"null","title":"Output","uniqueKey":"spans.items.[INDEX].output.oneOf.1","typeLabel":"null"}],"uniqueKey":"spans.items.[INDEX].output","typeLabel":"string | null"},"usage_details":{"additionalProperties":{"type":"integer","uniqueKey":"spans.items.[INDEX].usage_details.additionalProperties","typeLabel":"integer"},"default":{},"title":"Usage Details","type":"object","uniqueKey":"spans.items.[INDEX].usage_details","typeLabel":"Usage Details · object"}},"required":["span_id","trace_id","parent_span_id","name","span_kind","span_start_time","span_end_time","status","status_message","model_name","cost","input_tokens","output_tokens","total_tokens"],"title":"SpanResponse","type":"object","uniqueKey":"spans.items.[INDEX]","typeLabel":"SpanResponse · object"},"title":"Spans","type":"array","isRequired":true,"uniqueKey":"spans","typeLabel":"SpanResponse · object[]"},"trace_id":{"title":"Trace Id","type":"string","isRequired":true,"uniqueKey":"trace_id","typeLabel":"string"},"trace_start_time":{"format":"date-time","title":"Trace Start Time","type":"string","isRequired":true,"uniqueKey":"trace_start_time","typeLabel":"string\u003cdate-time>"},"trace_url":{"title":"Trace Url","type":"string","isRequired":true,"uniqueKey":"trace_url","typeLabel":"string"},"user_id":{"oneOf":[{"type":"string","title":"User Id","isRequired":true,"uniqueKey":"user_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"User Id","isRequired":true,"uniqueKey":"user_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"user_id","typeLabel":"string | null"}},"required":["trace_id","project_id","name","trace_start_time","user_id","session_id","git_ref","git_repo","input","output","metadata","spans","trace_url"],"title":"PublicTraceDetailResponse","type":"object","uniqueKey":"","typeLabel":"PublicTraceDetailResponse · object"},"examples":{"Example":{"title":"Example","value":{"git_ref":"\u003cstring>","git_repo":"\u003cstring>","input":"\u003cstring>","metadata":"\u003cstring>","name":"\u003cstring>","output":"\u003cstring>","project_id":"\u003cstring>","session_id":"\u003cstring>","spans":[{"cost":123,"input_tokens":123,"model_name":"\u003cstring>","name":"\u003cstring>","output_tokens":123,"parent_span_id":"\u003cstring>","span_end_time":"2023-11-07T05:31:56Z","span_id":"\u003cstring>","span_kind":"\u003cstring>","span_start_time":"2023-11-07T05:31:56Z","status":"\u003cstring>","status_message":"\u003cstring>","total_tokens":123,"trace_id":"\u003cstring>","cost_details":{},"error_type":"","git_source_file":"\u003cstring>","git_source_function":"\u003cstring>","git_source_line":123,"input":"\u003cstring>","metadata":"\u003cstring>","output":"\u003cstring>","usage_details":{}}],"trace_id":"\u003cstring>","trace_start_time":"2023-11-07T05:31:56Z","trace_url":"\u003cstring>","user_id":"\u003cstring>"}}},"exampleType":"generated"}},"description":"Successful Response","exampleType":"generated"},"78178112-9548-4f10-be1e-9efa7748eddf":{"content":{"application/json":{"schema":{"description":"The canonical public error envelope (matches the gateway's normalized shape).","properties":{"detail":{"title":"Detail","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"required":["detail"],"title":"ErrorResponse","type":"object","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>"}}},"exampleType":"generated"}},"description":"Invalid fields parameter","exampleType":"generated"},"d1dfa34a-c34a-4897-9d59-4ddb91ef419d":{"content":{"application/json":{"schema":{"description":"The canonical public error envelope (matches the gateway's normalized shape).","properties":{"detail":{"title":"Detail","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"required":["detail"],"title":"ErrorResponse","type":"object","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>"}}},"exampleType":"generated"}},"description":"Authentication failed","exampleType":"generated"},"175b589c-4f02-47c7-ade8-4eb7268e179e":{"content":{"application/json":{"schema":{"description":"The canonical public error envelope (matches the gateway's normalized shape).","properties":{"detail":{"title":"Detail","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"required":["detail"],"title":"ErrorResponse","type":"object","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>"}}},"exampleType":"generated"}},"description":"Trace not found","exampleType":"generated"},"c7ceab4d-b749-4f80-bc1a-1738fee45c00":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"oneOf":[{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"title":"Location","type":"array","isRequired":true,"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"title":"Message","type":"string","isRequired":true,"uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"type":{"title":"Error Type","type":"string","isRequired":true,"uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"},"ctx":{"title":"Context","type":"object","uniqueKey":"detail.items.[INDEX].ctx","typeLabel":"Context · object"},"input":{"oneOf":[{"title":"Input"}],"uniqueKey":"detail.items.[INDEX].input","typeLabel":"any"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object","uniqueKey":"detail.items.[INDEX]","typeLabel":"ValidationError · object"},"title":"Detail","type":"array","uniqueKey":"detail","typeLabel":"ValidationError · object[]"}},"title":"HTTPValidationError","type":"object","uniqueKey":"","typeLabel":"HTTPValidationError · object"},"examples":{"Example":{"title":"Example","value":{"detail":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>","ctx":{},"input":"\u003cunknown>"}]}}},"exampleType":"generated"}},"description":"Validation Error","exampleType":"generated"},"30ddefe3-a66b-4869-9282-52ed9f5e2a41":{"content":{"application/json":{"schema":{"description":"The canonical public error envelope (matches the gateway's normalized shape).","properties":{"detail":{"title":"Detail","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"required":["detail"],"title":"ErrorResponse","type":"object","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>"}}},"exampleType":"generated"}},"description":"Failed to get trace","exampleType":"generated"},"f5c31732-790e-4c3c-b21d-61c1520ed1e0":{"content":{"application/json":{"schema":{"description":"The canonical public error envelope (matches the gateway's normalized shape).","properties":{"detail":{"title":"Detail","type":"string","isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"required":["detail"],"title":"ErrorResponse","type":"object","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"\u003cstring>"}}},"exampleType":"generated"}},"description":"Authentication service unavailable","exampleType":"generated"}},"security":{"71b3dcd9-2aed-407d-ad97-dbd211423322":{"BearerAuth":{"scheme":"bearer","type":"http","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"8ae2b8ec-5d46-4cd6-b341-439f21217297":{"description":"TraceRoot Cloud","url":"https://app.traceroot.ai"},"44011aa4-1038-4223-aaf9-82d2181cca8b":{"description":"Self-hosted","url":"{baseUrl}","variables":{"baseUrl":{"default":"http://localhost:8000","description":"Your TraceRoot backend URL"}}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"scheme":"bearer","type":"http","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"tracerootai","siteName":"traceroot","title":"Get Trace - traceroot","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-05T22:52:04.745Z","originalFileLocation":"api-reference/traces/get-trace.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Get a single trace for the caller\u0026#x27;s project. Defaults to the lightweight skeleton projection (no per-span I/O); pass fields=full (or fields=io,metadata) for per-span input/output/metadata. Args: auth (DualStampedAuth): Resolved credential context (API key or user session token); scopes the read to its project and stamps the rate-limit identity. trace_id (str): Trace to fetch. fields (str | None): Comma-separated projection groups (e.g. io, metadata) or an alias (skeleton/full). None selects the default skeleton projection. Returns: PublicTraceDetailResponse: The trace with span skeletons, plus per-span I/O when the projection requests it. Raises: HTTPException: 400 if fields is invalid, 404 if the trace is missing or outside the key\u0026#x27;s project, 500 on a reader failure.\">\u003cmeta data-mint-head name=\"application-name\" content=\"traceroot\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracerootai/oFGBx2VNS2taHdJt/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracerootai/oFGBx2VNS2taHdJt/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracerootai/oFGBx2VNS2taHdJt/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracerootai/oFGBx2VNS2taHdJt/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracerootai/oFGBx2VNS2taHdJt/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracerootai/oFGBx2VNS2taHdJt/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracerootai/oFGBx2VNS2taHdJt/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracerootai/oFGBx2VNS2taHdJt/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/tracerootai/oFGBx2VNS2taHdJt/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get Trace - traceroot\">\u003cmeta data-mint-head property=\"og:description\" content=\"Get a single trace for the caller\u0026#x27;s project. Defaults to the lightweight skeleton projection (no per-span I/O); pass fields=full (or fields=io,metadata) for per-span input/output/metadata. Args: auth (DualStampedAuth): Resolved credential context (API key or user session token); scopes the read to its project and stamps the rate-limit identity. trace_id (str): Trace to fetch. fields (str | None): Comma-separated projection groups (e.g. io, metadata) or an alias (skeleton/full). None selects the default skeleton projection. Returns: PublicTraceDetailResponse: The trace with span skeletons, plus per-span I/O when the projection requests it. Raises: HTTPException: 400 if fields is invalid, 404 if the trace is missing or outside the key\u0026#x27;s project, 500 on a reader failure.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"traceroot\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://traceroot.ai/docs/api-reference/traces/get-trace\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://tracerootai.mintlify.site/docs/_mintlify/api/og/v2?division=Traces\u0026amp;title=Get+Trace\u0026amp;description=Get+a+single+trace+for+the+caller%27s+project.%0A%0ADefaults+to+the+lightweight+%60skeleton%60+projection+%28no+per-span+I%2FO%29%3B+pass%0A%60fields%3Dfull%60+%28or+%60fields%3Dio%2Cmetadata%60%29+\u0026amp;theme=d362eef18ac49c168b8bb565\u0026amp;signature=4d75ea7de22bd75fbd942e85107899a97a4ac7c80575627a52bfd63f0a6bd41d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Get Trace - traceroot\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Get a single trace for the caller\u0026#x27;s project. Defaults to the lightweight skeleton projection (no per-span I/O); pass fields=full (or fields=io,metadata) for per-span input/output/metadata. Args: auth (DualStampedAuth): Resolved credential context (API key or user session token); scopes the read to its project and stamps the rate-limit identity. trace_id (str): Trace to fetch. fields (str | None): Comma-separated projection groups (e.g. io, metadata) or an alias (skeleton/full). None selects the default skeleton projection. Returns: PublicTraceDetailResponse: The trace with span skeletons, plus per-span I/O when the projection requests it. Raises: HTTPException: 400 if fields is invalid, 404 if the trace is missing or outside the key\u0026#x27;s project, 500 on a reader failure.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://tracerootai.mintlify.site/docs/_mintlify/api/og/v2?division=Traces\u0026amp;title=Get+Trace\u0026amp;description=Get+a+single+trace+for+the+caller%27s+project.%0A%0ADefaults+to+the+lightweight+%60skeleton%60+projection+%28no+per-span+I%2FO%29%3B+pass%0A%60fields%3Dfull%60+%28or+%60fields%3Dio%2Cmetadata%60%29+\u0026amp;theme=d362eef18ac49c168b8bb565\u0026amp;signature=4d75ea7de22bd75fbd942e85107899a97a4ac7c80575627a52bfd63f0a6bd41d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/tracerootai/oFGBx2VNS2taHdJt/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"traceroot\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0f172a\">\u003clink data-mint-head rel=\"canonical\" href=\"https://traceroot.ai/docs/api-reference/traces/get-trace\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/traces/get-trace.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://traceroot.ai/#organization\",\"name\":\"traceroot\",\"url\":\"https://traceroot.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/tracerootai/w6ZCi-88-jgYww6Q/logo/light.png?fit=max\u0026auto=format\u0026n=w6ZCi-88-jgYww6Q\u0026q=85\u0026s=923b414b9ceb5508b3852e0695a57a7d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://traceroot.ai/docs#website\",\"name\":\"traceroot\",\"url\":\"https://traceroot.ai/docs\",\"publisher\":{\"@id\":\"https://traceroot.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://traceroot.ai/docs/api-reference/traces/get-trace#webpage\",\"url\":\"https://traceroot.ai/docs/api-reference/traces/get-trace\",\"name\":\"Get Trace\",\"description\":\"Get a single trace for the caller's project. Defaults to the lightweight skeleton projection (no per-span I/O); pass fields=full (or fields=io,metadata) for per-span input/output/metadata. Args: auth (DualStampedAuth): Resolved credential context (API key or user session token); scopes the read to its project and stamps the rate-limit identity. trace_id (str): Trace to fetch. fields (str | None): Comma-separated projection groups (e.g. io, metadata) or an alias (skeleton/full). None selects the default skeleton projection. Returns: PublicTraceDetailResponse: The trace with span skeletons, plus per-span I/O when the projection requests it. Raises: HTTPException: 400 if fields is invalid, 404 if the trace is missing or outside the key's project, 500 on a reader failure.\",\"dateModified\":\"2026-11-05T22:52:04.745Z\",\"isPartOf\":{\"@id\":\"https://traceroot.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://traceroot.ai/docs/api-reference/traces/get-trace#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://traceroot.ai/docs/api-reference/traces/get-trace#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://traceroot.ai/docs/api-reference/alerts/list-alerts\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Traces\",\"item\":\"https://traceroot.ai/docs/api-reference/traces/list-traces\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Get Trace\",\"item\":\"https://traceroot.ai/docs/api-reference/traces/get-trace\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://traceroot.ai/docs/api-reference/traces/get-trace#apireference\",\"headline\":\"Get Trace\",\"name\":\"Get Trace\",\"description\":\"Get a single trace for the caller's project. Defaults to the lightweight skeleton projection (no per-span I/O); pass fields=full (or fields=io,metadata) for per-span input/output/metadata. Args: auth (DualStampedAuth): Resolved credential context (API key or user session token); scopes the read to its project and stamps the rate-limit identity. trace_id (str): Trace to fetch. fields (str | None): Comma-separated projection groups (e.g. io, metadata) or an alias (skeleton/full). None selects the default skeleton projection. Returns: PublicTraceDetailResponse: The trace with span skeletons, plus per-span I/O when the projection requests it. Raises: HTTPException: 400 if fields is invalid, 404 if the trace is missing or outside the key's project, 500 on a reader failure.\",\"url\":\"https://traceroot.ai/docs/api-reference/traces/get-trace\",\"mainEntityOfPage\":{\"@id\":\"https://traceroot.ai/docs/api-reference/traces/get-trace#webpage\"},\"dateModified\":\"2026-11-05T22:52:04.745Z\",\"publisher\":{\"@id\":\"https://traceroot.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://traceroot.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"traceroot\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"traceroot","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/getting-started/introduction"}]},{"tab":"Integrations","icon":"puzzle-piece","pages":[{"title":"Integrations","href":"/integrations/overview"}]},{"tab":"API Reference","icon":"square-code","groups":[{"group":"Overview","pages":[{"title":"Authentication","href":"/api-reference/authentication"}]},{"group":"Endpoints","pages":[{"group":"Alerts","pages":[{"title":"List Alerts","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/alerts","href":"/api-reference/alerts/list-alerts"},{"title":"Create an alert","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/public/alerts","href":"/api-reference/alerts/create-an-alert"},{"title":"Get Alert","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/alerts/{alert_id}","href":"/api-reference/alerts/get-alert"},{"title":"Delete an alert","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /api/v1/public/alerts/{alert_id}","href":"/api-reference/alerts/delete-an-alert"},{"title":"Edit an alert rule","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /api/v1/public/alerts/{alert_id}","href":"/api-reference/alerts/edit-an-alert-rule"},{"title":"Pause or resume an alert","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /api/v1/public/alerts/{alert_id}/status","href":"/api-reference/alerts/pause-or-resume-an-alert"}]},{"group":"Dashboards","pages":[{"title":"List Dashboards","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/dashboards","href":"/api-reference/dashboards/list-dashboards"},{"title":"Create a dashboard","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/public/dashboards","href":"/api-reference/dashboards/create-a-dashboard"},{"title":"Get Dashboard","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/dashboards/{dashboard_id}","href":"/api-reference/dashboards/get-dashboard"},{"title":"Delete a dashboard","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /api/v1/public/dashboards/{dashboard_id}","href":"/api-reference/dashboards/delete-a-dashboard"},{"title":"Edit a dashboard","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /api/v1/public/dashboards/{dashboard_id}","href":"/api-reference/dashboards/edit-a-dashboard"},{"title":"Get Dashboard Data","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/dashboards/{dashboard_id}/data","href":"/api-reference/dashboards/get-dashboard-data"}]},{"group":"Offline Eval","pages":[{"title":"Read one dataset version and a page of its test cases","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/dataset-versions/{version_id}","href":"/api-reference/offline-eval/read-one-dataset-version-and-a-page-of-its-test-cases"},{"title":"List the project's evaluation datasets","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/datasets","href":"/api-reference/offline-eval/list-the-projects-evaluation-datasets"},{"title":"Read one evaluation dataset","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/datasets/{dataset_id}","href":"/api-reference/offline-eval/read-one-evaluation-dataset"},{"title":"List a dataset's published versions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/datasets/{dataset_id}/versions","href":"/api-reference/offline-eval/list-a-datasets-published-versions"},{"title":"List the project's evaluation runs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/evaluation-runs","href":"/api-reference/offline-eval/list-the-projects-evaluation-runs"},{"title":"Register an evaluation run","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/public/evaluation-runs","href":"/api-reference/offline-eval/register-an-evaluation-run"},{"title":"Read an evaluation run's summary","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/evaluation-runs/{run_id}","href":"/api-reference/offline-eval/read-an-evaluation-runs-summary"},{"title":"Complete/finalize an evaluation run","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/public/evaluation-runs/{run_id}/complete","href":"/api-reference/offline-eval/completefinalize-an-evaluation-run"},{"title":"Upsert one test-case result with scores","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/public/evaluation-runs/{run_id}/results","href":"/api-reference/offline-eval/upsert-one-test-case-result-with-scores"},{"title":"List the project's evaluations","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/evaluations","href":"/api-reference/offline-eval/list-the-projects-evaluations"}]},{"group":"Detectors","pages":[{"title":"List Detectors","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/detectors","href":"/api-reference/detectors/list-detectors"},{"title":"Create a detector","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/public/detectors","href":"/api-reference/detectors/create-a-detector"},{"title":"List Findings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/detectors/findings","href":"/api-reference/detectors/list-findings"},{"title":"Get Finding","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/detectors/findings/{finding_id}","href":"/api-reference/detectors/get-finding"},{"title":"Get Finding By Trace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/detectors/traces/{trace_id}/finding","href":"/api-reference/detectors/get-finding-by-trace"},{"title":"Get Detector","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/detectors/{detector_id}","href":"/api-reference/detectors/get-detector"},{"title":"Delete a detector","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /api/v1/public/detectors/{detector_id}","href":"/api-reference/detectors/delete-a-detector"},{"title":"Edit a detector","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /api/v1/public/detectors/{detector_id}","href":"/api-reference/detectors/edit-a-detector"}]},{"group":"Account","pages":[{"title":"List Projects","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/projects","href":"/api-reference/account/list-projects"},{"title":"Create a project","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/public/projects","href":"/api-reference/account/create-a-project"},{"title":"Delete a project","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /api/v1/public/projects/{project_id}","href":"/api-reference/account/delete-a-project"},{"title":"Edit a project","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /api/v1/public/projects/{project_id}","href":"/api-reference/account/edit-a-project"},{"title":"List Workspaces","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/workspaces","href":"/api-reference/account/list-workspaces"},{"title":"Create a workspace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/public/workspaces","href":"/api-reference/account/create-a-workspace"},{"title":"Delete a workspace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /api/v1/public/workspaces/{workspace_id}","href":"/api-reference/account/delete-a-workspace"},{"title":"Rename a workspace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /api/v1/public/workspaces/{workspace_id}","href":"/api-reference/account/rename-a-workspace"}]},{"group":"Sessions","pages":[{"title":"List Sessions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/sessions","href":"/api-reference/sessions/list-sessions"},{"title":"Get Session","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/sessions/{session_id}","href":"/api-reference/sessions/get-session"}]},{"group":"Signals","pages":[{"title":"List Signals","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/signals","href":"/api-reference/signals/list-signals"},{"title":"Get Signal","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/signals/{signal_id}","href":"/api-reference/signals/get-signal"},{"title":"Resolve or reopen a signal","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /api/v1/public/signals/{signal_id}/status","href":"/api-reference/signals/resolve-or-reopen-a-signal"}]},{"group":"SQL","pages":[{"title":"Run Sql","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/public/sql","href":"/api-reference/sql/run-sql"},{"title":"Get Sql Schema","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/sql/schema","href":"/api-reference/sql/get-sql-schema"}]},{"group":"Traces","pages":[{"title":"List Traces","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/traces","href":"/api-reference/traces/list-traces"},{"title":"Ingest Traces","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/public/traces","href":"/api-reference/traces/ingest-traces"},{"title":"List Trace Filter Values","description":"Distinct values for an open-ended categorical filter field.\n\nThe values-discovery companion to the typed ``filters`` parameter on the\ntrace list: the filterable field catalog lives in the generated schema,\nwhile a field's current values are dynamic per project. Only fields the\nregistry marks as distinct-query (model_name, environment) are listable;\nthe field is resolved through the registry before it reaches SQL, so it can\nnever be a raw client-supplied column name.\n\nArgs:\n auth (DualStampedAuth): Resolved credential context (API key or user\n session token); scopes the read to its project and stamps the\n rate-limit identity.\n field (str): The categorical field to enumerate.\n start_after (datetime | None): Lower bound on span start time (active\n window).\n end_before (datetime | None): Upper bound on span start time (active\n window), symmetric with ``start_after`` so options match the list's\n window.\n\nReturns:\n FilterValuesResponse: Distinct values ordered by descending frequency.\n\nRaises:\n HTTPException: 400 if the field is unknown or not a distinct-query\n categorical, 500 on a reader failure.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/traces/filter-values/{field}","href":"/api-reference/traces/list-trace-filter-values"},{"title":"Get Trace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/traces/{trace_id}","href":"/api-reference/traces/get-trace"},{"title":"Export Trace","description":"Export the V1 bundle (trace + spans + git_context + manifest) for the caller's project.\n\nDefaults to the `full` projection — an export is explicit intent to take the\ncomplete trace, so per-span input/output/metadata are included unless the\ncaller narrows `fields`. `bundle.trace` equals the `traces get` payload at the\nsame projection.\n\nRate limited on its own `export` bucket because it builds and serializes the\nfull bundle.\n\nArgs:\n auth (DualStampedAuth): Resolved credential context (API key or user\n session token); scopes the read to its project and stamps the\n rate-limit identity.\n trace_id (str): Trace to export.\n fields (str | None): Comma-separated projection groups or an alias\n (``skeleton``/``full``). ``None`` selects the default `full`\n projection.\n\nReturns:\n PublicTraceExportResponse: The V1 export bundle (manifest, trace, spans,\n git_context) at the requested projection.\n\nRaises:\n HTTPException: 400 if `fields` is invalid, 404 if the trace is missing\n or outside the key's project, 500 on a reader failure.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/traces/{trace_id}/export","href":"/api-reference/traces/export-trace"}]},{"group":"Whoami","pages":[{"title":"Whoami","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/whoami","href":"/api-reference/whoami/whoami"}]},{"group":"Widgets","pages":[{"title":"Create a dashboard widget","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/public/widgets","href":"/api-reference/widgets/create-a-dashboard-widget"},{"title":"Run Widget Query","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/public/widgets/query","href":"/api-reference/widgets/run-widget-query"},{"title":"Get Widget","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/widgets/{widget_id}","href":"/api-reference/widgets/get-widget"},{"title":"Delete a dashboard widget","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /api/v1/public/widgets/{widget_id}","href":"/api-reference/widgets/delete-a-dashboard-widget"},{"title":"Edit a dashboard widget","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /api/v1/public/widgets/{widget_id}","href":"/api-reference/widgets/edit-a-dashboard-widget"},{"title":"Get Widget Data","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/public/widgets/{widget_id}/data","href":"/api-reference/widgets/get-widget-data"}]}]}]}]},"basePath":"","title":"Get Trace - traceroot","buildId":"dpl_BSPUBxEoKhhK7HzXVDPxdPvWx4xc","deploymentId":"dpl_BSPUBxEoKhhK7HzXVDPxdPvWx4xc","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Do6EtGSl.js","utils-id4tQ6My.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-Byrixac4.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-nakYa3Zl.js","snippetPresets-Bq-pUS7h.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-CujTC_9K.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-FneVUsVu.js","shallow-DY9WpUCz.js","getApiPlaygroundDisplay-Bz8WpPfA.js","CodeSnippet-DgCuJg4G.js","CodeSnippets-Dub9c4T0.js","Page-CePXnjd1.js","getPastedJson-xdI8y2XB.js","icon--yVw5vkr.js","MethodPill-C47t7MdS.js","DuplicateIcon-BzwJ2LeC.js","createIcon-BzggGy84.js","DynamicMarkdown-AlxJK8VR.js","SectionHeading-CMlwFxdK.js","axios-vUo_bRtp.js","Markdown-BNgNrPsi.js","clsx-apD-Q0Oo.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-qmLwQyWY.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Dc4qTkWx.js"]}