Skip to main content
PUT
/
api
/
v1
/
traces
/
{id}
cURL
curl --request PUT \
  --url http://studio.premai.io/api/v1/traces/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "score": 0.5,
  "feedback": "<string>",
  "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "2023-11-07T05:31:56Z",
  "modelId": "<string>",
  "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "input": "<string>",
  "output": "<string>",
  "score": 0.5,
  "feedback": "<string>",
  "addedToDataset": true,
  "processingStatus": "none"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string<uuid>
required

Body

application/json
score
number

Updated evaluator score between 0 and 1.

Required range: 0 <= x <= 1
feedback
string | null

Updated feedback text for this trace.

Maximum length: 2048
projectId
string<uuid> | null

Project to associate with the trace.

Response

success response

id
string<uuid>
required

Unique trace identifier.

createdAt
string<date-time>
required

ISO timestamp representing when the trace was recorded.

modelId
string
required

Model identifier attached to the trace.

projectId
string<uuid> | null
required

Project identifier, null when the trace is not linked to a project.

input
string
required

Prompt or message provided to the model.

output
string
required

Model response captured for the trace.

score
number | null
required

Score between 0 and 1. Null when the trace has not been scored yet.

Required range: 0 <= x <= 1
feedback
string | null
required

Feedback provided for the trace.

Maximum length: 2048
addedToDataset
boolean
required

Flag indicating whether the trace is already in the dataset.

processingStatus
enum<string>
required

Background processing status used when generating improved datapoints.

Available options:
none,
processing,
failed