Skip to content

Quickstart

Create your first cryptographic attestation in under 5 minutes.

The Basics

from glacis import Glacis
glacis = Glacis(api_key="glsk_live_...")
receipt = glacis.attest(
service_id="my-ai-app",
operation_type="inference",
input={"prompt": "What is the capital of France?"}, # Hashed locally
output={"response": "Paris is the capital of France."}, # Never sent
)
print(f"Attestation ID: {receipt.attestation_id}")
print(f"Badge URL: {receipt.badge_url}") # Shareable verification link

Step-by-Step

  1. Install the SDK

    Terminal window
    pip install glacis
  2. Set your API key

    Terminal window
    export GLACIS_API_KEY=glsk_live_your_key_here
  3. Create an attestation

    from glacis import Glacis
    import os
    glacis = Glacis(api_key=os.environ["GLACIS_API_KEY"])
    # Attest any AI interaction
    receipt = glacis.attest(
    service_id="my-service",
    operation_type="inference",
    input={"prompt": "Hello, world!"},
    output={"response": "Hi there!"},
    metadata={"model": "gpt-4", "temperature": 0.7}
    )
  4. Verify the receipt

    result = glacis.verify(receipt)
    print(f"Valid: {result.valid}")
    print(f"Signature valid: {result.signature_valid}")
    print(f"Merkle proof valid: {result.proof_valid}")
  5. Share the verification URL

    print(f"Share this URL for third-party verification:")
    print(receipt.badge_url)
    # https://glacis.io/verify/att_xxx

What You Get

Each attestation includes:

FieldDescription
attestation_idUnique identifier (att_...)
timestampISO 8601 timestamp
payload_hashSHA-256 of your input/output
leaf_indexPosition in Merkle tree
merkle_proofInclusion proof for verification
signed_tree_headSigned tree state from witness
badge_urlShareable verification URL

No API Key? Use Offline Mode

Start developing immediately without an API key:

from glacis import Glacis
# Offline mode - self-signed receipts
glacis = Glacis(mode="offline")
receipt = glacis.attest(
service_id="dev-testing",
operation_type="inference",
input={"prompt": "test"},
output={"response": "result"},
)
print(f"Status: {receipt.witness_status}") # "UNVERIFIED"

Next Steps

OpenAI Integration

Auto-attest every OpenAI call with zero code changes.

Learn more →

API Reference

Complete SDK reference with all methods and options.

Learn more →