Skip to main content
Opik Documentation

Search documentation

Type to search this documentation.

Create trace

POST/v1/private/tracesCreate trace

Get trace

Request body

application/json
objectTrace_Write
end_timestring · date-time
environmentstring

maxLength 150 · minLength 0

error_infoobject
Show child attributes
exception_typestringrequired

minLength 1

messagestring
tracebackstringrequired

minLength 1

idstring · uuid
inputobject
Show child attributes
anyOf · 3 options
Option 1object
Option 2array of object
Option 3string
last_updated_atstring · date-time
namestring
project_namestring

If null, the default project is used

pattern (?s)^\s*(\S.*\S|\S)\s*$

sourcestring

one of "sdk", "experiment", "playground", "optimization", "evaluator"

start_timestring · date-timerequired
tagsarray of string

uniqueItems true

Show child attributes

uniqueItems true

thread_idstring
ttftnumber · double

Time to first token in milliseconds

Example request
{
  "end_time": "2026-06-09T00:00:00Z",
  "environment": "string",
  "error_info": {
    "exception_type": "string",
    "message": "string",
    "traceback": "string"
  },
  "id": "00000000-0000-0000-0000-000000000000",
  "input": {},
  "last_updated_at": "2026-06-09T00:00:00Z",
  "metadata": {},
  "name": "string",
  "output": {},
  "project_name": "string",
  "source": "evaluator",
  "start_time": "2026-06-09T00:00:00Z",
  "tags": [
    "string"
  ],
  "thread_id": "string",
  "ttft": 0
}

Responses

201Created

Headers

Location
Documentation menu