Create Trace
POSThttps://api.confident-ai.com/v2/traces
Creates a trace in your Confident AI project, with the spans it contains, and returns its uuid. Send metricCollection to evaluate the trace online, threadId to group it into a conversation, userId to attribute it to an end user, or testRunId with metricCollection to record it as a test case of an in-progress test run. Values that are not UUIDs are hashed into one, and the returned uuid is the hashed value.
curl -X POST "https://api.confident-ai.com/v2/traces" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"uuid": "<TRACE-UUID>",
"name": "Geography QA",
"input": "What is the capital of France?",
"output": "The capital of France is Paris.",
"startTime": "2025-01-15T10:30:00Z",
"endTime": "2025-01-15T10:30:05Z",
"status": "SUCCESS",
"environment": "production",
"metadata": {
"client": "acme-corp"
},
"tags": [
"geography"
],
"threadId": "thread-42",
"thread": {
"id": "thread-42",
"metadata": {
"client": "acme-corp",
"agentId": "geography-agent"
},
"tags": [
"vip"
]
},
"userId": "end-user-42",
"metricCollection": "Collection Name",
"testRunId": "<TEST-RUN-ID>",
"testCaseId": "<TEST-CASE-ID>",
"turnId": "<TURN-ID>",
"retrievalContext": [
"Paris is the capital and most populous city of France."
],
"context": [
"Paris is the capital of France."
],
"expectedOutput": "Paris",
"toolsCalled": [
{
"name": "get_landmark_info",
"type": "FUNCTION",
"description": "This tool gives information about a mountain.",
"inputParameters": {
"mountain": "Everest"
},
"output": "8,848 metres",
"reasoning": "The user asked for the height of a mountain."
}
],
"expectedTools": [
{
"name": "get_landmark_info",
"type": "FUNCTION",
"description": "This tool gives information about a mountain.",
"inputParameters": {
"mountain": "Everest"
},
"output": "8,848 metres",
"reasoning": "The user asked for the height of a mountain."
}
],
"spans": [
{
"uuid": "<SPAN-UUID>",
"type": "LLM",
"name": "OpenAI Call",
"model": "gpt-4o",
"provider": "OpenAI",
"integration": "LangChain",
"input": "What is the capital of France?",
"output": "The capital of France is Paris.",
"startTime": "2025-01-15T10:30:00Z",
"endTime": "2025-01-15T10:30:02Z"
}
],
"metricsData": [
{
"name": "Answer Relevancy",
"score": 0.95,
"success": true,
"threshold": 0.5,
"strictMode": false,
"flaky": false,
"reason": "The answer directly states the capital of France.",
"evaluationModel": "gpt-4o",
"evaluationCost": 0.0004,
"error": null,
"errorType": "AI_CONNECTION_ERROR",
"verboseLogs": null
}
],
"attachments": {
"doc-1": {
"mimeType": "application/pdf",
"dataBase64": "JVBERi0xLjQK"
}
}
}'{
"success": true,
"data": {
"uuid": "<TRACE-UUID>"
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/observatory/traces/<TRACE-ID>",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Request body
uuidstringRequiredThe unique identifier of the trace, generated by your application. Values that are not UUIDs are hashed into one, and the hashed uuid is what the response and every later lookup use.
namestringThis is the name of the trace.
inputanyThis is the input to the trace, as a string or any JSON value.
outputanyThis is the output of the trace, as a string or any JSON value.
startTimestringRequiredThis is the time the trace started, as an ISO 8601 datetime.
endTimestringRequiredThis is the time the trace ended, as an ISO 8601 datetime.
statusenumThis represents the error status of a trace or span: SUCCESS when it completed, ERRORED when it failed.
Show 2 enum valuesHide 2 enum values
SUCCESSERRORED
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.
threadIdstringThis is the unique identifier of the thread associated with the trace, which groups traces in the same thread into a conversation.
threadobjectThread-level fields applied to the thread record.
idis an alternate way to specify the thread and 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.metadataobject | nullCustom 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.
tagsarray | nullTags 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. It cannot be combined withtestCaseId.testCaseIdstringThe id of an existing test case to attach the trace to, when the trace was produced while evaluating that test case.
turnIdstringThe id of the conversational test case turn to attach the trace to, when the trace was produced while evaluating that turn.
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 6 propertiesHide 6 properties
namestringRequiredThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis 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 6 propertiesHide 6 properties
namestringRequiredThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
spanslist of object | object | object | object | objectThis is the list of spans in the trace. Each span's
typedecides which fields it accepts.Show 5 variantsHide 5 variants
Base SpanobjectA plain span with no model, retriever, tool or agent detail.
Show 19 propertiesHide 19 properties
typeenumThe type of the span. Omit it, or send SPAN, for a plain span.
Show 1 enum valueHide 1 enum value
SPAN
uuidstringRequiredThe unique identifier of the span, generated by your application. Values that are not UUIDs are hashed into one.
namestringRequiredThis is the name of the span.
inputanyThis is the input to the span, as a string or any JSON value.
outputanyThis is the output of the span, as a string or any JSON value.
errorstringThis is the error message, if an error occurred inside the span.
statusenumThis represents the error status of a trace or span: SUCCESS when it completed, ERRORED when it failed.
Show 2 enum valuesHide 2 enum values
SUCCESSERRORED
startTimestringRequiredThis is the time the span started, as an ISO 8601 datetime.
endTimestringRequiredThis is the time the span ended, as an ISO 8601 datetime.
parentUuidstringThis is the unique identifier of the span's parent span. Omit it for a root span.
metadataobjectThis is any additional metadata associated with the span.
metricCollectionstringThis is the metric collection to be used for evaluating the 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 6 propertiesHide 6 properties
namestringRequiredThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis 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 6 propertiesHide 6 properties
namestringRequiredThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis 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.
metricsDatalist of objectsMetric results you already computed for this span, recorded as-is instead of being evaluated by Confident AI.
Show 12 propertiesHide 12 properties
namestringRequiredThe name of the metric.
scorenumber | nullThe metric score, typically between 0 and 1.
successboolean | nullWhether the metric passed its threshold.
thresholdnumber | nullThe threshold the metric was scored against.
strictModebooleanWhether the metric ran in strict mode, which outputs a binary score of 0 or 1.
flakybooleanWhether the metric's verdict was non-deterministic across runs.
reasonstring | nullThe reason for the metric score.
evaluationModelstring | nullThe model used to evaluate the metric.
evaluationCostnumber | nullThe cost of running the evaluation in USD.
errorstring | nullThe error message if the evaluation failed.
errorTypeenum | nullWhy an evaluation errored: the AI connection or a transformer failed, the evaluation model failed, the test case lacked the parameters the metric needs, or an internal error occurred.
Show 5 enum valuesHide 5 enum values
AI_CONNECTION_ERRORTRANSFORMER_ERROREVALUATION_MODEL_ERRORINVALID_TEST_CASE_PARAMETERSINTERNAL_ERROR
verboseLogsstring | nullDetailed logs from the evaluation.
- OR
LLM SpanobjectA span recording a call to a language model, with its model, token counts, costs and the prompt it used.
Show 30 propertiesHide 30 properties
typeenumRequiredThe type of the span, always LLM for an LLM span.
Show 1 enum valueHide 1 enum value
LLM
uuidstringRequiredThe unique identifier of the span, generated by your application. Values that are not UUIDs are hashed into one.
namestringRequiredThis is the name of the span.
inputanyThis is the input to the span, as a string or any JSON value.
outputanyThis is the output of the span, as a string or any JSON value.
errorstringThis is the error message, if an error occurred inside the span.
statusenumThis represents the error status of a trace or span: SUCCESS when it completed, ERRORED when it failed.
Show 2 enum valuesHide 2 enum values
SUCCESSERRORED
startTimestringRequiredThis is the time the span started, as an ISO 8601 datetime.
endTimestringRequiredThis is the time the span ended, as an ISO 8601 datetime.
parentUuidstringThis is the unique identifier of the span's parent span. Omit it for a root span.
metadataobjectThis is any additional metadata associated with the span.
metricCollectionstringThis is the metric collection to be used for evaluating the 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 6 propertiesHide 6 properties
namestringRequiredThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis 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 6 propertiesHide 6 properties
namestringRequiredThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis 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.
metricsDatalist of objectsMetric results you already computed for this span, recorded as-is instead of being evaluated by Confident AI.
Show 12 propertiesHide 12 properties
namestringRequiredThe name of the metric.
scorenumber | nullThe metric score, typically between 0 and 1.
successboolean | nullWhether the metric passed its threshold.
thresholdnumber | nullThe threshold the metric was scored against.
strictModebooleanWhether the metric ran in strict mode, which outputs a binary score of 0 or 1.
flakybooleanWhether the metric's verdict was non-deterministic across runs.
reasonstring | nullThe reason for the metric score.
evaluationModelstring | nullThe model used to evaluate the metric.
evaluationCostnumber | nullThe cost of running the evaluation in USD.
errorstring | nullThe error message if the evaluation failed.
errorTypeenum | nullWhy an evaluation errored: the AI connection or a transformer failed, the evaluation model failed, the test case lacked the parameters the metric needs, or an internal error occurred.
Show 5 enum valuesHide 5 enum values
AI_CONNECTION_ERRORTRANSFORMER_ERROREVALUATION_MODEL_ERRORINVALID_TEST_CASE_PARAMETERSINTERNAL_ERROR
verboseLogsstring | nullDetailed logs from the evaluation.
modelstringThis is the LLM model used in the span.
providerstringThis is the provider of the generation model used in the span.
endpointstringThis is the API endpoint the model was called through, for providers that expose more than one.
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.
promptAliasstringThis is the alias of your prompt which is stored on Confident AI.
promptVersionstringThis is the version assigned to your prompt on Confident AI.
promptLabelstringThis is the label assigned to a specific version of prompt on the Confident AI platform.
promptCommitHashstringThis is the hash of the current prompt being logged in the llm span.
- OR
Retriever SpanobjectA span recording a knowledge-base lookup, with the embedder and retrieval settings it used.
Show 22 propertiesHide 22 properties
typeenumRequiredThe type of the span, always RETRIEVER for a retriever span.
Show 1 enum valueHide 1 enum value
RETRIEVER
uuidstringRequiredThe unique identifier of the span, generated by your application. Values that are not UUIDs are hashed into one.
namestringRequiredThis is the name of the span.
inputanyThis is the input to the span, as a string or any JSON value.
outputanyThis is the output of the span, as a string or any JSON value.
errorstringThis is the error message, if an error occurred inside the span.
statusenumThis represents the error status of a trace or span: SUCCESS when it completed, ERRORED when it failed.
Show 2 enum valuesHide 2 enum values
SUCCESSERRORED
startTimestringRequiredThis is the time the span started, as an ISO 8601 datetime.
endTimestringRequiredThis is the time the span ended, as an ISO 8601 datetime.
parentUuidstringThis is the unique identifier of the span's parent span. Omit it for a root span.
metadataobjectThis is any additional metadata associated with the span.
metricCollectionstringThis is the metric collection to be used for evaluating the 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 6 propertiesHide 6 properties
namestringRequiredThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis 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 6 propertiesHide 6 properties
namestringRequiredThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis 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.
metricsDatalist of objectsMetric results you already computed for this span, recorded as-is instead of being evaluated by Confident AI.
Show 12 propertiesHide 12 properties
namestringRequiredThe name of the metric.
scorenumber | nullThe metric score, typically between 0 and 1.
successboolean | nullWhether the metric passed its threshold.
thresholdnumber | nullThe threshold the metric was scored against.
strictModebooleanWhether the metric ran in strict mode, which outputs a binary score of 0 or 1.
flakybooleanWhether the metric's verdict was non-deterministic across runs.
reasonstring | nullThe reason for the metric score.
evaluationModelstring | nullThe model used to evaluate the metric.
evaluationCostnumber | nullThe cost of running the evaluation in USD.
errorstring | nullThe error message if the evaluation failed.
errorTypeenum | nullWhy an evaluation errored: the AI connection or a transformer failed, the evaluation model failed, the test case lacked the parameters the metric needs, or an internal error occurred.
Show 5 enum valuesHide 5 enum values
AI_CONNECTION_ERRORTRANSFORMER_ERROREVALUATION_MODEL_ERRORINVALID_TEST_CASE_PARAMETERSINTERNAL_ERROR
verboseLogsstring | nullDetailed logs from the evaluation.
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
Tool SpanobjectA span recording a tool call.
Show 20 propertiesHide 20 properties
typeenumRequiredThe type of the span, always TOOL for a tool span.
Show 1 enum valueHide 1 enum value
TOOL
uuidstringRequiredThe unique identifier of the span, generated by your application. Values that are not UUIDs are hashed into one.
namestringRequiredThis is the name of the span.
inputanyThis is the input to the span, as a string or any JSON value.
outputanyThis is the output of the span, as a string or any JSON value.
errorstringThis is the error message, if an error occurred inside the span.
statusenumThis represents the error status of a trace or span: SUCCESS when it completed, ERRORED when it failed.
Show 2 enum valuesHide 2 enum values
SUCCESSERRORED
startTimestringRequiredThis is the time the span started, as an ISO 8601 datetime.
endTimestringRequiredThis is the time the span ended, as an ISO 8601 datetime.
parentUuidstringThis is the unique identifier of the span's parent span. Omit it for a root span.
metadataobjectThis is any additional metadata associated with the span.
metricCollectionstringThis is the metric collection to be used for evaluating the 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 6 propertiesHide 6 properties
namestringRequiredThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis 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 6 propertiesHide 6 properties
namestringRequiredThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis 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.
metricsDatalist of objectsMetric results you already computed for this span, recorded as-is instead of being evaluated by Confident AI.
Show 12 propertiesHide 12 properties
namestringRequiredThe name of the metric.
scorenumber | nullThe metric score, typically between 0 and 1.
successboolean | nullWhether the metric passed its threshold.
thresholdnumber | nullThe threshold the metric was scored against.
strictModebooleanWhether the metric ran in strict mode, which outputs a binary score of 0 or 1.
flakybooleanWhether the metric's verdict was non-deterministic across runs.
reasonstring | nullThe reason for the metric score.
evaluationModelstring | nullThe model used to evaluate the metric.
evaluationCostnumber | nullThe cost of running the evaluation in USD.
errorstring | nullThe error message if the evaluation failed.
errorTypeenum | nullWhy an evaluation errored: the AI connection or a transformer failed, the evaluation model failed, the test case lacked the parameters the metric needs, or an internal error occurred.
Show 5 enum valuesHide 5 enum values
AI_CONNECTION_ERRORTRANSFORMER_ERROREVALUATION_MODEL_ERRORINVALID_TEST_CASE_PARAMETERSINTERNAL_ERROR
verboseLogsstring | nullDetailed logs from the evaluation.
descriptionstringThis is the description of the tool used in the span.
- OR
Agent SpanobjectA span recording an agent step, with the tools and handoffs available to it.
Show 21 propertiesHide 21 properties
typeenumRequiredThe type of the span, always AGENT for an agent span.
Show 1 enum valueHide 1 enum value
AGENT
uuidstringRequiredThe unique identifier of the span, generated by your application. Values that are not UUIDs are hashed into one.
namestringRequiredThis is the name of the span.
inputanyThis is the input to the span, as a string or any JSON value.
outputanyThis is the output of the span, as a string or any JSON value.
errorstringThis is the error message, if an error occurred inside the span.
statusenumThis represents the error status of a trace or span: SUCCESS when it completed, ERRORED when it failed.
Show 2 enum valuesHide 2 enum values
SUCCESSERRORED
startTimestringRequiredThis is the time the span started, as an ISO 8601 datetime.
endTimestringRequiredThis is the time the span ended, as an ISO 8601 datetime.
parentUuidstringThis is the unique identifier of the span's parent span. Omit it for a root span.
metadataobjectThis is any additional metadata associated with the span.
metricCollectionstringThis is the metric collection to be used for evaluating the 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 6 propertiesHide 6 properties
namestringRequiredThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis 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 6 propertiesHide 6 properties
namestringRequiredThis is the name of the tool.
typeenumThe type of the tool call, either a function or an MCP tool.
Show 2 enum valuesHide 2 enum values
FUNCTIONMCP
descriptionstringThis is the description of the tool.
inputParametersobject | nullThis is the input parameters that are passed to the tool.
outputanyThis 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.
metricsDatalist of objectsMetric results you already computed for this span, recorded as-is instead of being evaluated by Confident AI.
Show 12 propertiesHide 12 properties
namestringRequiredThe name of the metric.
scorenumber | nullThe metric score, typically between 0 and 1.
successboolean | nullWhether the metric passed its threshold.
thresholdnumber | nullThe threshold the metric was scored against.
strictModebooleanWhether the metric ran in strict mode, which outputs a binary score of 0 or 1.
flakybooleanWhether the metric's verdict was non-deterministic across runs.
reasonstring | nullThe reason for the metric score.
evaluationModelstring | nullThe model used to evaluate the metric.
evaluationCostnumber | nullThe cost of running the evaluation in USD.
errorstring | nullThe error message if the evaluation failed.
errorTypeenum | nullWhy an evaluation errored: the AI connection or a transformer failed, the evaluation model failed, the test case lacked the parameters the metric needs, or an internal error occurred.
Show 5 enum valuesHide 5 enum values
AI_CONNECTION_ERRORTRANSFORMER_ERROREVALUATION_MODEL_ERRORINVALID_TEST_CASE_PARAMETERSINTERNAL_ERROR
verboseLogsstring | nullDetailed logs from the evaluation.
availableToolslist of stringsRequiredThis is the list of names of available tools to be used in the span.
agentHandoffslist of stringsRequiredThis is the list of potential agent handoffs in the span.
metricsDatalist of objectsMetric results you already computed for this trace, recorded as-is instead of being evaluated by Confident AI.
Show 12 propertiesHide 12 properties
namestringRequiredThe name of the metric.
scorenumber | nullThe metric score, typically between 0 and 1.
successboolean | nullWhether the metric passed its threshold.
thresholdnumber | nullThe threshold the metric was scored against.
strictModebooleanWhether the metric ran in strict mode, which outputs a binary score of 0 or 1.
flakybooleanWhether the metric's verdict was non-deterministic across runs.
reasonstring | nullThe reason for the metric score.
evaluationModelstring | nullThe model used to evaluate the metric.
evaluationCostnumber | nullThe cost of running the evaluation in USD.
errorstring | nullThe error message if the evaluation failed.
errorTypeenum | nullWhy an evaluation errored: the AI connection or a transformer failed, the evaluation model failed, the test case lacked the parameters the metric needs, or an internal error occurred.
Show 5 enum valuesHide 5 enum values
AI_CONNECTION_ERRORTRANSFORMER_ERROREVALUATION_MODEL_ERRORINVALID_TEST_CASE_PARAMETERSINTERNAL_ERROR
verboseLogsstring | nullDetailed logs from the evaluation.
attachmentsobjectMap of attachment ids to payloads for all
[DEEPEVAL:IMAGE:…]and[DEEPEVAL:PDF:…]markers in this trace. Define attachments at the trace level with the same ids for the same instances.
Response
Create Trace succeeded.
successbooleanIndicates if the request was successful.
dataobjectShow 1 propertyHide 1 property
uuidstringThis is the uuid of the trace. It is the uuid you sent, or its UUID hash when the value you sent was not a UUID.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.