AI observability

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

GET

Retrieve ai observability traces nodes

One node of a trace: its event properties as ingested, the keys that hold its input, output and tools, its error and its metadata.

Required API key scopes

llm_analytics:read

Path parameters

  • id
    string
  • node_id
    string

Query parameters

  • timestamp_hint
    string

Response


Example request

GET /api/projects/:project_id/ai_observability/traces/:id/nodes/:node_id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/ai_observability/traces/:id/nodes/:node_id/

Example response

Status 200
RESPONSE
{
"id": "string",
"kind": "trace",
"error": "string",
"metadata": {
"provider": "string",
"temperature": 0,
"sessionId": "string",
"promptName": "string",
"promptVersion": 0
},
"event": {
"name": "string",
"uuid": "string",
"timestamp": "2019-08-24T14:15:22Z",
"properties": {},
"ioKeys": {
"input": "string",
"output": "string",
"tools": "string"
}
}
}
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.