For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Copy to LLMGithubGo to App
DocumentationIntegrationsBuilding Self-Improving AgentsSelf-hosting OpikSDK & API reference
DocumentationIntegrationsBuilding Self-Improving AgentsSelf-hosting OpikSDK & API reference
    • Overview
  • Python SDK
    • Reference
    • REST API Client
  • Typescript SDK
    • Overview
    • Opik TS
    • Prompts
    • Opik Query Language (OQL)
  • Rest API
    • Overview
        • POSTAdd thread comment
        • POSTAdd trace comment
        • PUTAdd trace feedback score
        • POSTCreate traces
        • PATCHBatch update traces
        • PATCHBatch update threads
        • PUTClose trace thread(s)
        • GETGet traces by project_name or project_id
        • POSTCreate trace
        • GETGet trace by id
        • DELDelete trace by id
        • PATCHUpdate trace by id
        • POSTDelete thread comments
        • POSTDelete thread feedback scores
        • POSTDelete trace comments
        • POSTDelete trace feedback score
        • POSTDelete trace threads
        • POSTDelete traces
        • GETFind Feedback Score names
        • GETFind Trace Threads Feedback Score names
        • GETGet trace stats
        • GETGet thread comment
        • GETGet trace thread stats
        • GETGet trace comment
        • POSTGet trace thread
        • GETGet trace threads
        • PUTOpen trace thread
        • PUTBatch feedback scoring for threads
        • PUTBatch feedback scoring for traces
        • POSTSearch trace threads
        • POSTSearch traces
        • PATCHUpdate thread
        • PATCHUpdate thread comment by id
        • PATCHUpdate trace comment by id
LogoLogo
Copy to LLMGithubGo to App
Rest APIAPI ReferenceTraces

Create trace

POST
/v1/private/traces
POST
/api/v1/private/traces
$curl -X POST http://localhost:5173/api/v1/private/traces \
> -H "Content-Type: application/json" \
> -d '{
> "start_time": "2024-01-15T09:30:00Z"
>}'
201Created
1{}
Get trace
Was this page helpful?
Previous

Get trace by id

Next
Built with

Request

This endpoint expects an object.
start_timedatetimeRequired
idstringOptionalformat: "uuid"
project_namestringOptionalformat: "(?s)^\s*(\S.*\S|\S)\s*$"
If null, the default project is used
namestringOptional
end_timedatetimeOptional
inputmap from strings to any or list of objects or stringOptional
outputmap from strings to any or list of objects or stringOptional
metadatamap from strings to any or list of objects or stringOptional
tagslist of stringsOptional
error_infoobjectOptional
last_updated_atdatetimeOptional
ttftdoubleOptional
Time to first token in milliseconds
thread_idstringOptional
sourceenumOptional
Allowed values:
environmentstringOptional0-150 characters

Response headers

Locationstring

Response

Created