# Documentation

Documentation for the Provenance API: quickstarts, guides, the API reference and the SDK reference for Identify, Authorize, Attest, Mandate, Trace and Personal.

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.

- [Identify](https://provenanceauth.com/docs/identify.md) (for sites and apis): Name the agents and bots on every request. [Quickstart](https://provenanceauth.com/docs/identify/quickstart.md)
- [Authorize](https://provenanceauth.com/docs/authorize.md) (for merchants and issuers): Check the approval behind an agent's order. [Quickstart](https://provenanceauth.com/docs/authorize/quickstart.md)
- [Attest](https://provenanceauth.com/docs/attest.md) (for insurers and identity teams): Prove where and when a photo was taken. [Quickstart](https://provenanceauth.com/docs/attest/quickstart.md)
- [Mandate](https://provenanceauth.com/docs/mandate.md) (for agent builders): Give your agent rules and a person's approval. [Quickstart](https://provenanceauth.com/docs/mandate/quickstart.md)
- [Trace](https://provenanceauth.com/docs/trace.md) (for model teams): Read what a model computed before an agent acts. [Quickstart](https://provenanceauth.com/docs/trace/quickstart.md)
- [Personal](https://provenanceauth.com/help/personal) (for people): See and control the agents acting for you. [Quickstart](https://provenanceauth.com/help/personal/quickstart)

## 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.

**curl**

```bash
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"}}}'
```

**Node**

```ts
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 } });
```

**Python**

```python
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:

```json
{
  "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](https://provenanceauth.com/docs/concepts/tokens-and-receipts.md) explains what was signed, and [verify a token](https://provenanceauth.com/docs/authorize/guides/verify-tokens.md) shows the offline check and the paid one that says how the person approved.

## Popular guides

- [Verify signed agents](https://provenanceauth.com/docs/identify/guides/verify-signed-agents.md) (Identify): Check an agent's signature on your site.
- [Verify agent checkouts](https://provenanceauth.com/docs/authorize/guides/verify-agent-checkout.md) (Authorize): Check the approval before you accept an order.
- [Ask your own customer](https://provenanceauth.com/docs/authorize/guides/ask-your-own-customer.md) (Authorize): Have a shopper approve a cart with a passkey.
- [Capture requests](https://provenanceauth.com/docs/attest/guides/capture-requests.md) (Attest): Send a link that takes signed photos.
- [Step-up approval](https://provenanceauth.com/docs/mandate/guides/step-up-approval.md) (Mandate): Ask a person before your agent acts.
- [Run a traced inference](https://provenanceauth.com/docs/trace/guides/traced-inference.md) (Trace): Read what the model computed.

## Build with

- [API reference](https://provenanceauth.com/docs/api.md): every endpoint, with curl, Node and Python examples that run against the sandbox.
- [SDKs and tools](https://provenanceauth.com/docs/get-started/sdks.md): the Node and Python clients, the rails for agent payments, the CLI, and verifiers for TypeScript, Python and Go.
- [Provenance MCP](https://provenanceauth.com/docs/provenance-mcp.md): Provenance as tools for Claude, ChatGPT, Cursor and other MCP clients.
- [Webhooks](https://provenanceauth.com/docs/integrate/webhooks.md), [embeds](https://provenanceauth.com/docs/embeds.md) and [texts and reminders](https://provenanceauth.com/docs/messaging/reminders.md): the pieces every product shares.

## Learn the concepts

- [How Provenance works](https://provenanceauth.com/docs/concepts/how-provenance-works.md): what each product does and what they share.
- [Intent tokens and receipts](https://provenanceauth.com/docs/concepts/tokens-and-receipts.md): the signed proofs every product issues, and how anyone checks them.
- [Glossary](https://provenanceauth.com/docs/get-started/glossary.md): one sentence for each term these docs use.
