Developer SDK

Verifiable AI Completions in One Line of Code

The official TypeScript SDK for ComputeSeal. Effortlessly connect to our gateway, route completions across TEE enclaves, and verify prompt-response authenticity cryptographically.

NPM REGISTRY LIVE

@computeseal/sdk

The SDK is fully published and ready for production pipelines. Standard support for CommonJS, ESModules, local sandbox mock testing, and browser/Edge runtimes.

View on NPM Registry
npm install @computeseal/sdk
Quickstart Integration (TypeScript)
import { ComputeSeal } from "@computeseal/sdk";

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

// 2. Execute cryptographically signed completion
const result = await seal.chat({
  model: "openrouter/llama-3.1-70b",
  messages: [ 
    { role: "user", content: "Explain Solana finality simply." }
  ],
  receipt: true,       // Returns proof receipt payload
  anchor: "solana"     // Anchors receipt hash on Solana blockchain
});

console.log(result.output);  // Text completions content
console.log(result.receipt); // Secure cryptographic proof ledger

SDK Parameter Options

apiKeyComputeSeal gateway authorization token. Resolves to process.env.COMPUTESEAL_API_KEY by default.
baseURLAPI completions router gateway endpoint (defaults to https://computeseal.com/api).
anchorProof verification ledger options: "solana" (on-chain), "off-chain" (signed only), or "none".

Sandboxed Mock Testing

If the constructor detects a mock configuration key (e.g. starting with cs_test_) or the environment flag COMPUTESEAL_MOCK=true, it launches a hardware enclave simulation offline.

Read Sandbox Specs

Need Detailed Endpoint Specifications?

Check the core concepts, Solana Memo program details, and comprehensive JSON validation schemas inside our documentation portal.

Open Developer Docs