Trace Ingestion
POSThttps://api.confident-ai.com/v1/traces
Creates a new trace on Confident AI.
curl -X POST "https://api.confident-ai.com/v1/traces" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"uuid": "string",
"name": "string",
"input": "string",
"output": "string",
"startTime": "2026-01-01T00:00:00Z",
"endTime": "2026-01-01T00:00:00Z",
"environment": "production",
"metadata": {},
"tags": [
"string"
],
"spans": [
{
"uuid": "string",
"name": "string",
"input": "string",
"output": "string",
"error": "string",
"status": "SUCCESS",
"startTime": "2026-01-01T00:00:00Z",
"endTime": "2026-01-01T00:00:00Z",
"parentUuid": "string",
"metadata": {},
"metricCollection": "string",
"type": "string",
"retrievalContext": [
"string"
],
"context": [
"string"
],
"expectedOutput": "string",
"toolsCalled": [
{
"name": "string",
"description": "string",
"inputParameters": {},
"output": "string",
"reasoning": "string"
}
],
"expectedTools": [
{
"name": "string",
"description": "string",
"inputParameters": {},
"output": "string",
"reasoning": "string"
}
],
"integration": "string"
}
],
"threadId": "string",
"thread": {
"id": "string",
"metadata": {},
"tags": [
"string"
]
},
"userId": "string",
"metricCollection": "string",
"testRunId": "string",
"retrievalContext": [
"string"
],
"context": [
"string"
],
"expectedOutput": "string",
"toolsCalled": [
{
"name": "string",
"description": "string",
"inputParameters": {},
"output": "string",
"reasoning": "string"
}
],
"expectedTools": [
{
"name": "string",
"description": "string",
"inputParameters": {},
"output": "string",
"reasoning": "string"
}
],
"attachments": {}
}'{
"success": true,
"data": {
"id": "string"
},
"link": "string",
"deprecated": true
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Request body
uuidstringRequiredThis is the unique identifier of the trace.
namestringThis is the name of the trace.
inputstringThis is the input to the trace.
outputstringThis is the output of the trace.
startTimestringRequiredThis is the time the trace started.
endTimestringRequiredThis is the time the trace ended.
environmentenumThis is the environment where your trace was posted, which helps with separating and debugging traces from different environments on the Confident AI platform.
Show 4 enum valuesHide 4 enum values
productiondevelopmentstagingtesting
metadataobjectThis is any additional metadata associated with the trace.
tagslist of stringsThis is any tags associated with the trace, which helps with grouping traces and filtering them on the Confident AI platform.
spanslist of object | object | object | object | objectThis is the list of base spans associated with the trace.
Show 5 variantsHide 5 variants
BaseSpanobjectShow 18 propertiesHide 18 properties
uuidstringRequiredThis is the unique identifier of the span.
namestringRequiredThis is the name of the span.
inputstringThis is the input to the span.
outputstringThis is the output of the span.
errorstringThis is the error message, if an error occurred inside the span.
statusenumThis represents the error status of the span.
Show 2 enum valuesHide 2 enum values
SUCCESSERRORED
startTimestringRequiredThis is the time the span started.
endTimestringRequiredThis is the time the span ended.
parentUuidstringThis is the unique identifier of the span's parent span.
metadataobjectThis is any additional metadata associated with the span.
metricCollectionstringThis is the metric collection to be used for evaluating the span.
typestringThis is a string that represents the type of span.
retrievalContextlist of stringsThis is the retrieval context of your span, which is to be used for evaluation.
contextlist of stringsThis is the ideal retrieval context of your span, which is to be used for evaluation.
expectedOutputstringThis is the expected output of your span, which is the ideal actual output and to be used for evaluation.
toolsCalledlist of objectsThis is the tools called by your span, which is to be used for evaluation.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
expectedToolslist of objectsThis is the expected tools to be called by the span, which is to be used for evaluation.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
integrationstringThis is the integration associated with the span.
- OR
LlmSpanobjectShow 28 propertiesHide 28 properties
uuidstringThis is the unique identifier of the span.
namestringThis is the name of the span.
inputstringThis is the input to the span.
outputstringThis is the output of the span.
errorstringThis is the error message, if an error occurred inside the span.
statusenumThis represents the error status of the span.
Show 2 enum valuesHide 2 enum values
SUCCESSERRORED
startTimestringThis is the time the span started.
endTimestringThis is the time the span ended.
parentUuidstringThis is the unique identifier of the span's parent span.
metadataobjectThis is any additional metadata associated with the span.
metricCollectionstringThis is the metric collection to be used for evaluating the span.
typestringThis is a string that represents the type of span.
retrievalContextlist of stringsThis is the retrieval context of your span, which is to be used for evaluation.
contextlist of stringsThis is the ideal retrieval context of your span, which is to be used for evaluation.
expectedOutputstringThis is the expected output of your span, which is the ideal actual output and to be used for evaluation.
toolsCalledlist of objectsThis is the tools called by your span, which is to be used for evaluation.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
expectedToolslist of objectsThis is the expected tools to be called by the span, which is to be used for evaluation.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
modelstringRequiredThis is the LLM model used in the span.
providerstringThis is the provider of the generation model used in the span.
integrationstringThis is the integration associated with the span.
promptAliasstringThis is the alias of your prompt which is stored on Confident AI.
promptCommitHashstringThis is the hash of the current prompt being logged in the llm span.
promptLabelstringThis is the label assigned to a specific version of prompt on the Confident AI platform.
promptVersionstringThis is the version assigned to your prompt on Confident AI.
costPerInputTokennumberThis is the cost per input token of the LLM model.
costPerOutputTokennumberThis is the cost per output token of the LLM model.
inputTokenCountintegerThis is the number of input tokens passed to the LLM model.
outputTokenCountintegerThis is the number of output tokens generated by the LLM model.
- OR
RetrieverSpanobjectShow 21 propertiesHide 21 properties
uuidstringThis is the unique identifier of the span.
namestringThis is the name of the span.
inputstringThis is the input to the span.
outputstringThis is the output of the span.
errorstringThis is the error message, if an error occurred inside the span.
statusenumThis represents the error status of the span.
Show 2 enum valuesHide 2 enum values
SUCCESSERRORED
startTimestringThis is the time the span started.
endTimestringThis is the time the span ended.
parentUuidstringThis is the unique identifier of the span's parent span.
metadataobjectThis is any additional metadata associated with the span.
metricCollectionstringThis is the metric collection to be used for evaluating the span.
typestringThis is a string that represents the type of span.
retrievalContextlist of stringsThis is the retrieval context of your span, which is to be used for evaluation.
contextlist of stringsThis is the ideal retrieval context of your span, which is to be used for evaluation.
expectedOutputstringThis is the expected output of your span, which is the ideal actual output and to be used for evaluation.
integrationstringThis is the integration associated with the span.
toolsCalledlist of objectsThis is the tools called by your span, which is to be used for evaluation.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
expectedToolslist of objectsThis is the expected tools to be called by the span, which is to be used for evaluation.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
embedderstringRequiredThis is the embedder model used in the span.
topKintegerThis is the top K chunks retrieved from your knowledge base.
chunkSizeintegerThis is the chunk size of each retrieved context.
- OR
ToolSpanobjectShow 19 propertiesHide 19 properties
uuidstringThis is the unique identifier of the span.
namestringThis is the name of the span.
inputstringThis is the input to the span.
outputstringThis is the output of the span.
errorstringThis is the error message, if an error occurred inside the span.
integrationstringThis is the integration associated with the span.
statusenumThis represents the error status of the span.
Show 2 enum valuesHide 2 enum values
SUCCESSERRORED
startTimestringThis is the time the span started.
endTimestringThis is the time the span ended.
parentUuidstringThis is the unique identifier of the span's parent span.
metadataobjectThis is any additional metadata associated with the span.
metricCollectionstringThis is the metric collection to be used for evaluating the span.
typestringThis is a string that represents the type of span.
retrievalContextlist of stringsThis is the retrieval context of your span, which is to be used for evaluation.
contextlist of stringsThis is the ideal retrieval context of your span, which is to be used for evaluation.
expectedOutputstringThis is the expected output of your span, which is the ideal actual output and to be used for evaluation.
toolsCalledlist of objectsThis is the tools called by your span, which is to be used for evaluation.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
expectedToolslist of objectsThis is the expected tools to be called by the span, which is to be used for evaluation.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
descriptionstringThis is the description of the tool used in the span.
- OR
AgentSpanobjectShow 20 propertiesHide 20 properties
uuidstringThis is the unique identifier of the span.
namestringThis is the name of the span.
inputstringThis is the input to the span.
outputstringThis is the output of the span.
integrationstringThis is the integration associated with the span.
errorstringThis is the error message, if an error occurred inside the span.
statusenumThis represents the error status of the span.
Show 2 enum valuesHide 2 enum values
SUCCESSERRORED
startTimestringThis is the time the span started.
endTimestringThis is the time the span ended.
parentUuidstringThis is the unique identifier of the span's parent span.
metadataobjectThis is any additional metadata associated with the span.
metricCollectionstringThis is the metric collection to be used for evaluating the span.
typestringThis is a string that represents the type of span.
retrievalContextlist of stringsThis is the retrieval context of your span, which is to be used for evaluation.
contextlist of stringsThis is the ideal retrieval context of your span, which is to be used for evaluation.
expectedOutputstringThis is the expected output of your span, which is the ideal actual output and to be used for evaluation.
toolsCalledlist of objectsThis is the tools called by your span, which is to be used for evaluation.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
expectedToolslist of objectsThis is the expected tools to be called by the span, which is to be used for evaluation.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
availableToolslist of stringsThis is the list of names of available tools to be used in the span.
agentHandoffslist of stringsThis is the list of potential agent handoffs in the span.
threadIdstringThis is the unique identifier of the thread associated with the trace.
threadobjectThread-level fields applied to the thread record.
thread.idis an alternate way to specify the thread (must match top-levelthreadIdif both are provided).metadataandtagsonly take effect when a thread id is resolvable; successive ingestions merge metadata keys, while tags replace any prior value.Show 3 propertiesHide 3 properties
idstringThe thread id. Equivalent to top-level
threadId; if both are set they must match.metadataobjectCustom key/value metadata to attach to the thread. Values can be any JSON-serializable type and are stringified server-side. Successive ingestions for the same thread merge metadata keys.
tagslist of stringsTags to set on the thread. Replaces any previously stored tags.
userIdstringThis is the unique identifier for your end user for the trace.
metricCollectionstringThis is the metric collection you wish to use to evaluate the trace.
testRunIdstringThis is the unique identifier of the test run to associate the trace with. When set, the trace becomes one test case in that test run, and
metricCollectionis required. Create a test run with thePOST /v1/test-runsendpoint to get this id.retrievalContextlist of stringsThis is the retrieval context of your trace, which is to be used for evaluation.
contextlist of stringsThis is the ideal retrieval context of your trace, which is to be used for evaluation.
expectedOutputstringThis is the expected output of your trace, which is the ideal actual output and to be used for evaluation.
toolsCalledlist of objectsThis is the tools called by your trace, which is to be used for evaluation.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
expectedToolslist of objectsThis is the expected tools to be called by the trace, which is to be used for evaluation.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
attachmentsobjectMap of attachment ids to payloads for all
[DEEPEVAL:IMAGE:…]and[DEEPEVAL:PDF:…]markers in this trace. Define attachments at the trace level with same ids for same instances.
Response
successbooleanA boolean indicating the success or failure of the API call
dataobjectThis maps to the trace id.
Show 1 propertyHide 1 property
idstringThis is the uuid of the trace.
linkstringThis is the URL to the trace on the Confident AI platform.
deprecatedbooleanThis is true if this endpoint is deprecated.