Documentation
Documentation
Provenance is the trust layer for generative AI. Its APIs identify the agents behind every request, verify agent orders, attest photos and video, give agents rules and approvals, and trace model behavior. Everything they sign verifies offline.
Getting started
Start from the product that does your job. Each quickstart runs against the public sandbox with published keys, so you don't need an account.
Make your first call
POST /v1/verify checks any Provenance token for free, with no key. This block mints a short-lived token in the sandbox, standing in for an agent's order, then verifies it and the cart it should bind.
export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export INTENT_TOKEN=$(curl -s $PROVENANCE_API/v1/mandate/intents \
-H "Authorization: Bearer prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe" \
-H "Content-Type: application/json" \
-d '{"action_description":"Buy a desk lamp: $48.00 at Brindlecote Home","action_payload":{"type":"purchase","amount":48,"currency":"USD","merchant":"brindlecote-home.example"},"agent_session_id":"sess_docs_home","device_id":"dev_00000000000000000000000000000001"}' | jq -r .intent_token)
curl -s -X POST $PROVENANCE_API/v1/verify \
-H "Content-Type: application/json" \
-d '{"token":"'"$INTENT_TOKEN"'","expected":{"action_payload":{"type":"purchase","amount":48,"currency":"USD","merchant":"brindlecote-home.example"}}}'
import { Provenance } from "@provenanceauth/sdk";
const order = { type: "purchase", amount: 48, currency: "USD", merchant: "brindlecote-home.example" };
const sandbox = new Provenance({ apiKey: "prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe", baseUrl: process.env.PROVENANCE_API });
const { intentToken } = await sandbox.mandate.intents.create({
actionDescription: "Buy a desk lamp: $48.00 at Brindlecote Home",
actionPayload: order,
agentSessionId: "sess_docs_home",
deviceId: "dev_00000000000000000000000000000001",
});
// No key needed to verify.
const prov = new Provenance({ baseUrl: process.env.PROVENANCE_API });
const result = await prov.verify({ token: intentToken, expected: { actionPayload: order } });
import os
from provenanceauth import Provenance
order = {"type": "purchase", "amount": 48, "currency": "USD", "merchant": "brindlecote-home.example"}
sandbox = Provenance("prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe", base_url=os.environ["PROVENANCE_API"])
token = sandbox.mandate.intents.create(
action_description="Buy a desk lamp: $48.00 at Brindlecote Home",
action_payload=order,
agent_session_id="sess_docs_home",
device_id="dev_00000000000000000000000000000001",
)["intent_token"]
result = sandbox.verify(token=token, expected={"action_payload": order})
The response, trimmed:
{
"object": "verification_result",
"valid": true,
"kind": "intent",
"binding": "match",
"revoked": false
}
binding: "match" means the cart you sent is the one the token was issued for. Change the amount and it says mismatch. Intent tokens and receipts explains what was signed, and verify a token shows the offline check and the paid one that says how the person approved.
Popular guides
- IdentifyVerify signed agents Check an agent's signature on your site.
- AuthorizeVerify agent checkouts Check the approval before you accept an order.
- AuthorizeAsk your own customer Have a shopper approve a cart with a passkey.
- AttestCapture requests Send a link that takes signed photos.
- MandateStep-up approval Ask a person before your agent acts.
- TraceRun a traced inference Read what the model computed.
Build with
- API reference: every endpoint, with curl, Node and Python examples that run against the sandbox.
- SDKs and tools: the Node and Python clients, the rails for agent payments, the CLI, and verifiers for TypeScript, Python and Go.
- Provenance MCP: Provenance as tools for Claude, ChatGPT, Cursor and other MCP clients.
- Webhooks, embeds and texts and reminders: the pieces every product shares.
Learn the concepts
- How Provenance works: what each product does and what they share.
- Intent tokens and receipts: the signed proofs every product issues, and how anyone checks them.
- Glossary: one sentence for each term these docs use.