Skip to main content

Python SDK for the Verdifax cryptographic attestation pipeline

Project description

Verdifax Python SDK

Cryptographic attestation for AI inference. Three lines: send a payload, get a signed manifest hash you can give to an auditor.

Install

pip install verdifax

Quickstart

import verdifax

receipt = verdifax.attest(
    payload="hello verdifax",
    program_id="a" * 64,
    route_id="route-test",
    registry_record_hash="b" * 64,
)
print(receipt.manifest_hash)

That's it. The receipt's manifest_hash is a 64-char SHA-256 that seals every input, every kernel execution ID, the hardware attestation, the ZK transcript, the formal verifier status, and the final VFA. Anyone with the same inputs can re-derive the same hash.

Configuration

By default the SDK talks to a Verdifax API at http://localhost:9090 (the orchestrator's REST server). Override with environment variables:

export VERDIFAX_API_URL=https://api.verdifax.example.com
export VERDIFAX_API_KEY=your-api-key

Or construct a client explicitly:

from verdifax import VerdifaxClient

client = VerdifaxClient(base_url="https://api.verdifax.example.com", api_key="...")
receipt = client.attest(payload="...", program_id="...", route_id="...", registry_record_hash="...")

Async

import asyncio
from verdifax import AsyncVerdifaxClient

async def main():
    async with AsyncVerdifaxClient() as client:
        receipt = await client.attest(
            payload="hello verdifax",
            program_id="a" * 64,
            route_id="route-test",
            registry_record_hash="b" * 64,
        )
        print(receipt.manifest_hash)

asyncio.run(main())

Verification

Re-derive the manifest hash from the same inputs and confirm it matches a previously issued receipt:

ok = client.verify(
    manifest_hash=receipt.manifest_hash,
    payload="hello verdifax",
    program_id="a" * 64,
    route_id="route-test",
    registry_record_hash="b" * 64,
)

Helpers for popular providers

import verdifax

receipt = verdifax.attest_claude_response(
    prompt="What is the boiling point of water?",
    response="100 °C at sea level.",
    program_id="a" * 64,
    route_id="claude-route",
    registry_record_hash="b" * 64,
)

There is also verdifax.attest_openai_response(...) with the same signature.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

verdifax-0.2.0.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

verdifax-0.2.0-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file verdifax-0.2.0.tar.gz.

File metadata

  • Download URL: verdifax-0.2.0.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for verdifax-0.2.0.tar.gz
Algorithm Hash digest
SHA256 34d150963ba0a399892270fd40df3e0346993682ad53bb7c5c92aeef848e1a07
MD5 6a213b903d28779ff339b69c6bb82bc1
BLAKE2b-256 0bcf1cf0fd7583f300b108af418b0a59cd1320f92ef112dfac5fd9e29dd90526

See more details on using hashes here.

Provenance

The following attestation bundles were made for verdifax-0.2.0.tar.gz:

Publisher: release.yml on Verdifax/verdifax-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file verdifax-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: verdifax-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for verdifax-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fc2ae9665c5e231c52095905fd976a7c02adc81c0a707d77e2d16e33ba60241
MD5 304f7c5b8363aff60cdbd15450f4aab7
BLAKE2b-256 91f23942d7940d255056384edb3c117d253c0561bbb5f0e5495d9ea68d6a37a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for verdifax-0.2.0-py3-none-any.whl:

Publisher: release.yml on Verdifax/verdifax-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page