Usage Examples

Quick examples to get you started with Zero Proof verification.

Python Example

Simple verification flow using the Python SDK:

from zeroproof import ZeroProof

# Initialize client
client = ZeroProof(api_key="zkp_your_api_key")

# Create verification challenge
challenge = client.create_challenge(
    agent_id="my-shopping-bot",
    action="purchase"
)

# Verify the proof
result = client.verify_proof(
    challenge_id=challenge.challenge_id,
    proof=generated_proof
)

if result.verified and result.confidence > 0.95:
    print("✓ Agent verified!")
else:
    print("✗ Verification failed")

cURL Example

Simple verification flow using cURL commands:

Step 1: Request Challenge

curl -X POST https://api.zeroproofai.com/v1/verify/challenge \
  -H "X-Api-Key: zkp_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"agent_id": "my-shopping-bot", "action": "purchase'}'

Step 2: Verify Proof

curl -X POST https://api.zeroproofai.com/v1/verify/proof \
  -H "X-Api-Key: zkp_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"challenge_id": "chl_123", "proof": "zkp_...'}'

Need more details?

For complete API specifications, parameters, and response formats, check out the API Reference.

View API Reference