Skip to content

What is stoka?

Stoka is a paid HTTP storage API for AI agents and automations.

  • Every request is priced in USDC on Stellar.
  • Every paid call settles on-chain in a single x402 payment — no signups, no monthly bills, no API keys to rotate.
  • The client library signs the payment for you; you just call store / retrieve / update / delete.

How it works

  1. You send a normal HTTP request (POST /v1/store, GET /v1/retrieve/{key}, etc).
  2. The first call returns HTTP 402 Payment Required with a JSON body describing what's due (amount, asset, recipient, nonce).
  3. Your client signs a Soroban USDC transfer authorization over that challenge and retries with an X-PAYMENT header.
  4. The server verifies, charges exactly what was quoted, and completes the operation.

The three client libraries (Python, Go, TypeScript) handle step 3–4 for you. If you want to integrate directly, see the x402 protocol.

What stoka is good for

  • Agent scratch memory — persist conversation state or planning artefacts by key; pay fractions of a cent per MB-day.
  • Signed blobs with receipts — every write is an on-chain USDC transfer, so billing is auditable without a database.
  • No-account demos — ship a demo that accepts any Stellar testnet wallet as authentication.

What stoka is not

  • Not a CDN. Reads are priced per kilobyte and don't come from an edge cache.
  • Not a contract wallet. The seed that signs payments pays for them; it doesn't accumulate credit.
  • Not a replacement for S3 at scale. Stoka's pricing assumes human-sized payloads (a few KB, occasionally MB) held for days or weeks, not terabytes held for years.

Next

  • Quickstart — store / retrieve / update / delete in Go, Python, TypeScript, Node, and raw curl, side by side.
  • Clients — per-language deep dives.
  • The x402 protocol — how the payment flow works under the hood.
  • HTTP API reference — every route, every header, every response shape.

MIT Licensed.