Skip to content

Read the AI audit log

GET
/api/v1/ai/audit
curl --request GET \
--url https://api.aletheia-ops.com/api/v1/ai/audit \
--header 'Authorization: Bearer <token>'

OK

Media typeapplication/json

A page of AI audit exchanges.

object
exchanges
Array<object>

One question-and-answer exchange, with every grounding query it ran.

object
message

One message in a conversation.

object
id
string format: uuid
role
string
content

Answer text. Citation markers appear as [n] and refer to evidence entries.

string
status
string
model
string
evidence
Array<object>

One citation backing a claim in an answer. The superscript [n] in the message content refers to this entry.

object
n

Citation number, 1-based.

integer
entity_type
string
entity_id
string
url_path

In-product path to the cited record.

string
freshness_at

When the cited record was last observed. Null when the record carries no freshness.

string | null format: date-time
confidence

Confidence of the underlying record, where it has one.

string
label
string
source_tool

Grounding tool that returned this record.

string
blocks
Array<object>

A structured region of an answer, built from query results rather than composed freely.

object
kind
string
title
string
columns
Array<object>

One column header in a structured answer block.

object
label
string
align
string
rows

Rows of cells, in column order.

Array<Array<object>>
source_tool
string
evidence_ns
string
follow_ups
Array<string>
usage

Token and tool-round accounting for one assistant message.

object
input_tokens
integer
output_tokens
integer
tool_rounds
integer
created_at
string format: date-time
steps

Grounding steps behind this message. Present on the conversation detail response only.

Array<object>

One grounding query the assistant ran while answering. Inputs and results are omitted here — they are in the AI audit log.

object
seq
integer
tool_name
string
label

Human-readable name for the step.

string
status
string
duration_ms
integer
conversation_id
string format: uuid
conversation

A conversation as it appears in the rail — no messages.

object
id
string format: uuid
title
string
preview

First line of the last message.

string
pinned
boolean
created_at
string format: date-time
updated_at
string format: date-time
archived_at

Present only on archived conversations.

string format: date-time
user_id
string format: uuid
invocations
Array<object>

One recorded grounding query, with its input and a summary of what it returned.

object
seq
integer
tool_name
string
input
object
key
additional properties
any
result_summary
object
key
additional properties
any
status
string
duration_ms
integer
next_cursor

Pass as cursor for the next page. Empty when there are no more.

string
Example
{
"exchanges": [
{
"message": {
"role": "user",
"evidence": [
{
"entity_type": "resource"
}
],
"steps": [
{
"status": "ok"
}
]
}
}
]
}

No valid credential was presented, or it has expired.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
{
"code": "unauthorized",
"message": "authentication required"
}

Authenticated, but not permitted to perform this action.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
{
"code": "forbidden",
"message": "you do not have permission to perform this action"
}

An unexpected failure. Diagnostic detail is logged server-side and deliberately not returned. Quote the X-Request-Id response header when reporting one.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
Exampleinternal_error
{
"code": "internal_error",
"message": "internal server error"
}