Tracira

Any HTTP client

Tracira works with any tool that can make an HTTP POST request, including Zapier, Pipedream, custom scripts, or your own server.

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

Open the Integrations tab in your workspace and copy your token from there.

Send the request

POST to https://tracira.com/api/logs with:

  • Header: Authorization: Bearer YOUR_TOKEN
  • Body: JSON with at minimum project and output

Use the verdict

Pass "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.

Send an output

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
  }'
const res = await fetch("https://tracira.com/api/logs", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    project: "my-project",
    output: aiOutput,
    sync: true,
  }),
});
const { id, status } = await res.json();
import requests

res = requests.post(
    "https://tracira.com/api/logs",
    headers={"Authorization": "Bearer YOUR_TOKEN"},
    json={
        "project": "my-project",
        "output": ai_output,
        "sync": True,
    },
)
data = res.json()
# data["status"] == "pass" or "flagged"

Response

{
  "ok": true,
  "id": "b1c2d3e4-...",
  "status": "pass"
}
{
  "ok": true,
  "id": "b1c2d3e4-...",
  "status": "flagged",
  "verdict": {
    "pass": false,
    "rules": [{
      "name": "Discount cap",
      "triggered": true,
      "reason": "Offer exceeds 20% cap"
    }]
  }
}

Attaching files

Tracira can store images, audio, and PDFs alongside an output so reviewers see the source the AI worked from. How you attach depends on the file size.

The 4.5 MB request-body limit

The /api/logs request body is capped at 4.5 MB by our hosting platform. Because base64 inflates a file by about 33%, a base64-inline file effectively has to stay under ~3 MB. Larger files return 413 FUNCTION_PAYLOAD_TOO_LARGE. For anything bigger, use a URL or a presigned upload (below), where the file never travels in the request body.

Small files: URL or inline base64

{
  "project": "Invoice Review",
  "output": "...",
  "attachments": [
    { "source": "url", "url": "https://example.com/invoice.pdf" }
  ]
}

source: "url" (Tracira fetches it server-side, up to 32 MB) or source: "upload" with base64 data (kept under the 4.5 MB body cap).

Large files: direct upload (up to 32 MB)

Upload the file straight to Tracira's storage, then reference it by key. Three calls:

Create the upload

curl -X POST https://tracira.com/api/uploads \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "filename": "invoice.pdf" }'
# -> { "uploadUrl": "https://...", "key": "...", "contentType": "application/pdf" }

Upload the bytes

PUT the raw file to uploadUrl with the Content-Type from the response. These bytes go straight to storage, not through /api/logs, so they are not subject to the 4.5 MB cap:

curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: application/pdf" \
  --data-binary @invoice.pdf

Submit the log

Reference the upload by key. Nothing else is needed; Tracira links the file to this log:

curl -X POST https://tracira.com/api/logs \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "project": "Invoice Review",
    "output": "The invoice looks valid.",
    "attachments": [{ "source": "uploaded", "key": "KEY_FROM_STEP_1" }]
  }'

Quota and cleanup

Each in-flight upload reserves space against your workspace storage quota (the sizeBytes you declare, or the per-file max if omitted), so pending uploads can never push you over your plan limit. The reservation is released when the upload is linked to a log, and any upload never referenced by a log is deleted automatically within 24h. Linked files count toward storage like any other attachment.

Tip

For Zapier or Pipedream: use their built-in HTTP/Webhook action, set Method to POST, add the Authorization header, and paste the JSON body. Then add a conditional step after it to branch on status. For files over ~3 MB, do the create-upload + PUT as two HTTP steps before the final POST.

On this page