Table of contents
Quick start
Getting started
Connect any AI workflow to Tracira in minutes — you need a token and one HTTP call.
Create a free account
Copy your webhook token
wh-.Define a rule
Send your first output
sync: true to receive the verdict inline — useful when you need to gate or continue a workflow based on the result.curl -X POST https://tracira.com/api/logs \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"project": "my-first-project",
"output": "Here is my AI-generated response."
}'{
"ok": true,
"id": "b1c2d3e4-0000-0000-0000-ffffffffffff",
"status": "pending"
}Getting started
Rate limits
The webhook endpoint enforces a sliding-window rate limit per workspace token to protect service quality for all users.
| Endpoint | Limit | Window | Scope |
|---|---|---|---|
| POST /api/logs | 60 requests | 1 minute | Per workspace token |
When the limit is exceeded the API returns 429 Too Many Requests with a Retry-After: 60 header indicating how many seconds to wait before retrying.
The limit is enforced globally across all server instances using a sliding-window algorithm — it is not per-server.
sync: true so requests return immediately with status: "pending". Sync evaluation holds the connection open and counts against the same limit.HTTP/1.1 429 Too Many Requests
Retry-After: 60
Content-Type: application/json
{
"error": "Too many requests. Please slow down and try again shortly."
}// Exponential back-off example
async function sendWithRetry(payload, token) {
for (let attempt = 0; attempt < 4; attempt++) {
const res = await fetch("https://tracira.com/api/logs", {
method: "POST",
headers: {
"Authorization": `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
if (res.status !== 429) return res;
const retryAfter = Number(res.headers.get("Retry-After") ?? 60);
await new Promise(r => setTimeout(r, retryAfter * 1000));
}
throw new Error("Rate limit exceeded after retries");
}Integrations
Make
Tracira has a native Make app — add monitoring to any scenario with a single module, no HTTP setup required.
Install the Tracira app for Make
Add the Log Execution module to your scenario
Connect your workspace
wh-).Map the fields
project and output from the previous module. Optional fields:task— groups logs inside the projectinput— the prompt sent to the AImodel,latencyMs,costUsd— for analyticssync— set totrueto get the verdict inline (gate mode)
Branch on the verdict (gate mode)
sync is enabled, add a Router after the Tracira module:- Route 1 — filter:
{{tracira.status}}=pass→ continue - Route 2 — filter:
{{tracira.status}}=flagged→ alert or stop
sync blank for fire-and-forget logging (Make continues instantly). Set it to true only when you need to gate the scenario on the evaluation result.// Log Execution module fields
{
"project": "{{1.project}}",
"output": "{{1.aiOutput}}",
"task": "Tone Validator"
// sync left blank → returns id + pending instantly
}{
"ok": true,
"id": "b1c2d3e4-...",
"status": "pass",
"verdict": {
"pass": true,
"rules": [{ "name": "Tone Validator", "triggered": false }]
}
}Integrations
n8n
Use n8n's built-in HTTP Request node to send AI outputs to Tracira. Route your workflow based on the verdict using an IF node.
Add an HTTP Request node after your AI node
Configure the node
- Method: POST
- URL:
https://tracira.com/api/logs - Authentication: Header Auth — Name:
Authorization, Value:Bearer YOUR_TOKEN - Body Content Type: JSON
Set the body
{{ $json.aiOutput }} with an expression pointing to the AI output field from the previous node.Branch on the result
- Condition:
{{ $json.status }}equalspass - True branch → continue; False branch → notify or stop
{
"project": "support-replies",
"output": "{{ $json.aiOutput }}",
"task": "Tone Validator",
"sync": true
}{
"ok": true,
"id": "b1c2d3e4-...",
"status": "pass"
}Integrations
Any HTTP client
Tracira works with any tool that can make an HTTP POST request — Zapier, Pipedream, custom scripts, or your own server. Here is the complete request format.
Get your webhook token
wh-.Send the request
https://tracira.com/api/logs with:- Header:
Authorization: Bearer YOUR_TOKEN - Body: JSON with at minimum
projectandoutput
Use the verdict
"sync": true to receive the evaluation result immediately in the response. Check status — pass means all rules passed, flagged means at least one rule triggered.status.curl -X POST https://tracira.com/api/logs \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"project": "my-project",
"output": "The AI-generated text.",
"sync": true
}'{
"ok": true,
"id": "b1c2d3e4-...",
"status": "pass"
}Logs
Submit an AI output for evaluation
Default mode is async and returns immediately with `status: pending`. Pass `sync: true` to wait for the verdict inline. Rate limit: 60 requests per minute per workspace token. Exceeding the limit returns `429` with a `Retry-After: 60` header.
Body
projectstringrequiredProject name. Auto-created on first use.
taskstringoptionalSegments logs within a project. Used for per-task rule targeting and filtering. Auto-created on first use.
outputstringrequiredThe AI-generated text or content to evaluate. Up to 50,000 characters.
modelstringoptionalThe model identifier that produced this output (e.g. `gpt-4o`, `claude-3-5-sonnet`). Stored for filtering and display.
latencyMsnumberoptionalEnd-to-end latency of the AI call in milliseconds. Stored for tracking and display.
costUsdnumberoptionalCost of the AI call in US dollars. Stored for cost tracking and display.
inputstring | object[]optionalThe prompt or conversation that produced this output. Accepts plain text or an array of multi-modal content parts (text, image_url, audio_url, file_url).
inputTextstringoptionalPlain-text prompt shown alongside the output in the log viewer. Use when `input` is multi-modal.
attachmentsobject[]optionalFiles attached to the input. Each file is fetched and durably stored during ingestion. 10 MB per file. Accepts `url` or `upload` (base64) sources.
callbackUrlstringoptionalURL to POST the evaluation result to when it completes.
callbackEventsstringoptionalWhich events trigger the callback. `all` fires on every completion; `flagged_error` only on non-pass outcomes; `decisions` on human approve/reject.
One of: allflagged_errordecisionsflagged_error_decisionspass
metadataobjectoptionalArbitrary key-value pairs attached to the log. Useful for customer IDs, run metadata, or environment tags.
idstringoptionalOptional caller-supplied log ID for idempotent writes.
syncbooleanoptionalWhen true, waits for evaluation and returns the verdict inline.
confidencenumberoptionalThe model's self-reported confidence score (0–1). Stored on the log and usable in `confidence_threshold` rules.
sessionIdstringoptionalOptional run or conversation grouping ID. Equivalent context aliases such as `conversationId`, `threadId`, and `chatId` are also accepted.
subjectIdstringoptionalOptional impacted entity ID. Equivalent aliases such as `customerId`, `recordId`, `ticketId`, and `accountId` are also accepted.
actorIdstringoptionalOptional actor ID. Equivalent aliases such as `userId`, `endUserId`, and `agentId` are also accepted.
timestampstringoptionalOptional ISO 8601 timestamp to use as the log date instead of the current server time. Useful for replaying or reprocessing past executions (e.g. `2024-11-15T10:30:00Z`).
curl -X POST https://tracira.com/api/logs \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"project": "support-replies",
"output": "The AI-generated text to evaluate."
}'{
"ok": true,
"id": "b1c2d3e4-0000-0000-0000-ffffffffffff",
"status": "pending"
}Logs
List logs
Supports webhook-token auth for integrations and session auth for the dashboard. The response key is `executions` for backwards compatibility, but the records are logs.
Query parameters
pendingbooleanqueryoptionalWhen true, only returns undecided flagged or error logs.
statusstringqueryoptionalOne of: pendingpassflaggederror
projectstringqueryoptionaltaskstringqueryoptionalsessionIdstringqueryoptionalsubjectIdstringqueryoptionalactorIdstringqueryoptionalqstringqueryoptionalSearches project, task, model, session, subject, and actor fields.
tagsstringqueryoptionalComma-separated tag list.
fromstringqueryoptionaltostringqueryoptionalsortBystringqueryoptionalOne of: timestampprojectNamemodelstatuslatencyMscostUsd
sortDirstringqueryoptionalOne of: ascdesc
pagenumberqueryoptionallimitnumberqueryoptionalcurl -X GET https://tracira.com/api/logs \
-H "Authorization: Bearer YOUR_TOKEN"{
"executions": [
{
"id": "<string>",
"timestamp": "<string>",
"status": "pending",
"projectId": "<string>",
"projectName": "<string>",
"taskName": "<string>"
}
],
"total": 0,
"page": 0,
"limit": 0,
"summary": {
"totalRuns": 0,
"failuresDetected": 0,
"pendingReviews": 0,
"successRate": 0
}
}Logs
Get a single log
Path parameters
idstringpathrequiredcurl -X GET https://tracira.com/api/logs/ID \
-H "Authorization: Bearer YOUR_TOKEN"{
"id": "<string>",
"workspaceId": "<string>",
"userId": "<string>",
"timestamp": "<string>",
"status": "pending",
"output": "<string>"
}Logs
Delete a single log
Path parameters
idstringpathrequiredcurl -X DELETE https://tracira.com/api/logs/ID \
-H "Authorization: Bearer YOUR_TOKEN"{
"ok": true
}Logs
Poll async log status
Path parameters
idstringpathrequiredcurl -X GET https://tracira.com/api/logs/ID/status \
-H "Authorization: Bearer YOUR_TOKEN"{
"id": "<string>",
"status": "pending",
"verdict": "pass",
"confidenceScore": 0,
"explanation": "<string>",
"humanDecision": "approved"
}Logs
Approve or reject a log
Path parameters
idstringpathrequiredBody
decisionstringrequiredOne of: approvedrejected
curl -X PATCH https://tracira.com/api/logs/ID/decision \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"decision": "approved"
}'{
"ok": true,
"decidedBy": "<string>"
}Logs
Bulk-approve, bulk-reject, or bulk-delete logs
Body
idsstring[]requiredactionstringrequiredOne of: approverejectdelete
curl -X PATCH https://tracira.com/api/logs/bulk \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": "<ids>",
"action": "approve"
}'{
"ok": true,
"count": 0
}Logs
List distinct task names
Returns the union of registered project tasks and task names inferred from historical logs.
Query parameters
projectstringqueryoptionalOptional project name filter.
curl -X GET https://tracira.com/api/logs/tasks \
-H "Authorization: Bearer YOUR_TOKEN"[
"<string>"
]Projects
List projects
No parameters required.
curl -X GET https://tracira.com/api/projects \
-H "Authorization: Bearer YOUR_TOKEN"[
{
"id": "<string>",
"name": "<string>",
"icon": "<string>",
"createdAt": "<string>",
"executionCount": 0
}
]Projects
Create a project
Body
namestringrequiredcurl -X POST https://tracira.com/api/projects \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "<name>"
}'{
"id": "<string>",
"name": "<string>",
"icon": "<string>",
"createdAt": "<string>",
"executionCount": 0
}Projects
Rename, merge, or change icon for a project
Path parameters
idstringpathrequiredBody
namestringoptionaliconstringoptionalmergebooleanoptionalcurl -X PATCH https://tracira.com/api/projects/ID \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "<name>",
"icon": "<icon>",
"merge": true
}'{}Projects
Delete a project and its logs, rules, and tasks
Path parameters
idstringpathrequiredcurl -X DELETE https://tracira.com/api/projects/ID \
-H "Authorization: Bearer YOUR_TOKEN"{
"success": true
}Projects
List tasks for a project
Path parameters
idstringpathrequiredcurl -X GET https://tracira.com/api/projects/ID/tasks \
-H "Authorization: Bearer YOUR_TOKEN"[
{
"id": "<string>",
"name": "<string>",
"projectId": "<string>",
"createdAt": "<string>",
"executionCount": 0
}
]Projects
Create a task inside a project
Path parameters
idstringpathrequiredBody
namestringrequiredcurl -X POST https://tracira.com/api/projects/ID/tasks \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "<name>"
}'{
"id": "<string>",
"name": "<string>",
"projectId": "<string>",
"createdAt": "<string>",
"executionCount": 0
}Projects
Delete a task from a project
Deletes the task row and any logs using the same project/task combination.
Path parameters
idstringpathrequiredQuery parameters
taskNamestringqueryrequiredcurl -X DELETE "https://tracira.com/api/projects/ID/tasks?taskName=<taskName>" \
-H "Authorization: Bearer YOUR_TOKEN"{
"success": true
}Rules
List rules
No parameters required.
curl -X GET https://tracira.com/api/rules \
-H "Authorization: Bearer YOUR_TOKEN"[
{
"id": "<string>",
"name": "<string>",
"type": "keyword_required",
"description": "<string>",
"value": "<string>",
"isActive": true
}
]Rules
Create a rule
Body
namestringrequiredtypestringrequiredOne of: keyword_requiredkeyword_forbiddenregex_matchlength_limitconfidence_thresholdllm_judgejson_fieldjson_field_keyword_requiredjson_field_keyword_forbidden
descriptionstringoptionalvaluestringrequiredisActivebooleanoptionalprojectIdstringoptionalprojectNamestringoptionaltaskNamestringoptionalllmJudgeProviderstringoptionalOne of: anthropicopenaiopenrouter
llmJudgeModelstringoptionalcurl -X POST https://tracira.com/api/rules \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "<name>",
"type": "keyword_required",
"value": "<value>",
"description": "<description>",
"isActive": true
}'{
"id": "<string>",
"name": "<string>",
"type": "keyword_required",
"description": "<string>",
"value": "<string>",
"isActive": true
}Rules
Get a single rule
Path parameters
idstringpathrequiredcurl -X GET https://tracira.com/api/rules/ID \
-H "Authorization: Bearer YOUR_TOKEN"{
"id": "<string>",
"name": "<string>",
"type": "keyword_required",
"description": "<string>",
"value": "<string>",
"isActive": true
}Rules
Update a rule
Path parameters
idstringpathrequiredBody
namestringoptionaltypestringoptionalOne of: keyword_requiredkeyword_forbiddenregex_matchlength_limitconfidence_thresholdllm_judgejson_fieldjson_field_keyword_requiredjson_field_keyword_forbidden
descriptionstringoptionalvaluestringoptionalisActivebooleanoptionalprojectIdstringoptionalprojectNamestringoptionaltaskNamestringoptionalllmJudgeProviderstringoptionalOne of: anthropicopenaiopenrouter
llmJudgeModelstringoptionalcurl -X PATCH https://tracira.com/api/rules/ID \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "<name>",
"type": "keyword_required",
"description": "<description>",
"value": "<value>",
"isActive": true
}'{
"ok": true
}Rules
Delete a rule
Path parameters
idstringpathrequiredcurl -X DELETE https://tracira.com/api/rules/ID \
-H "Authorization: Bearer YOUR_TOKEN"{
"ok": true
}Rules
Evaluate one rule against an output without storing a log
Body
outputstringrequiredconfidencenumberoptionalruleobjectrequiredcurl -X POST https://tracira.com/api/rules/evaluate \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"output": "<output>",
"rule": "<rule>",
"confidence": 0
}'{
"verdict": "pass",
"confidenceScore": 0,
"explanation": "<string>",
"status": "pass",
"appliedRules": [
{
"ruleId": "<string>",
"ruleName": "<string>",
"ruleType": "keyword_required",
"ruleValue": "<string>",
"scope": "global",
"outcome": "passed"
}
]
}Settings
Get workspace settings and usage
No parameters required.
curl -X GET https://tracira.com/api/settings \
-H "Authorization: Bearer YOUR_TOKEN"{
"id": "<string>",
"name": "<string>",
"workspaceName": "<string>",
"currentUserRole": "<string>",
"canManageWorkspace": true,
"usage": {}
}Settings
Update workspace settings
Body
onboardingDismissedbooleanoptionalworkspaceNamestringoptionalslackWebhookUrlstringoptionalnotifyOnFlagbooleanoptionalnotifyOnFailbooleanoptionalslackChannelIdstringoptionalnotificationEmailstringoptionalemailOnFlagbooleanoptionalemailOnFailbooleanoptionalslackNotificationsEnabledbooleanoptionalemailNotificationsEnabledbooleanoptionalwebhookEnabledbooleanoptionaloutboundWebhookUrlstringoptionaloutboundWebhookEventsstring[]optionalestimatedIncidentCostUsdnumberoptionalopenaiApiKeystringoptionalanthropicApiKeystringoptionalopenrouterApiKeystringoptionalopenaiJudgeModelstringoptionalanthropicJudgeModelstringoptionalopenrouterJudgeModelstringoptionaldefaultJudgeProviderstringoptionalOne of: anthropicopenaiopenrouter
colorstringoptionalcurl -X PATCH https://tracira.com/api/settings \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"onboardingDismissed": true,
"workspaceName": "<workspaceName>",
"slackWebhookUrl": "<slackWebhookUrl>",
"notifyOnFlag": true,
"notifyOnFail": true
}'{
"ok": true
}Settings
Rotate the workspace webhook token
Workspace-admin only. Rate limited to 5 rotations per hour.
No parameters required.
curl -X POST https://tracira.com/api/settings/rotate-token \
-H "Authorization: Bearer YOUR_TOKEN"{
"webhookToken": "<string>"
}Media
Redirect to a signed media URL
Accepts either the browser session cookie or `x-api-key`. The `key` path parameter is the full media key path, for example `workspaceId/logId/0-file.pdf`.
Path parameters
keystringpathrequiredQuery parameters
downloadstringqueryoptionalUse `1` to request `attachment` disposition instead of inline preview.
One of: 1
curl -X GET https://tracira.com/api/media/KEY \
-H "Authorization: Bearer YOUR_TOKEN"// No response bodyUtilities
Verify a webhook token
No parameters required.
curl -X GET https://tracira.com/api/verify \
-H "Authorization: Bearer YOUR_TOKEN"{
"workspaceName": "<string>"
}Utilities
List preset model names
Public helper endpoint used by the Make custom app.
No parameters required.
curl -X GET https://tracira.com/api/models \
-H "Authorization: Bearer YOUR_TOKEN"[
{
"label": "<string>",
"value": "<string>"
}
]Ready to connect your workflow?
Under 5 minutes. No SDK required — one HTTP call is all it takes.