VerdifaX

Quickstart — Python

The fastest path to a sealed Verdifax artifact. You'll have a real manifest hash printed in your terminal in under five minutes.

Prerequisites

  • Python 3.9 or newer
  • A running Verdifax orchestrator (default http://localhost:9090). If you don't have one yet, follow Quickstart — Docker first.

1. Install

pip install verdifax

2. Three lines

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. receipt.manifest_hash is your sealed proof artifact.

3. Verify

The whole point of the manifest hash is that anyone can re-derive it. Run the same inputs again — the hash is identical, byte-for-byte:

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

If you change any input — even a single character of the payload — the hash will be different and verify() returns False.

Configuration

By default the SDK talks to http://localhost:9090. Override with an environment variable:

export VERDIFAX_API_URL=https://api.verdifax.example.com
export VERDIFAX_API_KEY=vfx_your_key_here

Or pass them explicitly:

from verdifax import VerdifaxClient

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

Async

For high-throughput inference servers, use AsyncVerdifaxClient:

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())

For attesting Anthropic Claude / OpenAI prompt-response pairs in one call:

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,
)

verdifax.attest_openai_response(...) has the same signature. Different providers tag the payload differently, so identical text under different providers produces different manifest hashes — exactly what you want.

Continue