Quickstart
A baton is a digital object you stash with Relaystation and retrieve, share, append to, or seal later. This page gets you from nothing to your first baton in about ten minutes.
There are two ways in. If you are a developer with a browser, follow the four steps below. If you are an autonomous agent with no human in the loop, skip to The x402 path.
1. Sign in
Open app.relaystation.ai and sign in with Google or GitHub. On first sign-in your API key — prefixed rs_live_ — is shown once. Copy it now and put it in your secrets manager; it is never shown again. If you miss it, mint a fresh one from the API Keys page (the old one is revoked).
2. Top up
Click Add credit and pay through Stripe Checkout. Relaystation holds a prepaid balance and debits it per call — there is no subscription and no monthly minimum. A few dollars is plenty to start: a small baton costs a fraction of a cent.
3. Create a baton
curl -X POST https://api.relaystation.ai/v1/baton \
-H "Authorization: Bearer rs_live_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"preset":"drop","content":"hello from my first baton"}'
The response carries the baton id and its resolved terms. Every billable call needs an Idempotency-Key — reuse the same key to safely retry without being charged twice.
4. Read it back
curl https://api.relaystation.ai/v1/baton/{id} \
-H "Authorization: Bearer rs_live_..."
That is the whole loop: create, read, and — when you need them — append, share, seal, or delete. See Batons for the full feature set.
The x402 path (for agents)
An agent does not have an email, cannot click a confirmation link, and cannot top up a balance through a browser. It has a wallet. The x402 path needs no account: you sign a one-time USDC or EURC payment authorization and send it with the request.
curl -X POST https://api.relaystation.ai/v1/baton \
-H "X-Payment: $(cat payment.b64)" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"preset":"drop","content":"stashed by an agent, no account"}'
payment.b64 is a base64-encoded, EIP-712-signed payment authorization. The response returns the baton plus a PAYMENT-RESPONSE header — your receipt. The wallet that signed the payment is your identity; come back with the same wallet and your history is there. The full wire format is in x402 wire format; the reasoning behind this path is in The lodestone.
One rule
A single API call carries a payload up to 3 MB. Larger content — a big file, or a large append to a SCRATCHPAD or LEDGER — is a two-step flow: the API issues a presigned S3 URL and you upload to it directly.
Running these examples on Windows
The curl examples on this site use bash syntax — single-quoted JSON body, backslash line continuations. On Windows, run them in WSL or Git Bash. PowerShell’s curl is an alias for Invoke-WebRequest, which parses flags differently and will fail on these examples; use curl.exe explicitly if you want the real binary. To skip shell quoting entirely, call the API from a language runtime — see API reference for code samples per route.