AI observability
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
GET | |
GET | |
GET | |
GET | |
GET | |
GET | |
GET | |
GET | |
POST | |
POST |
Retrieve ai observability traces evaluations
A trace's evaluation results, newest first and at most 250, each with its outcome and label ready to render, plus a roll-up of the latest run of each evaluation on each node.
Required API key scopes
llm_analytics:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /ai_observability /traces /:id /evaluationsExample response
Status 200
Status 400 The encoded trace id is malformed.
Status 429 Too many queries are running for the project or organization.
Create ai observability traces exports
Starts writing the trace and every node, inputs and outputs included, to a JSON file. Poll the export until it completes, then download it.
Required API key scopes
llm_analytics:readPath parameters
- idstring
Request parameters
- timestamp_hintstring
Response
Example request
POST /api /projects /:project_id /ai_observability /traces /:id /exportsExample response
Status 201
Status 400 The timestamp hint or the encoded trace id is malformed.
Status 429 Too many exports were requested.
Retrieve ai observability traces exports
The state of one of your exports of this trace.
Required API key scopes
llm_analytics:readPath parameters
- export_idinteger
- idstring
Response
Example request
GET /api /projects /:project_id /ai_observability /traces /:id /exports /:export_idExample response
Status 200
Status 400 The encoded trace id is malformed.
Status 404 You have no export with this id for this trace.
Retrieve ai observability traces exports content
Downloads a completed export as a JSON file.
Required API key scopes
llm_analytics:readPath parameters
- export_idinteger
- idstring
Query parameters
- purposestringDefault:
downloadOne of:"download""copy"
Response
Example request
GET /api /projects /:project_id /ai_observability /traces /:id /exports /:export_id /contentExample response
Status 200
Status 400 The encoded trace id or the purpose is malformed.
Status 404 You have no export with this id for this trace.
Status 409 The export is still being written, or failed.
Retrieve ai observability traces feedback
End-user feedback on a trace: scores and comments from its feedback events, survey responses linked to it, and surveys shown but not answered.
Required API key scopes
llm_analytics:readPath parameters
- idstring
Query parameters
- timestamp_hintstring
Response
Example request
GET /api /projects /:project_id /ai_observability /traces /:id /feedbackExample response
Status 200
Status 400 The timestamp hint or the encoded trace id is malformed.
Status 429 Too many queries are running for the project or organization.
Retrieve ai observability traces nodes
One node of a trace: its input and output ready to render, its event name, uuid and timestamp, its error and its metadata. The raw event properties are on the raw read.
Required API key scopes
llm_analytics:readPath parameters
- idstring
- node_idstring
Query parameters
- timestamp_hintstring
Response
Example request
GET /api /projects /:project_id /ai_observability /traces /:id /nodes /:node_idExample response
Status 200
Status 400 The timestamp hint or an encoded id is malformed.
Status 404 No node with this id in the trace.
Status 429 Too many queries are running for the project or organization.
Retrieve ai observability traces nodes raw
One node of a trace as ingested: its event properties and the keys that hold its input, output and tools, with nothing normalized.
Required API key scopes
llm_analytics:readPath parameters
- idstring
- node_idstring
Query parameters
- timestamp_hintstring
Response
Example request
GET /api /projects /:project_id /ai_observability /traces /:id /nodes /:node_id /rawExample response
Status 200
Status 400 The timestamp hint or an encoded id is malformed.
Status 404 No node with this id in the trace.
Status 429 Too many queries are running for the project or organization.
Retrieve ai observability traces pull request
The pull request the trace's git branch belongs to, from engineering analytics.
Required API key scopes
llm_analytics:readengineering_analytics:readPath parameters
- idstring
Query parameters
- timestamp_hintstring
Response
Example request
GET /api /projects /:project_id /ai_observability /traces /:id /pull_requestExample response
Status 200
Status 400 The timestamp hint or the encoded trace id is malformed.
Status 403 The engineering-analytics feature flag is off for the project, or the API key lacks a scope.
Status 429 Too many queries are running for the project or organization.
Retrieve ai observability traces review
The trace's human review with its scores ready to render, and the review queue the trace waits in.
Required API key scopes
llm_analytics:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /ai_observability /traces /:id /reviewExample response
Status 200
Status 400 The encoded trace id is malformed.
Retrieve ai observability traces search
Find text in a trace's steps: each matching step in tree order with its number of occurrences.
Required API key scopes
llm_analytics:readPath parameters
- idstring
Query parameters
- qstring
- timestamp_hintstring
Response
Example request
GET /api /projects /:project_id /ai_observability /traces /:id /searchExample response
Status 200
Status 400 The query is missing or too long, or the timestamp hint or the encoded trace id is malformed.
Status 404 No trace with this id in the project.
Status 429 Too many queries are running for the project or organization.
Status 504 The search took too long on this trace.
Retrieve ai observability traces summary
The trace's AI summary: pending while it is written, then ready with links to its steps, or failed with the reason. A summary is kept for an hour and shown only to users whose property access matches the requester's.
Required API key scopes
llm_analytics:readPath parameters
- idstring
Response
Example request
GET /api /projects /:project_id /ai_observability /traces /:id /summaryExample response
Status 200
Status 400 The encoded trace id is malformed.
Status 403 The organization has not approved AI data processing.
Status 404 No summary of this trace that this user may see.
Create ai observability traces summary
Request an AI summary of the trace. A ready summary is returned as is unless regenerate is set; otherwise a job starts writing one, or the request joins the job already writing it.
Required API key scopes
llm_analytics:writePath parameters
- idstring
Query parameters
- timestamp_hintstring
Request parameters
- regeneratebooleanDefault:
false
Response
Example request
POST /api /projects /:project_id /ai_observability /traces /:id /summaryExample response
Status 200 A ready or failed summary.
Status 202 The summary is being written.
Status 400 The timestamp hint or the encoded trace id is malformed.
Status 403 The organization has not approved AI data processing.
Status 429 Too many summaries requested.
Create ai observability traces availability
Required API key scopes
llm_analytics:readRequest parameters
- trace_idsarray
Response
Example request
POST /api /projects /:project_id /ai_observability /traces /availability




