Skip to main content
POST
/
api
/
v1
/
traces
cURL
curl --request POST \
  --url http://studio.premai.io/api/v1/traces \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "modelId": "<string>",
    "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "input": "<string>",
    "output": "<string>",
    "score": 0.5,
    "feedback": "<string>"
  }
]'
{
  "results": [
    {
      "traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "success": true
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json · object[]
modelId
string
required

Identifier (or alias) for the model that produced the trace.

Minimum length: 1
input
string
required

Prompt or message provided to the model.

Minimum length: 1
output
string
required

Model response captured for the trace.

Minimum length: 1
score
number
required

Evaluator score used to determine if the trace is positive.

Required range: 0 <= x <= 1
projectId
string<uuid>

Project identifier that groups this trace. Leave empty to keep it unassigned.

feedback
string | null

Optional feedback explaining the score or providing guidance.

Maximum length: 2048

Response

success response

results
object[]
required

One entry per trace provided in the request.