Verifiable AI Inference

ComputeSeal is the cryptographic verification layer for AI completions. It wraps existing AI models in an OpenAI-compatible routing gateway, attaching a tamper-proof compute receipt to every single completion response.

Receipt-Native

Measure latency, input/output tokens, Cost in USD, server signatures, and cryptographic prompt-response hashes.

Solana Anchored

Optionally stamp response metadata onto the Solana blockchain, creating an immutable public audit ledger.

Quickstart

Get started by installing the official client SDK and launching your first verifiable request in minutes.

$ npm install @computeseal/sdk

SDK Integration

Initialize the client and set your authorization credentials. The SDK automatically resolves JSON completions and appends the cryptographic compute receipt.

import { ComputeSeal } from "@computeseal/sdk";

const seal = new ComputeSeal({
  apiKey: process.env.COMPUTESEAL_API_KEY
});

const result = await seal.chat({
  model: "openrouter/llama-3.1-70b",
  messages: [ 
    { role: "user", content: "Write a technical summary of zk proofs." }
  ],
  receipt: true,
  anchor: "solana"
});

console.log(result.output);
console.log(result.receipt);

OpenAI Compatibility

You do not need to replace your entire application codebase. ComputeSeal is drop-in compatible with standard OpenAI libraries. Simply change your base initialization URL:

baseURL: "https://computeseal.com/api"

Verifiable Receipt Schema

Every inference return payload contains a compute_receipt block mapping metadata parameters. The signature matches server public key decryptions.

{
  "version": "1.0",
  "receipt_id": "rcpt_xxx",
  "created_at": "ISO_DATE",
  "request": {
    "prompt_hash": "sha256_hash",
    "messages_hash": "sha256_hash"
  },
  "response": {
    "response_hash": "sha256_hash",
    "output_hash": "sha256_hash"
  },
  "compute": {
    "provider": "openrouter",
    "model": "llama-3.1-70b",
    "input_tokens": 420,
    "output_tokens": 784,
    "total_tokens": 1204,
    "latency_ms": 1840,
    "cost_usd": "0.0031"
  },
  "verification": {
    "receipt_hash": "sha256_hash",
    "signature": "server_signature",
    "status": "verified"
  },
  "anchor": {
    "chain": "solana",
    "tx": "tx_hash_or_null",
    "status": "confirmed"
  }
}

Solana Proof Anchors

Setting anchor: "solana" writes the receipt hash to the Solana blockchain via a custom Memo program sequence. This is a non-custodial transaction recording system: raw prompt and response logs are never written on-chain to maintain privacy.

Gateway Routing Modes

Configure how the ComputeSeal gateway resolves completion requests across available providers. You can define this dynamically in your config or override it using the payload parameters.

Cheapest Verified

Routes payload to the node providing the lowest tokens/USD cost that is actively producing signed enclaves.

Fastest Available

Dynamically evaluates latency response times and routes prompts to the fastest responding node.

Highest Reputation

Exclusively selects node providers with verified 99.9%+ uptime history records.

Spend Controls & Policies

Prevent token drainage and optimize inference budgets by establishing spend controls inside the dashboard.

  • Daily Budget Limits: Automatically reject completions once a custom USD spend threshold is crossed.
  • Token Window Caps: Define maximum input and output token lengths globally or per API key prefix to cap resource usage.
  • Authorized Model Lists: Lock specific API keys to allow only cheap models (e.g., gpt-4o-mini) and deny expensive enclaves.

Errors & Status Codes

Gateway responses follow standard HTTP conventions, combined with a custom ComputeSeal details error payload if validation fails.

{
  "error": {
    "code": "401_unauthorized",
    "message": "Gateway API Key is invalid or has been revoked.",
    "details": {
      "key_prefix": "cs_live_xxxxxx",
      "timestamp": "2026-06-19T18:56:59.801Z"
    }
  }
}