Docs · Testnet

Build on confidential, verifiable inference.

BlindCompute speaks the OpenAI API. Point your client at our endpoint, let your agent pay per call in USDC over x402, and get a cryptographic receipt with every response. No API keys, no accounts — just a wallet and a base URL.

30-second start
# 1. install
npm install @blindcompute/sdk viem

# 2. swap your base URL → https://api.blindcompute.org/v1
# 3. call it like OpenAI. every response is verifiable on Base.
00

Overview

Testnet preview. The gateway runs against Base Sepolia. Base URLs, package names, and model slugs below are not yet final — treat them as a preview of the developer experience, not a stable contract.

BlindCompute is an OpenAI-compatible gateway for inference that runs inside a hardware enclave (Intel TDX + NVIDIA H100 confidential computing). The operator can't see your prompt, your output, or the model weights, and every run is attested on-chain so you can prove the correct model ran — untampered.

Three things make it different from a normal inference API:

  • Confidentialrequests decrypt only inside the TEE.
  • Verifiableeach response carries a receipt checkable against Automata DCAP on Base.
  • Pay-per-callsettle in USDC over x402 — no API keys, gasless for the payer.

Base URL https://api.blindcompute.org/v1

01

Quickstart

Install the SDK and a wallet library, then make your first verified call. Your agent's account pays in testnet USDC.

terminal
npm install @blindcompute/sdk viem
first-call.ts
import { BlindCompute } from '@blindcompute/sdk'
import { privateKeyToAccount } from 'viem/accounts'

// Your agent's wallet pays per call in USDC on Base — no API keys.
const bc = new BlindCompute({
  baseURL: 'https://api.blindcompute.org/v1',
  account: privateKeyToAccount(process.env.AGENT_PRIVATE_KEY as `0x${string}`),
})

const res = await bc.chat.completions.create({
  model: 'llama-3.3-70b-instruct',
  messages: [{ role: 'user', content: 'Explain TEE attestation in one line.' }],
})

console.log(res.choices[0].message.content)

// Prove it actually ran in an attested enclave:
console.log('verified:', await bc.verify(res)) // → true
Need testnet funds? Bridge a little Base Sepolia ETH for gas-free EIP-3009 transfers and grab test USDC from a faucet, then fund your agent's address.
02

Auth & payment

There are no API keys to provision or leak. Authorization is payment: an unpaid request gets an HTTP 402 with a price; your client signs a USDC authorization (EIP-3009 transferWithAuthorization) and retries. Settlement is on Base and gasless for the payer. The SDK does this round-trip automatically.

the 402 handshake (curl)
# An unpaid request returns 402 with the price + Base network context
curl -i https://api.blindcompute.org/v1/chat/completions \
  -H 'content-type: application/json' \
  -d '{ "model": "llama-3.3-70b-instruct",
        "messages": [{ "role": "user", "content": "hi" }] }'

# HTTP/1.1 402 Payment Required
# → the SDK reads the price, signs USDC over x402, and replays the request

Already using the OpenAI SDK? Keep it — point baseURL at BlindCompute and wrap fetch with the x402 payer.

drop-in with the OpenAI SDK
import OpenAI from 'openai'
import { withPayment } from '@blindcompute/sdk'

const openai = new OpenAI({
  baseURL: 'https://api.blindcompute.org/v1',
  apiKey: 'x402',                // payment is on-chain, not a key
  fetch: withPayment(account),   // attaches a USDC payment on 402
})
03

Making requests

The request and response shapes mirror OpenAI's /chat/completions. Streaming is supported; the receipt is delivered with the final chunk.

chat completion
const res = await bc.chat.completions.create({
  model: 'llama-3.3-70b-instruct',
  messages: [
    { role: 'system', content: 'You are a terse assistant.' },
    { role: 'user', content: 'What is operator-blind inference?' },
  ],
  temperature: 0.2,
  max_tokens: 256,
})

res.choices[0].message.content // the completion
res.receipt                    // attestation receipt (see §05)
04

Verifying results

Verification is the whole point. bc.verify(res) confirms the enclave's signature over this output recovers to a signer whose TEE measurement is registered on-chain via Automata DCAP — proof a genuine, untampered enclave produced the result. It runs client-side; you never have to trust the gateway's word.

verify.ts
const report = await bc.verifyDetailed(res)
// {
//   measurementRegistered: true,  // node's TEE measurement is on-chain (Automata DCAP)
//   signatureValid:        true,  // the enclave signed THIS output
//   receiptAnchored:       true,  // an InferenceReceipts record exists on Base
// }

if (!report.signatureValid) throw new Error('unverified inference — do not trust')
A node's measurement is verified on-chain once (expensive); thereafter each per-call receipt is a cheap ECDSA check against the stored signer. Verify the node once; sign each inference.
05

Receipts

Every completion carries a receipt binding the request, the node, its measurement, a commitment to the output, the USDC paid, and a timestamp. It's anchored on Base and independently checkable — portable, audit-grade proof a call happened as claimed.

res.receipt
{
  "requestHash":  "0x9f2c…",
  "node":         "0xA1b2…",
  "measurement":  "0x7d3e…",
  "outputCommit": "0x44af…",
  "paidUSDC":     "0.0012",
  "timestamp":    1718800000
}
06

Models

The gateway routes across confidential backends (Phala, Atoma). Availability tracks what those providers serve in TEEs; query it at runtime rather than hard-coding.

list models
const { data } = await bc.models.list()
// testnet, e.g.:
//   llama-3.3-70b-instruct   — general chat
//   llama-3.1-8b-instruct    — small + cheap
07

Errors

Standard HTTP semantics. The one you'll meet first is 402 — and the SDK turns it into a payment, not an error.

200Completion returned, with an attached receipt.
400Malformed body or unsupported model.
402No (or insufficient) x402 payment. Body carries the price + Base network. The SDK handles this for you.
429Rate limited. Back off and retry.
503No confidential backend could serve the request. Safe to retry.
08

API reference

Three endpoints. Everything routes through the OpenAI-compatible surface.

POST/v1/chat/completionsRun a confidential chat completion. Returns the completion plus a verifiable receipt.
GET/v1/modelsList the models currently routable across confidential backends.
GET/healthGateway liveness + active network. Public, unmetered.

Live status /api/health

09

SDKs

TypeScript

Available · testnet

Python

Planned

Any OpenAI client

via x402 fetch wrapper

Read the theory, then ship.

The whitepaper covers the trust model and on-chain design behind these APIs.