Documentation

API Reference

Base URL: https://captre.onrender.com/  ·  Interactive OpenAPI ↗

Paid endpoints (POST /attest, POST /revoke) require an x402-enabled HTTP client. The server returns 402 Payment Required and the client must settle $0.01 USDC on Algorand before the request is fulfilled. Free endpoints work with plain curl.
Endpoints
Method Path Payment Purpose
POST /attest $0.01 USDC Create a first-claim attestation
GET /verify Free Verify by content_hash query param
GET /attestation/{id} Free Retrieve by UUID or content_hash
POST /revoke $0.01 USDC Revoke — original author only
Payment flow

How x402 works

01 / Client
Sends POST /attest with content_hash
02 / Middleware
Returns 402 + payment requirements
03 / Client
Signs & submits Algorand USDC tx
04 / Facilitator
Verifies settlement, issues receipt
05 / Captre
Writes box on-chain, returns attestation

Facilitator: https://facilitator.goplausible.xyz  ·  Network: mainnet

POST /attest $0.01 USDC
Create first-claim attestation

A content_hash can only ever be claimed once — revocation does not reopen it to new claimants.

Request body (JSON)
{
  "content_hash":  "sha256:abc…", // required
  "agent_id":      "my-agent",    // optional
  "output_type":   "file",        // optional
  "description":   "…",           // optional
  "model":         "gpt-4o",      // optional
  "tags":          ["v1"],        // optional
  "extra":         {}             // optional
}
Response 200
{
  "attestation": {
    "attestation_id": "a00fe88e-…",
    "author":   "GFYF3KDN…",
    "status":   "active",
    "tx_id":    "QK5ATJTD…"
  },
  "message": "Attestation created successfully"
}
402 Payment required (x402 challenge)
409 content_hash already claimed — returns existing
500 Box write failed after payment settled (retry safe)
GET /verify Free
Verify by content hash
curl example
curl "https://captre.onrender.com/verify?content_hash=sha256:YOUR_HASH"
GET /attestation/{id} Free
Retrieve by UUID or content hash

UUIDs are resolved via the on-chain id_index BoxMap. You can also pass the raw content_hash directly.

By UUID
curl "https://captre.onrender.com/attestation/a00fe88e-c4fa-4d4a-92d6-043af786e4b4"
By content hash
curl "https://captre.onrender.com/attestation/sha256%3Aabc123..."
POST /revoke $0.01 USDC
Revoke — original author only

The x402 payer address of the revoke request must exactly match the author stored in the original attestation. Revocation is permanent — the hash is never reopened.

Request body
{ "attestation_id": "a00fe88e-…" }
402 Payment required
403 Payer is not the original author
404 Attestation not found
Security

Author binding

The author field is always the Algorand address that paid via x402 — extracted from the signed payment transaction group. It is never the Captre service account. You cannot spoof authorship by changing a header.

The same logic applies to revocation: Captre decodes the payer address from the x402 payment payload and compares it to the stored author before submitting any on-chain write.