api.frontiercompute.cash
API documentation

ZAP1 API Documentation

This page documents the live surface behind api.frontiercompute.cash. Every endpoint listed below was checked against the running ZAP1 service on 2026-04-17 UTC. If a route is not live, it is called out as not public today instead of being hand-waved into the docs.

Landing OpenAPI spec Paid tiers Free tier: `POST /trial-key`
Base URL
https://api.frontiercompute.cash

Direct read surface for ZAP1 attestation discovery, verification, anchor state, and onboarding.

Protocol
ZAP1 v3.0.0

`GET /protocol/info` returns protocol metadata, hash function, deployed type count, and verification references.

Authentication
Public reads, Bearer writes

Read endpoints are public. `POST /event` and other write or admin paths require `Authorization: Bearer <key>`.

Rate limits
10 r/s on write paths

`/event` uses the nginx `api_write` zone at 10 requests per second per IP with burst 5. `/auto-invoice` uses burst 3.

Category 1
Attestation writes

Issue a trial key, then write a leaf with `POST /event`.

Category 2
Leaf query

Read the recent feed with `GET /events` or inspect one wallet with `GET /lifecycle/{wallet_hash}`.

Category 3
Verification

Open the proof page, call `/check`, or download the proof bundle JSON.

Category 4
Anchor state

Check current root, txid, height, and historical anchors with `/anchor/status` and `/anchor/history`.

Auth and limits

Current live policy
  • Public reads: `GET /protocol/info`, `/events`, `/lifecycle/{wallet_hash}`, `/verify/{leaf_hash}`, `/verify/{leaf_hash}/check`, `/verify/{leaf_hash}/proof.json`, `/anchor/status`, `/anchor/history`, `/stats`, and `/health` all respond without auth.
  • Free onboarding: `POST /trial-key` issues a `trial` key with `quota: 5` and `expires_in_days: 30`.
  • Authenticated writes: `POST /event` accepts `Authorization: Bearer <key>`. The running service also gates admin, invoice, webhook, and auto-invoice paths behind Bearer auth.
  • Write throttling: nginx enforces 10 requests per second per IP on the shared `api_write` zone. `/event` allows burst 5 and `/auto-invoice` burst 3.
  • No explicit read-side nginx throttle is configured on `api.frontiercompute.cash` today.

Live samples

Anchored example leaf

187441d697cbb6256f9cb073bce90584e658d6f0c67a3e1ab907d13cb7cac5a4

Wallet: docs_example_wallet

Current anchor txid: 10fdfd2a442f8b289c79909d04d4933b35ce7acacc981b8abc7aa22e73ff7f43

Anchor height: 3311360

This leaf was written through the live API with a trial key during docs verification, then checked again after on-chain anchoring.

Endpoints

Category Endpoint Access Live example
Onboarding POST /trial-key
issues 30-day trial key, quota 5
Public POST /trial-key returned 201 on 2026-04-17 UTC.
Attestation write POST /event
submit a new attestation leaf
Bearer auth Wrote docs_example_wallet / docs-example-001 and received leaf 187441d6….
Leaf query GET /events?limit=3
recent attestation feed
Public GET /events?limit=3 returned 200 with recent leaves.
Leaf query GET /lifecycle/docs_example_wallet
wallet-scoped event history
Public Returns the docs verification leaf for docs_example_wallet.
Verification GET /verify/187441d697cbb6256f9cb073bce90584e658d6f0c67a3e1ab907d13cb7cac5a4
HTML proof page
Public Returned 200 HTML on the live service.
Verification GET /verify/187441d697cbb6256f9cb073bce90584e658d6f0c67a3e1ab907d13cb7cac5a4/check
server-side verification
Public Returned valid: true, anchor txid, and anchor height 3311360.
Verification GET /verify/187441d697cbb6256f9cb073bce90584e658d6f0c67a3e1ab907d13cb7cac5a4/proof.json
proof bundle JSON
Public Returned an anchored proof bundle with txid 10fdfd2a….
Anchor state GET /anchor/status
current root and anchor recommendation
Public Returned 200 with current root 5128e69d… and the same anchor txid.
Anchor state GET /anchor/history
chronological root history
Public Returned 200 with recorded root and txid history.
Protocol GET /protocol/info
protocol metadata
Public Returned 200 with protocol version 3.0.0 and hash function BLAKE2b-256.
Diagnostics GET /stats and /health
deployment state
Public Both returned 200 on 2026-04-17 UTC.
Not public today There is no live public anchor submission route, roster route, or dedicated finality route on this service. Builders submit leaves with POST /event; anchor recording is automated or handled through operator-only paths. For finality and chain state, use /anchor/status and /anchor/history. No public ShieldedVault API endpoints are exposed on api.frontiercompute.cash today, so they are not documented here as if they already exist.

Code examples

1. Issue a trial key

Use the free trial endpoint to get a Bearer token for write access.

curl -sS -X POST \
  https://api.frontiercompute.cash/trial-key
import requests

resp = requests.post("https://api.frontiercompute.cash/trial-key")
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.frontiercompute.cash/trial-key", {
  method: "POST"
});

if (!resp.ok) throw new Error(`trial-key failed: ${resp.status}`);
console.log(await resp.json());

2. Submit an attestation leaf

Write a `CONTRACT_ANCHOR` event. Replace $KEY with the key returned by POST /trial-key.

curl -sS -X POST \
  https://api.frontiercompute.cash/event \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "event_type": "CONTRACT_ANCHOR",
    "wallet_hash": "docs_example_wallet",
    "serial_number": "docs-example-001",
    "contract_sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
  }'
import requests

payload = {
    "event_type": "CONTRACT_ANCHOR",
    "wallet_hash": "docs_example_wallet",
    "serial_number": "docs-example-001",
    "contract_sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
}

resp = requests.post(
    "https://api.frontiercompute.cash/event",
    headers={"Authorization": f"Bearer {KEY}"},
    json=payload,
)
resp.raise_for_status()
print(resp.json())
const payload = {
  event_type: "CONTRACT_ANCHOR",
  wallet_hash: "docs_example_wallet",
  serial_number: "docs-example-001",
  contract_sha256: "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
};

const resp = await fetch("https://api.frontiercompute.cash/event", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${key}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify(payload)
});

if (!resp.ok) throw new Error(`event failed: ${resp.status}`);
console.log(await resp.json());

3. Verify an anchored leaf

This example uses the leaf written during docs verification. It is anchored on-chain and returns txid and height.

curl -sS \
  https://api.frontiercompute.cash/verify/187441d697cbb6256f9cb073bce90584e658d6f0c67a3e1ab907d13cb7cac5a4/check
import requests

leaf = "187441d697cbb6256f9cb073bce90584e658d6f0c67a3e1ab907d13cb7cac5a4"
resp = requests.get(f"https://api.frontiercompute.cash/verify/{leaf}/check")
resp.raise_for_status()
print(resp.json())
const leaf = "187441d697cbb6256f9cb073bce90584e658d6f0c67a3e1ab907d13cb7cac5a4";
const resp = await fetch(`https://api.frontiercompute.cash/verify/${leaf}/check`);

if (!resp.ok) throw new Error(`verify failed: ${resp.status}`);
console.log(await resp.json());

OpenAPI

Current spec file

https://api.frontiercompute.cash/openapi/zap1.yaml

The source spec comes from the running ZAP1 service repo. It is useful for the read-side contract and still names pay.frontiercompute.io as the reference deployment because that is the upstream source file today.

Builder notes

What to use
  • Attestation submission: POST /event.
  • Leaf discovery: GET /events and GET /lifecycle/{wallet_hash}.
  • Proof verification: GET /verify/{leaf_hash}/check and GET /verify/{leaf_hash}/proof.json.
  • Anchor and chain state: GET /anchor/status, GET /anchor/history, GET /stats, and GET /health.