# Relaystation Pay-per-call API platform for AI agents and developers. Prepaid; no monthly fees, no subscription. ## Baton — the live product A baton is a prepaid storage object configured along five independent groups. Pick the values that fit your use, pay once at create, draw down the prepaid quotas until expiry. - Write behavior — single object, append, append hash-chained (tamper-evident, auto-witnessed), or overwrite. - Capacity — size (storage), duration (validity), egress (read budget). A single write over 3 MB uploads via a presigned URL the create returns. - Sharing — collaborator tokens (up to 100 per baton; each carries a read/write/read_write scope, optional read cap, optional expiry). - Lifecycle — burn-after-reading (delete once every token read cap is consumed) and disposal (soft delete with grace, or hard delete). - Trust — document-witness: Relaystation signs the content hash and keeps the signed record 7 years; verify offline against the published key. Five named preconfigs are fast-start prefills (not the organizing principle — every value stays configurable on create): - Drop — store a file (single object, multi-read until expiry). - Pass — share a file (single object + a read-capped token; burns once consumed). - Scratchpad — collaborate (append log + collaborator tokens). - Checkpoint — save state (overwrite; replace the snapshot as you go). - Ledger — audited ledger (append, hash-chained; tamper-evident; auto-witnessed). One engine-computed quote is the published price — the engine quote of the shape, frozen at create. No catalog prices, no tiers as priced SKUs. x402 settles via a $0.01 on-chain chunk drawn down off-chain across sub-cent calls (the sawtooth) — you are charged exactly the sum of your call prices; the $0.001 network-minimum is the chunk gas floor, not a per-call charge. ## Discovery — start here GET /v1/baton/system/info — agent-facing system descriptor (the five-group model, preconfigs, payment modes, merchant wallet, endpoint roster). GET /v1/baton/prices — the named preconfigs and their default shapes (fast-start prefills). POST /v1/baton/quote — public price-of-record for any baton shape (a preconfig ref or a custom shape). GET /llms-full.txt — long-form spec with every endpoint, the x402 wire, the trust model. GET /openapi.json — OpenAPI 3.1. GET /.well-known/ai-catalog.json — ARD (Agentic Resource Discovery) manifest: this host's AI-facing resources (MCP server, REST API, llms.txt, recipe pages) in one machine-readable catalog. ## The lodestone path (no account) POST /v1/baton with X-Payment header (base64 EIP-3009 USDC or EURC signature, x402 v2) — one HTTPS call carries payload + payment; the wallet IS the identity; no signup needed. ## Baton endpoints (summary; /llms-full.txt has the full set) POST /v1/baton — create. Billable. GET /v1/baton/{id} — read (owner) or /v1/baton/{tokenId} (token-addressed). POST /v1/baton/{id} — write/append. GET /v1/baton/{id}/entries — paginated entries. POST /v1/baton/{id}/add — buy another tier of the same preset. POST /v1/baton/{id}/extend — buy à-la-carte dimensions. DELETE /v1/baton/{id} — soft-delete + scheduled purge. GET/POST /v1/baton/{id}/meta — read or mutate metadata. POST /v1/baton/{id}/tokens — mint a collaborator token. POST /v1/baton/{id}/trust/document-witness — freeze + sign. POST /v1/baton/{id}/trust/verify-chain — verify chained-hash integrity. POST /v1/baton/{id}/trust/challenge — public, free; match a candidate to a witnessed baton. GET /v1/baton/{id}/trust/proof — public, free; retrieve the signed attestation. ## Documents & signatures E-sign (esigndoc) — send a document for signature, place signature/approval boxes, route to multiple signers and approvers in a set order, reuse a contract template, chase unsigned recipients, retrieve the signed copy. POST /v1/esigndoc/envelopes; from-template, send, status, signed-document; templates under /v1/esigndoc/templates. Verify a signed PDF's signatures: POST /v1/pdf/verify-signatures. Billed per sent envelope. Docs: https://relaystation.ai/docs/esigndoc ## Identity & compliance ID verification (idverify) — verify a government ID (passport / driver's license / national ID), run a liveness check, match a face to the ID photo, optional AML/PEP screening. Government-ID documents only, not arbitrary credentials. POST /v1/idverify/verifications returns a hostedUrl; outcome via GET …/status or webhook. Billed per verification. Docs: https://relaystation.ai/docs/idverify Screening (screening) — screen a name against sanctions (OFAC / EU / UK; UN rides along) and Wikidata-derived PEP lists. POST /v1/screening/match with lists:[sanctions,pep] (default both). PEP coverage has known named gaps — not a substitute for a commercial AML provider. Free sources; attribution in every response. ## Language & AI tasks LLM task-router (llm) — translate, summarize, extract to JSON, classify, proofread, rewrite, and more. Task-based (never model-based), cost-plus. POST /v1/llm/{task} with { tier: budget|value|best, input, params? }; you authorize the published per-increment ceiling and pay the actual provider cost + a small markup. The model behind each tier is named + dated on the disclosure page. GET /v1/llm/tasks is the FREE live catalog — the source of truth (admin-managed registry rows, so it changes without a redeploy). ## Agreements & arbitration Agent contracts (contracts) — create a binding agreement (terms + parties), sign it, check whether all parties have signed, and open a dispute for a transparent AI ruling. POST /v1/contracts, POST /v1/contracts/{id}/sign, GET /v1/contracts/{id}, POST /v1/contracts/{id}/arbitrate. No escrow, no money held or moved; NOT legally binding, not court-enforceable — goodwill-honored. Offline-verifiable via GET /v1/contracts/disclosure. ## Retrieval — vector search + RAG Vector baton (preset `vector`) — a prepaid similarity-search index, priced and disposed like any baton. Create with POST /v1/baton { preset: "vector" } (dims + metric frozen at create); write vectors with POST /v1/baton/{id}/vectors (metered per batch); nearest-neighbor search with POST /v1/baton/{id}/vectors/query (a raw-text query is embedded for you). One-call grounded answers: POST /v1/rag/answer embeds your question, retrieves the top-k chunks from a vector baton, and answers from ONLY those chunks with source ids (settle-at-actual). Standalone embeddings: POST /v1/llm/embed (Titan v2, metered per started 10 KB). Docs: https://relaystation.ai/docs/rag ## Async jobs Long-running ops return a ticket instead of blocking. POST /v1/doc/analyze-async (multi-page PDF analysis, the first consumer) starts a job; poll GET /v1/jobs/{id} (submitted / running / succeeded / failed / expired) or subscribe to the job.completed webhook for the result. Billing: the x402 rail settles the counted ceiling at submit; a prepaid-balance call holds at submit and captures the actual at completion; a failed job is made whole. Docs: https://relaystation.ai/docs/async-jobs ## Bundles — one-call recipes Curated multi-step workflows collapsed into one route, one payment (bills the sum of steps). POST /v1/bundles/rag-ingest (chunk → embed → vector-write into a vector baton; creates one if absent), POST /v1/bundles/rag-query (vector query → optional grounded answer), POST /v1/bundles/ingest-document (scanned document → searchable PDF + extracted tables as xlsx → durable drop URLs). Full worked recipes with copyable agent prompts: https://relaystation.ai/recipes/agent-rag-memory, /recipes/storage-handoff, /recipes/document-chores, /recipes/kyc-then-sign. ## Compute tools (cputools) — the on-platform compute toolbox 143 pay-per-call file/data ops across 21 categories. Inline (≤4 MiB base64), free 24h scratch (chain outputKey→inputKey), or a durable baton as input/output. No account needed (x402 per call). - pdf (21): pdf/attachments, pdf/bookmarks, pdf/compress, pdf/diff, pdf/encrypt, pdf/extract-text, pdf/form, pdf/from-html, pdf/from-office, pdf/images, pdf/merge, pdf/metadata, pdf/ocr, pdf/ocr-searchable, pdf/pages, pdf/render, pdf/repair, pdf/rotate, pdf/split, pdf/verify-signatures, pdf/watermark - image (18): image/adjust, image/blur, image/composite, image/compress, image/contact-sheet, image/convert, image/crop, image/dominant-color, image/exif-strip, image/extend, image/from-html, image/grayscale, image/metadata, image/ocr, image/resize, image/rotate, image/sharpen, image/trim - media (19): media/audio-convert, media/audio-extract, media/audio-mix, media/concat, media/convert, media/frames, media/gif, media/loudnorm, media/metadata, media/overlay, media/probe, media/silence, media/speed, media/storyboard, media/subtitle-burn, media/subtitle-extract, media/thumbnail, media/trim, media/waveform - doc (9): doc/analyze-async, doc/ask-document, doc/convert, doc/extract-form, doc/extract-tables, doc/formats, doc/ocr-layout, doc/parse-id, doc/parse-invoice - office (2): office/formats, office/rescue - qr (1): qr - barcode (1): barcode - codes (2): codes/color-convert, codes/qr-decode - csv (3): csv/convert, csv/dedupe, csv/select - data (22): data/cast, data/derive, data/diff, data/dropna, data/explode, data/fillna, data/filter, data/from-xlsx, data/groupby, data/join, data/pivot, data/profile, data/rename, data/sample, data/schema-infer, data/slice, data/sort, data/sql, data/sql-large, data/to-xlsx, data/union, data/validate - pipeline (1): pipeline - text (11): text/apply-patch, text/case, text/count, text/diff, text/html-to-text, text/markdown-to-html, text/merge3, text/regex-extract, text/sanitize-html, text/slugify, text/template - utils (6): utils/base64, utils/hash, utils/hmac, utils/jwt-decode, utils/jwt-verify, utils/uuid - archive (1): archive/zip - generate (8): generate/chart, generate/favicon, generate/identicon, generate/invoice, generate/mock-data, generate/og-image, generate/placeholder, generate/qr-logo - location (4): location/geocode, location/place-search, location/reverse-geocode, location/route - vision (6): vision/compare-faces, vision/detect-celebrities, vision/detect-faces, vision/detect-labels, vision/detect-ppe, vision/moderate - llm (1): llm/embed - rag (1): rag/answer - web (3): web/pdf, web/readability, web/screenshot - bundles (3): bundles/ingest-document, bundles/rag-ingest, bundles/rag-query Full op reference with per-op descriptions: GET /llms-full.txt. Every op + schema: GET /openapi.json. As MCP tools: GET /mcp/full. ## Auth - x402 EIP-3009 USDC or EURC payment in `X-Payment` header (lodestone — no account). - API key in `Authorization: Bearer rs_live_...` (signup at app.relaystation.ai). - Wallet JWT (challenge + verify at /v1/auth/challenge + /v1/auth/verify). - MCP OAuth 2.1 — add /mcp as a connector in your client and approve in the browser once; the agent then spends your prepaid balance headlessly (revoke anytime at app.relaystation.ai → Connected agents). ## MCP — one endpoint Connect at https://api.relaystation.ai/mcp — a single MCP server for everything (storage, utilities, agent↔human/agent messaging), one balance, one login. To connect: add the URL as a connector and approve in your browser (OAuth 2.1 — Google / GitHub / Wallet; a wallet connects instantly and pays per call), or paste it with your rs_live_* key as a `?key=` API-key fallback. It is a SEARCH-FIRST surface: a small hot set is listed directly; use search_tools to find any tool, describe_tool for its schema, and call_tool to run a safe/billable one (consequential tools are named-only — call them directly so your client can confirm). The complete enumerated roster is at https://api.relaystation.ai/mcp/full. GET /.well-known/mcp.json — MCP advertisement. ## Docs https://relaystation.ai/api-reference