Quickstart

Five minutes, three commands, no human in the loop.

1. Sign up — the key is shown once

curl -s -X POST https://api.avenic.ai/v1/signup
# → { "tenant_id": "t-…", "api_key": "ak-…", "receipts_included": 1000 }

Store the api_key now — only its hash is kept server-side; it cannot be shown again.

2. Record a decision → get a receipt link

curl -s -X POST https://api.avenic.ai/v1/record \
  -H "authorization: Bearer <api_key>" -H "content-type: application/json" \
  -d '{
    "tenant_id": "<tenant_id>",
    "decision_id": "my-first-decision",
    "claims_used": [],
    "outcome": "approved",
    "model_route": "manual",
    "allowed_scopes": ["tenant"]
  }'
# → { "decision_id": "…", "alg": "sha384", "digest": "<96-hex>", "hosted": true,
#     "link": "/r/sha384/<96-hex>" }

The link is live immediately. Recording is idempotent on your decision_id, and metered only on success — when credits run out the call refuses with 402 before recording. Add "host": false to record without publishing a link; the response always tells you hosted.

3. Verify it yourself — no trust in us required

curl -s https://api.avenic.ai/r/sha384/<digest>/bundle -o bundle.json
sha384sum bundle.json   # equals the <digest> in the address — the address IS the hash

The receipt page renders the public projection: what the checks attest, what they do NOT attest, and how to re-derive everything offline from bundle.json. More on the full ladder: Verify it yourself.

Taking a link down

curl -s -X DELETE https://api.avenic.ai/v1/hosted/sha384/<digest> \
  -H "authorization: Bearer <api_key>"

The address then answers 410 Gone with an honest tombstone (edge caches clear within a day). Taking a link down does not alter or discredit the artifact's bytes.

4. Top up — when the free grant runs out

Keep recording past the 1,000 free receipts with a receipt pack. The 402 response includes a checkout_url bound to your account — open it, pay on the Stripe-hosted page, and credits apply on completion. Or fetch the link yourself:

curl -s "https://api.avenic.ai/v1/billing/checkout?pack=starter&format=json" \
  -H "authorization: Bearer <api_key>"
# → { "pack": "starter", "checkout_url": "https://buy.stripe.com/…?client_reference_id=<tenant_id>" }

A pack credits the account that bought it, so sign up first — there is nothing to credit before you have a key.