Skip to content

Developer Guide

A complete technical overview for developers integrating with SIX.


Architecture Overview

SIX is a verification layer for AI inference. It sits between your application and compute infrastructure, adding cryptographic proof to every API call.

Your App → SIX API → Sovereign Compute → Cryptographic Attestation → Verified Receipt

The API is OpenAI-compatible — if you can call POST /v1/chat/completions, you can use SIX with zero code changes beyond the endpoint URL and API key.


Core Concepts

Receipts

Every inference returns a signed receipt — a cryptographic proof binding the request, response, routing decision, and compute attestation. Receipts use secp256k1 Schnorr signatures, independently verifiable without trusting SIX.

Attestations

Receipts are periodically anchored to an immutable ledger via Merkle root attestation. This creates a tamper-evident chain: modify any receipt field, and the Merkle proof breaks.

Sovereignty

SIX routes inference to your infrastructure when sovereign routing is configured. Your data never leaves your boundary. The receipt proves this cryptographically.

Profiles & Capabilities

API keys are mapped to capability profiles that determine what endpoints you can access:

Profile Capabilities
Explorer Identity verification, public key access
Attester Chat completions, receipt generation
Agent Tool use, batch operations
Coordinator Multi-agent orchestration
Full All capabilities

Authentication

All requests require an API key via one of:

# Option 1: Authorization header (recommended)
Authorization: Bearer your-api-key

# Option 2: X-API-Key header
X-API-Key: your-api-key

Your API key is issued during onboarding and determines your capability profile.


API Endpoints

Inference

POST /v1/chat/completions

OpenAI-compatible chat completion with cryptographic receipt.

Request:

{
  "model": "default",
  "messages": [
    {"role": "user", "content": "Your prompt here"}
  ]
}

Response includes:

  • Standard OpenAI-format completion
  • receipt object with signature, commitment, and verification status

Verification

GET /v1/receipts/{receipt_id}
POST /v1/verify

Retrieve and independently verify receipts.

Discovery

GET /.well-known/six-verify.json
GET /.well-known/capabilities.json

Service discovery and capability enumeration.


Verification Flow

1. Extract receipt from inference response
2. Reconstruct commitment from receipt fields
3. Verify Schnorr signature against SIX public key
4. (Optional) Verify Merkle inclusion against attestation root

Verification can be performed using the six-verifier npm package or any secp256k1 library.

npm install six-verifier
const { verify } = require('six-verifier');
const result = verify(receipt);
console.log(result.valid); // true
curl -X POST https://six-sov.com/v1/verify \
  -H "Content-Type: application/json" \
  -d '{"receipt_id": "rcpt_..."}'

Error Handling

Status Meaning
401 Invalid or missing API key
403 Insufficient capability profile for this endpoint
429 Rate limit exceeded
500 Inference execution error (receipt still generated for audit)

All error responses include a detail field with a human-readable explanation.


Integration Patterns

Drop-in Replacement

If you're using the OpenAI SDK, change the base URL:

import openai

client = openai.OpenAI(
    api_key="your-six-api-key",
    base_url="https://api.six-sov.com/v1"
)

response = client.chat.completions.create(
    model="default",
    messages=[{"role": "user", "content": "Hello"}]
)

Receipt Archival

For compliance, archive receipts with your application logs. Each receipt is self-contained and independently verifiable — no SIX connectivity required for future audits.


Next Steps