Skip to main content
POST
Create a trace

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string | null

The name of the trace

Example:

"qa-chatbot"

featureSlug
string

The slug of the feature in Basalt.

Example:

"qa-chatbot"

chainSlug
string
deprecated

Deprecated: Use featureSlug instead. The slug of the feature in Basalt.

Example:

"qa-chatbot"

input

The input of the trace

Example:

"What is the capital of France?"

output

The output of the trace

Example:

"Paris"

idealOutput

The ideal output of the trace. Used in some evaluators.

metadata
object | null

Additional metadata to be associated with the trace.

Example:
organization
object | null

The organization related to the trace. Used to identify the organization of the user that triggered the trace.

Example:
user
object | null

The user related to the trace. Used to identify the user that triggered the trace.

Example:
startTime

The start time of the trace

Example:

"2021-01-01T00:00:00Z"

endTime

The end time of the trace

Example:

"2021-01-01T00:00:00Z"

experiment
object | null

The experiment to append the trace to. You must create an experiment before.

Example:
logs
object[] | null

The logs to append to the trace.

Example:
evaluators
object[] | null

The evaluators used to generate the trace.

Example:
evaluationConfig
object | null

The evaluation configuration of the trace.

Example:

Response

The trace created

trace
object
required

The trace created

Example:
warning
string | null

The warning message

Example:

"No prompt found with the given slug or no production version found or no prompt found with the given version or tag (production version also missing)"