Portal
Documentation: all sections

API reference

Every endpoint the gateway serves, grouped by how it authenticates. The base URL is https://api.buildsable.com/v1.

There are four ways a request authenticates:

Every billable response carries a signed, metadata-only receipt you can verify without trusting Sable.

Public

No authentication.

MethodPathNotes
GET/Service banner JSON.
GET/healthzLiveness check. Returns ok.
GET/v1/modelsModel catalog under stable Sable ids, with per-Mtok pricing. Models pinned to an unconfigured provider are omitted.
GET/v1/images/modelsImage-generation model catalog with per-image pricing. Empty until an image provider is enabled on the deployment.
GET/v1/nodesNode registry: the gateway, attested TEE backends, and genuinely enrolled fleet nodes. See node agent contract.
POST/v1/nodes/heartbeatNode-key auth (nk-sable_ bearer). The fleet's 60s heartbeat with capability and endpoint refresh.
GET/v1/statusRecorded gateway health and uptime, plus confidential and sandbox posture blocks when those backends are configured.
GET/v1/attestationLive verified TEE attestation, or verified:false with a sanitized error. See privacy tiers.
GET/v1/billing/plansSable Pro plan catalog: fees, retention, limits, per-feature flags.
GET/v1/billing/methodsHow to pay: treasury address, chains, USDT contracts, confirmations, plus a Solana block when configured. See paying with USDT.
GET/v1/receipts/pubkeyThe secp256k1 receipt-signer address and scheme.
POST/v1/receipts/verifyVerify a {receipt, signature} (EIP-191). Returns {valid, recovered_address, payload}.
GET/v1/receipts/shared/:idA receipt its owner explicitly shared, viewable at /r/{request_id}.
GET/v1/receipts/:id/badge.svgA live SVG verification badge for a receipt, embeddable via a plain <img>.
GET/v1/passportPublic agent directory: minted passports ranked by verified runs, then receipts. Provable activity, not a trust score.
GET/v1/passport/:handlePublic agent passport lookup by handle.
GET/v1/explorerPublic proof-explorer feed: aggregate proof counts plus recent owner-shared receipts, passports, and on-chain anchors.
GET/v1/vault/chain/:idContent-free hash chain for a vault asset id, recomputable by anyone.
GET/v1/vault/anchors/:idAn anchor batch: root, ordered event hashes, and Solana signature.
GET/v1/vault/view/:tokenRead a vault asset through a scoped view key.
POST/v1/relay-access/:secretOpen a Relay by its link secret. Body {pin?}; expired, revoked, or capped links answer 404 uniformly.
POST/v1/relay-access/:secret/objects/:idFetch one relay file's content. View-only relays serve only image/* and text/*.
POST/v1/assistantKeyless "Ask Sable" assistant. Persists nothing and mints no receipt.

Auth bootstrap

Public. This is how a wallet gets a session in the first place.

MethodPathNotes
POST/v1/auth/nonceReturns a {nonce} (EIP-4361, 5-minute TTL) to sign.
POST/v1/auth/verifyVerify a SIWE message and signature. Returns a sess_ token. See Authentication.

API-key auth

Bearer sk-sable_.... The metered surface an agent calls.

MethodPathNotes
POST/v1/chat/completionsOpenAI-shape chat completions. Supports stream:true.
POST/v1/embeddingsOpenAI-shape embeddings.
POST/v1/messagesAnthropic Messages API. Translates and delegates to the chat handler.
POST/v1/sandboxesMetered sandbox code execution. Accepts stream:true and an optional Idempotency-Key header.
POST/v1/mcpRemote MCP server, JSON-RPC tools.
POST/v1/keys/delegateParent-key-authed: mint a bounded delegated sub-key mid-run.
GET/v1/creditKey-authed balance including held and spendable credit: an agent's runway.
POST/v1/memory/collectionsCreate a Sable Memory collection: a metered, sealed knowledge base.
GET/v1/memory/collectionsList your memory collections.
DELETE/v1/memory/collections/:idDelete a collection and its sealed chunks.
POST/v1/memory/collections/:id/documentsChunk, embed, and store a document. Billed as embedding usage.
POST/v1/memory/collections/:id/searchSemantic search a collection; returns the top matching chunks.
PUT/v1/state/:keySet durable agent state. Body {value, namespace?}; sealed at rest.
GET/v1/state/:keyRead one state value. ?namespace= selects the namespace.
GET/v1/stateList state keys in a namespace (no values).
DELETE/v1/state/:keyDelete one state value.
POST/v1/agents/:id/messagesDeliver a message to another of your agents' mailboxes. Account-scoped.
GET/v1/agents/:id/messagesRead an agent's mailbox. ?consume=true marks read; ?unread_only=.
POST/v1/pay/requestsMint a signed payment request invoice. Non-custodial; EVM chains.
GET/v1/pay/requests/:idFetch a payment request and its status.
POST/v1/pay/requests/:id/settleVerify the on-chain transfer and return a signed settlement receipt. Body {tx_hash}.
POST/v1/images/generationsOpenAI-shape image generation, metered per image with a signed receipt. Where enabled.

Sable-specific body fields

/v1/chat/completions, /v1/embeddings, and /v1/messages accept extra body fields alongside the standard OpenAI or Anthropic shape:

Unknown OpenAI-shape fields pass through to the upstream unchanged.

Session auth

Bearer sess_... from Sign-In With Ethereum. The account-management surface behind the dashboard.

MethodPathNotes
POST/v1/keysMint an API key with optional scopes. Plaintext returned once.
GET/v1/keysList keys (prefixes and metadata only) with subtree spend.
DELETE/v1/keys/:idRevoke a key, cascading over its delegated subtree.
POST/v1/keys/:id/rotateMint a scope-identical replacement; the old key expires after a grace window.
POST/v1/keys/:id/unfreezeLift an automatic circuit-breaker freeze on a key.
POST/v1/mandatesCreate a signed, bounded spending mandate that mints a constrained sub-key.
GET/v1/mandatesList the account's mandates.
DELETE/v1/mandates/:idRevoke a mandate.
POST/v1/mandates/:id/proofMint a publicly-verifiable authorization certificate for a mandate.
POST/v1/passportMint a signed agent passport from the agent's own provable history.
POST/v1/agentsDeploy a hosted agent: seal the code, mint its bounded key, schedule it. Max 20 per account.
GET/v1/agentsList hosted agents with schedule, last run, and run count.
POST/v1/agents/:id/triggerRun a hosted agent now. Returns the full sandbox response once; output is never stored.
POST/v1/agents/:id/gateEnable or disable a hosted agent. Body {enabled: bool}.
DELETE/v1/agents/:idDelete a hosted agent: revokes its key and destroys the sealed code.
POST/v1/ghost/sessionsStart a Ghost: an ephemeral scoped key whose metadata is purged at destruction. Key shown once.
GET/v1/ghost/sessionsList ghost sessions.
GET/v1/ghost/sessions/:idOne ghost session, including seconds_remaining.
POST/v1/ghost/sessions/:id/extendExtend a ghost. Total lifetime capped at 24 hours.
POST/v1/ghost/sessions/:id/destroyDestroy a ghost now: revoke its key, purge its metadata.
POST/v1/relaysCreate a Relay: sealed temporary share. One-time share_url returned once.
GET/v1/relaysList your relays (metadata only: status, access counts, sizes).
POST/v1/relays/:id/revokeRevoke a relay: destroys the ciphertext immediately.
GET/v1/runsList per-run receipt hash chains.
GET/v1/runs/:idOne run: its chained, individually-signed receipts.
POST/v1/runs/:id/proofA signed run proof: head hash, receipt count, total cost, span, anchor.
POST/v1/runs/:id/auditA signed, content-free compliance audit pack for the whole run.
GET/v1/receipts/:idRe-fetch a stored receipt by request id or usage-event id.
POST/v1/receipts/:id/shareOpt a receipt into public fetchability.
DELETE/v1/receipts/:id/shareOpt a receipt back out of public fetchability.
GET/v1/usageAggregate lifetime usage for the dashboard.
GET/v1/usage/streamSSE feed of new metering events for the account.
GET/v1/usage/eventsRaw metering ledger with filters, keyset cursor, and ?format=csv export.
POST/v1/usage/statementMint a signed spend statement for a period. See AgentFinOps.
GET/v1/usage/sandboxesSandbox run history (metadata only).
GET/v1/usage/sandboxes/:idOne sandbox run.
GET/v1/billing/balanceCredit position including held and spendable.
POST/v1/billing/depositsVerify an on-chain USDT transfer and credit it. Idempotent. See paying with USDT.
GET/v1/billing/depositsDeposit history.
POST/v1/billing/deposits/refreshRe-check every pending deposit.
GET/v1/billing/ledgerAppend-only credit ledger behind the balance.
GET/v1/billing/alertsThe account's balance_low webhook threshold.
PUT/v1/billing/alertsSet the balance_low threshold (null = deployment default).
GET/v1/billing/subscriptionCurrent Sable Pro plan, period end, auto-renew, balance.
POST/v1/billing/subscriptionSubscribe or change plan. Paid plans debit the monthly fee from the prepaid balance; 402 if it cannot cover it.
POST/v1/billing/subscription/cancelCancel auto-renew; the plan drops to Free at period end.
POST/v1/reports/slaA signed SLA report: recorded uptime telemetry in the verifiable receipt envelope.
POST/v1/evalsCreate an eval suite: cases with assertions against a model.
GET/v1/evalsList eval suites.
DELETE/v1/evals/:idDelete an eval suite.
POST/v1/evals/:id/runRun the suite against its model (real, metered inference); returns pass rate and regression flag.
GET/v1/evals/:id/runsRun history with pass rate over time.
POST/v1/webhooksCreate a webhook; secret returned once.
GET/v1/webhooksList webhooks.
DELETE/v1/webhooks/:idDisable a webhook.
GET/v1/webhooks/:id/deliveriesLast 50 delivery attempts.
POST/v1/webhooks/:id/testFire a synthetic webhook_test event at this webhook.
GET/v1/auth/meThe {account_id, wallet_address} for the bearer session.
POST/v1/auth/logoutInvalidate the current session.
GET/v1/auth/sessionsList the account's live sessions.
POST/v1/auth/logout-allInvalidate every session (the leaked-token remedy).
GET/v1/auth/walletsList wallets linked to the account.
POST/v1/auth/walletsLink an additional wallet (SIWE proof of the new wallet).
DELETE/v1/auth/wallets/:addrUnlink a wallet. Refuses the last one.
POST/v1/vault/assetsRegister a private vault asset; sensitive fields sealed at rest.
GET/v1/vault/assetsList the caller's assets.
GET/v1/vault/assets/:idAsset detail plus its hash chain.
GET/v1/vault/assets/:id/holdersIssuer-only cap table: every holder and decrypted position.
POST/v1/vault/assets/:id/closeIssuer-only, irreversible: chains asset_closed; transfers refuse thereafter.
POST/v1/vault/assets/:id/distributeIssuer-only: record a pro-rata payout to holders. Does not move principal.
POST/v1/vault/assets/:id/navRecord a NAV or reserves attestation and return a signed proof.
POST/v1/vault/assets/:id/view-grantMint a scoped view key for an asset.
GET/v1/vault/assets/:id/view-grantsList an asset's view grants.
DELETE/v1/vault/view-grants/:idRevoke a view grant.
GET/v1/vault/portfolioDecrypted-for-owner totals and recent activity.
GET/v1/vault/distributionsDistribution history.
POST/v1/vault/transfersPrivate, value-conserving position transfer to another account's wallet.
GET/v1/vault/transfersTransfer history.
POST/v1/vault/proofsMint a signed selective-disclosure statement, verifiable via /v1/receipts/verify.
POST/v1/nodes/enrollEnroll a fleet node under the account; one-time nk-sable_ key reveal. See node agent contract.
POST/v1/nodes/:id/:gateOwner gate: :gate is disabled or draining, body {set: bool}.

Admin

Bearer $SABLE_ADMIN_TOKEN. The whole group is unmounted and returns 404 when no admin token is configured; a wrong token returns 401.

MethodPathNotes
GET/v1/admin/metricsDemand-gate numbers: paying accounts, spend by window, events by kind, and billing_enforced.
POST/v1/admin/accounts/suspendThe abuse kill switch. Body {account_id, suspended, reason}.
POST/v1/admin/denylistRefuse one reported payload by its full sha256. Stores no content.
POST/v1/admin/nodes/enrollEnroll a house node under the dedicated house-ops account.