Agent CertAgent Cert
Reference

REST API.

All endpoints are HTTPS, JSON request/response, and authenticated with an API key in the X-API-Key header. The OpenAPI schema is served at /openapi.json on your backend.

Authentication

Every authenticated endpoint requires an API key in the X-API-Key header. Get your key at /welcome (issued at signup) or rotate it from /settings/api-keys.

X-API-Key: ait_...
Content-Type: application/json

Invalid or revoked keys return HTTP 401. Admin-only endpoints (under /admin/*) require the key's owning account to have is_admin = true.

Receipts

POST /v1/receipts

Submit an agent execution for evaluation. Deducts 3 credits, returns a signed Decision Receipt. Anchoring to Solana happens asynchronously via the background worker — the receipt is returned immediately with anchor_status: "pending" and the dashboard polls for the anchor.

Body

{
  "agent_id":          string,            // required, your stable identifier for the agent
  "platform":          string,            // "bedrock" | "copilot" | "copilot_studio" | "openai" |
                                          //   "claude" | "langchain" | "crewai" | "custom" | "generic"
  "user_intent":       string,            // required — what the user asked the agent
  "agent_output":      string,            // required — what the agent ultimately produced
  "tools_used":        string[],          // tool / function names the agent invoked
  "retrieval_summary": string?,           // summary of retrieved context (RAG)
  "policy_rules":      string[]?,         // ad-hoc rules to enforce on this call only
  "metadata":          object?,           // free-form, becomes part of execution_hash

  // v2 capture fields (optional; bound into execution_hash when set):
  "acting_model":         string?,        // the model that MADE the decision, e.g. "gpt-4o"
  "acting_model_version": string?,        //   (distinct from the evaluator that scores it)
  "parent_receipt_id":    string?,        // upstream receipt — builds the provenance chain
  "permission_snapshot":  object?,        // what the agent was allowed to do at decision time
  "memory_context_hash":  string?         // hash (not content) of the context acted on
}

Response 201 — the create response is intentionally small; fetch the full receipt with GET /v1/receipts/{id}.

{
  "receipt_id":          string,          // "rcpt_..."
  "trust_score":         0..100,
  "risk_level":          "low" | "medium" | "high",
  "policy_compliant":    boolean,
  "summary":             string,
  "verify_url":          string,          // public verify URL (agentcert.net/r/?id=...)
  "anchor_tx_signature": string | null,   // null until the worker anchors (async)
  "anchor_explorer_url": string | null
}

Errors

  • 401 — missing / invalid API key
  • 402 — insufficient credits (top up via the CERT bridge)
  • 422 — schema validation failure (e.g. unknown platform)
  • 502 — evaluator failed (credits are automatically refunded)

GET /v1/receipts/{receipt_id}

Fetch a single receipt by ID. Returns the same shape as POST.

GET /v1/receipts

List receipts for the authenticated account. Admins see all receipts. Query params: limit (default 25, max 100), offset (default 0), agent_id (filter).

GET /v1/receipts/{receipt_id}/verify

Re-verify a receipt: recomputes execution + evaluation hashes, validates the Ed25519 signature, returns:

{
  "receipt_id":            string,
  "verified":              boolean,
  "signature_valid":       boolean,
  "execution_hash_match":  boolean,
  "evaluation_hash_match": boolean
}

GET /v1/receipts/{receipt_id}/anchor-proof

Read the on-chain anchor proof. Returns status, Solana tx signature, explorer URL, network, on-chain memo, and hashes_match. For batch-anchored receipts (Merkle), anchor_mode is "batch", merkle_root / anchor_batch_id are returned, and hashes_match reflects Merkle-membership verification against the on-chain root.

GET /v1/receipts/{receipt_id}/history

Walk the cross-agent chain of custody upstream via parent_receipt_id. Public (receipts are public by ID). See Provenance.

{
  "receipt_id": string,
  "depth":      integer,        // number of ancestors above the target
  "complete":   boolean,        // false on cycle / truncation / missing parent
  "note":       string | null,
  "chain": [                    // ordered target -> parent -> ... -> root
    { "receipt_id", "found", "agent_id", "acting_model", "trust_score",
      "risk_level", "created_at", "parent_receipt_id", "verify_url" }
  ]
}

GET /v1/receipts/{receipt_id}/replay

Reconstruct a decision from its stored record — the original request and the evaluation. Owner/admin only (returns the decision content, unlike the public receipt metadata). Returns 403 if the receipt isn't yours.

Compliance reports

POST /v1/reports

Generate an EU AI Act Article 12 / ISO 42001 audit export over your receipts. Free (read-only). See Compliance.

Body

{
  "agent_id": string?,    // scope to one agent (omit for all you own)
  "start":    iso8601?,   // inclusive lower bound on created_at
  "end":      iso8601?,   // inclusive upper bound
  "limit":    integer?,   // 1..10000, default 1000
  "format":   "json" | "pdf"   // default "json"
}

json returns the structured report (scope, summary stats, a verification block with the signing public key + verify URL templates, and one entry per receipt). pdf returns a branded application/pdf audit document.

Credits

GET /v1/credits/balance

Returns your current credit balance and recent ledger entries.

{
  "balance":  integer,
  "recent": [
    { "type": "grant" | "charge" | "refund" | "bridge", "amount": int, "at": iso8601, "memo": string }
  ]
}

Authentication endpoints

GET /v1/auth/me

Returns the authenticated principal (user ID, email, role).

POST /v1/auth/bootstrap

Called once after first signup. Provisions the account, grants 30 free trial credits, issues the initial API key. Idempotent — returning users get is_new: false and no new key.

POST /v1/auth/api-keys/rotate

Issues a new API key for the authenticated account. The previous key is revoked immediately — update your integrations before calling this.

Agents & Policies

See the dashboard pages for the full set: GET /v1/agents, PUT /v1/agents/{id}/policy, GET /v1/policies, POST /v1/policies, DELETE /v1/policies/{id}. Full schemas in /openapi.json.

Rate limits

No hard limits enforced today on the public devnet. Receipts are rate-limited only by your credit balance (3 per call). For high-volume integrations on mainnet, contact us.

Status codes summary

CodeMeaning
200Success
201Resource created (receipt issued)
400Bad request — malformed body
401Missing or invalid API key
402Insufficient credits
403Forbidden — admin endpoint, non-admin caller
404Receipt / agent / policy not found (or not yours)
422Schema validation failed
500Internal error — check status page