> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prysm1.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PrysmProof: verifiable receipts for every AI call

> Every PRYSM response includes a cryptographic receipt. Here's how to verify that a call happened, which model ran it, and what it cost.

AI-generated content is increasingly used in compliance workflows, financial analysis, legal
research, and medical information. When an automated system acts on an LLM output, you need
to be able to prove:

1. **This specific prompt was sent** (not a different one).
2. **This specific model ran it** (not a cheaper substitute).
3. **At this specific time** (not cached or replayed).
4. **With this output** (not modified after the fact).

PRYSM's PrysmProof system provides a cryptographic receipt for every call. It's included
automatically — no configuration needed.

## The receipt

Every PRYSM response includes a `prysm.proof` extension field:

```python theme={null}
from prysm import Prysm

client = Prysm()
resp = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Summarize this contract clause: ..."}],
)

proof = resp.extensions["prysm"]["proof"]
print(proof)
# {
#   "request_id": "f9a3b2c1-1234-5678-abcd-ef0123456789",
#   "timestamp": "2026-06-13T14:32:11.456Z",
#   "model": "claude-sonnet-4.5",
#   "provider": "anthropic",
#   "mode": "balanced",
#   "proof_hash": "sha256:a1b2c3d4e5f67890",
#   "verifiable": true
# }
```

## The hash

`proof_hash` is a truncated SHA-256 of the concatenated fields:

```python theme={null}
import hashlib

def compute_proof(request_id, timestamp, model, provider, mode, prompt, response):
    prompt_sha = hashlib.sha256(prompt.encode()).hexdigest()
    response_sha = hashlib.sha256(response.encode()).hexdigest()
    raw = f"{request_id}{timestamp}{model}{provider}{mode}{prompt_sha}{response_sha}"
    return "sha256:" + hashlib.sha256(raw.encode()).hexdigest()[:16]
```

You can reconstruct and verify the hash yourself — no trust required.

## Verify via the API

```python theme={null}
# Verify by request_id — the API recomputes the hash from stored data
is_valid = client.verify_proof(
    proof["request_id"],
    resp.choices[0].message.content,
)
print(is_valid)  # True
```

Or via the public endpoint (no API key):

```bash theme={null}
curl https://api.prysm1.com/v1/proof/f9a3b2c1-1234-5678-abcd-ef0123456789
# {
#   "verified": true,
#   "request_id": "f9a3b2c1-...",
#   "entry": {"model": "claude-sonnet-4.5", "timestamp": "...", ...}
# }
```

## Offline verification (Ed25519 signatures)

When `PRYSM_SIGNING_SEED` is set on the server, every receipt is signed with an Ed25519 private
key. You can verify receipts offline without any API call:

```python theme={null}
import nacl.signing
import nacl.encoding

# Fetch the public key once — cache it, it changes rarely
pubkey_hex = client._get("/proof/pubkey")["public_key"]
verify_key = nacl.signing.VerifyKey(bytes.fromhex(pubkey_hex))

# Verify a receipt offline
message = proof["request_id"].encode()
signature = bytes.fromhex(proof["signature"])
verify_key.verify(message, signature)   # raises if invalid
print("Offline verification: OK")
```

## PrysmProof v2 (orchestration)

For multi-model orchestration runs (`POST /v2/orchestrate`), PrysmProof v2 attests to the
full cascade of models:

```python theme={null}
result = client.orchestrate("Analyze these three architectural options", policy="depth")
proof_v2 = result["prysm"]["proof"]
print(proof_v2["models_used"])    # ["gpt-5.2", "claude-sonnet-4.5", "gemini-3.1-pro"]
print(proof_v2["strategy"])       # "ensemble_moa"
print(proof_v2["confidence"])     # 0.94
print(proof_v2["agreement"])      # 0.87
print(proof_v2["proof_hash"])     # sha256:...
```

The v2 hash covers all model outputs, the synthesis step, and the final response — proving
the entire cascade, not just the final answer.

## Compliance attestations

For regulated workloads, PRYSM can bind a compliance policy decision to the PrysmProof receipt:

```python theme={null}
resp = client.orchestrate(
    "Review this loan application for FCRA compliance",
    compliance={"frameworks": ["FCRA"], "jurisdiction": ["US"], "data_residency": ["US"]},
)
attestation = resp["prysm"]["compliance"]["attestation"]
# {
#   "sha256": "7a3f...",
#   "policy_hash": "e5c2...",
#   "chosen_model": "gpt-5.2",
#   "approved_provider": "openai",
#   "cost_actual_usd": 0.0043,
#   "timestamp": "2026-06-13T..."
# }
```

The attestation hash covers the policy decision, the chosen model, the actual cost, and the
timestamp — a single artifact you can store in an audit log.
