# envolvr > Private, verifiable AI inference for agents on Robinhood Chain. An OpenAI-compatible API that runs inside hardware-attested enclaves (Intel TDX gateway, confidential-GPU providers). Every response comes with a signed receipt (model, attested provider session, request and response commitments, amount billed), and receipts are anchored on Robinhood Chain every 10 minutes. ## Endpoints - Inference gateway: https://api.envolvr.xyz (OpenAI API: POST /v1/chat/completions, GET /v1/models) - Accounts and proofs: https://auth.envolvr.xyz - Human docs: https://envolvr.xyz/docs/ - Source: https://github.com/envolvr/envolvr (SDK in sdk/), https://github.com/envolvr/private-ai-gateway ## Get an API key (wallet sign-in) 1. GET https://auth.envolvr.xyz/auth/nonce?wallet=<0x address> returns {nonce, issuedAt, message}. 2. Sign `message` with EIP-191 personal_sign using that wallet. 3. POST https://auth.envolvr.xyz/auth/key with JSON {wallet, nonce, issuedAt, signature} returns {apiKey}. Shown once. Send it as `Authorization: Bearer `. ## Fund the account - In a browser: https://app.envolvr.xyz/ (connect a wallet; deposit, manage keys, see usage). - USDG deposit: approve the CreditVault for USDG, then call deposit(uint256 amount) (or depositFor(address account, uint256 amount)). USDG has 6 decimals. Credited within seconds, net of the deposit fee (GET https://auth.envolvr.xyz/pricing -> depositFeeBps; currently 500 = 5%). A plain token transfer to the vault is not credited. - Automatic top-up (SDK): new Envolvr({ apiKey, autoTopUp: { signer, below: '5', amount: '20', maxPerDay: '100' } }) deposits `amount` when the balance < `below`, waits for the credit, and retries a 402 once; capped per UTC day. - Automatic top-up (on chain): CreditVault.setTopUpRule(address account, uint256 below, uint256 amount, uint256 maxPerDay) from the paying wallet, plus a USDG approval for the vault; the keeper calls topUp(payer, account) when the account's balance is below `below`; the contract enforces the amount, the account and maxPerDay per UTC day. amount 0 clears the rule. - Manage keys: GET https://auth.envolvr.xyz/auth/session/nonce?wallet=<0x> -> {message}; sign it (EIP-191); POST https://auth.envolvr.xyz/auth/session {wallet, nonce, issuedAt, signature} -> {session} (12 hours; manages the account, cannot call models). With `Authorization: Bearer `: GET/POST /account/keys ({label}), POST /account/keys/revoke {id}, GET /account/usage, GET /account/deposits. - Balance: GET https://auth.envolvr.xyz/account with the API key -> {balanceMicros} (micro-USD). - Credit: prepaid, never expires, not refundable. Deposit what you will use; automatic top-up keeps the balance up. ## Call a model POST https://api.envolvr.xyz/v1/chat/completions with an OpenAI chat body. Optional routing: "provider": {"only": ["near-ai"]} or {"order": ["redpill","near-ai"], "allow_fallbacks": true}. Providers: redpill (Phala), near-ai (NEAR AI Cloud), chutes (Chutes on Bittensor; each machine verified individually, requests end-to-end encrypted to its attested key). The response header x-receipt-id names the receipt; usage.cost is the cost in USD. Models at launch (input / output USD per 1M tokens; GET /v1/models is authoritative): - z-ai/glm-5.3: Phala via RedPill, 1.40 / 4.40 - z-ai/glm-5.3-flash: NEAR AI (non-streamed responses signed by the model enclave), 0.15 / 0.50 - qwen/qwen3.8-27b: Chutes 0.24 / 2.20; on request Phala via RedPill 0.24 / 2.50 or NEAR AI 0.44 / 3.30 - qwen/qwen3.6-35b-a3b: NEAR AI, 0.17 / 1.10 - deepseek/deepseek-v4-flash: Chutes, 0.44 / 1.32 - deepseek/deepseek-v3.2: Chutes, 1.00 / 1.00 - moonshotai/kimi-k2.6: Chutes, 0.50 / 2.85 - qwen/qwen3.5-397b-a17b: Chutes, 0.45 / 3.00 (reasons first; reasoning tokens bill as output) - google/gemma-4-31b-turbo: Chutes, 0.12 / 0.37 - nvidia/nemotron-3.5-lightning: Phala via RedPill, 0.07 / 0.20 (reasons first; reasoning tokens bill as output) - phala/qwen3.8-27b-uncensored: Phala via RedPill, 0.30 / 1.50 (uncensored; reasons first; reasoning tokens bill as output) - phala/gemma-4-26b-a4b-uncensored: Phala via RedPill, 0.15 / 0.70 (uncensored) Incognito models ("privacy": "incognito" in GET /v1/models; upstream near-incognito): NEAR AI's attested gateway relays the request to the model's provider under shared credentials, so the provider does not learn who sent it; the provider runs the model outside an enclave and reads the prompt under its own terms. The receipt binds to NEAR's attested gateway session and records that no model enclave served it. Attested models never fall back to these. - anthropic/claude-fable-5-1: 10.00 / 50.00 - anthropic/claude-opus-5-5: 4.00 / 20.00 - anthropic/claude-sonnet-5-5: 2.00 / 10.00 - anthropic/claude-haiku-4-5: 1.00 / 5.00 ## Receipts GET https://api.envolvr.xyz/v1/aci/receipts/ with the same API key, within one hour (receipts are kept for an hour). Events: request.received (sha256 of the request bytes), route.selected, upstream.verified (attested provider session), upstream.response_attested (NEAR, non-streamed), billing.charged ({currency, cost as decimal string, billed_micro_usd, rates, tokens, payer}), response.returned (sha256 of the response bytes). Signed with an Ed25519 key from the gateway's attested keyset. payer = "sha256:" + hex(sha256("billing.payer.v1:" + hex(sha256(api_key)) + ":" + receipt_id)) ## Verify - Gateway: npx private-ai-proxy verify https://api.envolvr.xyz --require-production-os - Receipt signature and commitments: npx private-ai-proxy audit --report --receipt --request-body --response-body --session (attestation.json: GET https://api.envolvr.xyz/v1/aci/attestation?nonce=<64 hex>, fetched while the receipt's keyset is live; session.json: GET /v1/aci/sessions/ with the API key) - Anchor: digest = "0x" + hex(sha256(JCS(receipt))) (RFC 8785). GET https://auth.envolvr.xyz/receipts//proof -> {status, batchIndex, leafIndex, root, proof, txHash}. Then call ReceiptAnchor.verifyReceipt(providerId, batchIndex, digest, proof) -> true. Anchored in 10-minute UTC slots, seconds after each slot ends. - The SDK does all of it: `npx @envolvr/sdk verify --last` (npm package @envolvr/sdk; also signin, deposit, chat). Always use the scoped name with npx. ## Robinhood Chain (chain id 4663) - RPC: https://rpc.mainnet.chain.robinhood.com - Explorer: https://robin.etherscan.io - USDG: 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 - CreditVault: 0x24DbbBd7d5eE9674D8A8B19a492E87A4957B1261 - ReceiptAnchor: 0x591fadf9d2D9d0A0fedEEd95d74321694797AF60 - NVLR: published at launch (https://envolvr.xyz/token/#contracts) - Gateway provider id: 0x86b99987cd8f8ebddc2dd0efa61ed52b5db594430f12446db424da0d9c4b831f ## NVLR - ERC-20 on Robinhood Chain, 1,000,000,000 supply. Not needed to use envolvr: USDG pay-per-request needs no token. - Buyback and burn: a portion of protocol revenue buys back NVLR and burns it, on an ongoing basis. - Details: https://envolvr.xyz/token/ ## Pricing Tokens at the providers' list prices. A fee (currently 5%) is kept from each USDG deposit. Billing is the exact cost rounded up to the next micro-USD. A request that allows several providers is priced at the highest of their list prices.