Connect any website, app or AI agent to AXTO — live
One realtime layer for everything you build around AXTO: publish events from your backend and see them in every browser within a second, stream AI answers from your own model keys, place peer-to-peer calls, and give AI agents direct tools — over the transport that fits each client.
Every way to connect
| Transport | Best for | Endpoint |
|---|---|---|
| REST (HTTPS + JSON) | Publish and list events, run AI, mint tokens | POST /api/v1/events |
| Server-Sent Events | Live feeds in the browser; auto-reconnect and resume with Last-Event-ID | GET /api/v1/events/stream |
| WebSocket | Two-way apps: chat, collaboration, dashboards | GET /api/v1/ws |
| Long polling | Networks that block streaming; answers the moment an event arrives | GET /api/v1/events/poll |
| HTTP/2 & HTTP/3 streaming | AI answers token by token as NDJSON or SSE | POST /api/v1/ai/run |
| Connect protocol (gRPC-compatible) | Typed clients from a .proto: connect-es, connect-go, Swift, Kotlin | POST /api/v1/connect/… |
| WebRTC | Peer-to-peer audio, video and data; AXTO signals and provides STUN / TURN | POST /api/v1/rtc/rooms |
| Webhooks | Your server reacts to events; HMAC-SHA256 signed, retried for 24 h | Developers → Webhooks |
| MCP (Model Context Protocol) | AI agents — Claude Desktop, Cursor, VS Code — use AXTO tools | POST /api/v1/mcp |
What we do not claim
- WebTransport is not offered: Cloudflare's edge, where AXTO runs, does not support it yet. The SDK falls back to WebSocket, then Server-Sent Events, then long polling.
- Native gRPC needs HTTP/2 trailers that an edge runtime cannot send, so AXTO speaks the Connect protocol — gRPC-compatible, generated from the same .proto — instead.
- WebRTC media flows directly between devices. On very strict networks a TURN relay is needed; it is available when the operator has configured one.
Quick start
# Publish from your server
curl -X POST https://axto.io/api/v1/events \
-H "Authorization: Bearer $AXTO_KEY" -H "Content-Type: application/json" \
-d '{"channel":"orders","type":"order.paid","data":{"id":42}}'
// Receive in the browser (token minted by your server with POST /api/v1/tokens)
import { AxtoConnect } from "https://axto.io/sdk/axto-connect.js";
new AxtoConnect({ token }).subscribe(["orders*"], (event) => render(event));
# Stream an AI answer on your own model key (NDJSON over HTTP/2)
curl -N https://axto.io/api/v1/ai/run -H "Authorization: Bearer $AXTO_KEY" \
-H "Accept: application/x-ndjson" -H "Content-Type: application/json" -d '{"prompt":"Hello"}'Security by design
Keys stored as fingerprints
A key is shown once; AXTO keeps only its SHA-256 digest. Revoke it and it stops at once.
Scopes and allowed origins
Each key can run AI, read or publish events, open WebRTC rooms and call MCP tools — only what you tick. Browser calls work only from origins you list.
Short-lived stream tokens
Mint on your server, hand to the browser: channel-scoped, expiring, and never your secret key in a URL.
Encrypted events, short retention
Event payloads are encrypted with your account's key and deleted after the retention period (7 days by default).
Signed webhooks, no SSRF
HTTPS public hosts only, no redirects followed, HMAC-SHA256 signature with a timestamp.
Your AI, your keys
AI calls run on the model keys you saved in AXTO; AXTO relays them and stores nothing.
Included in every paid plan
| Plan | API keys | Requests / min | Webhooks |
|---|---|---|---|
| Starter | 2 | 60 | 1 |
| Pro | 5 | 300 | 5 |
| Business | 20 | 1,200 | 20 |
| Enterprise | 100 | 6,000 | 50 |
Questions
Which transport should I use?
Browsers: Server-Sent Events for feeds, WebSocket when the page also sends. Servers: REST to publish, webhooks to react. Unreliable networks: long polling. AI answers: NDJSON streaming. Typed services: the Connect protocol. The SDK picks WebSocket → SSE → long polling for you.
Can a browser use my API key?
No — keep the secret key on your server. Your server mints a short-lived stream token (POST /api/v1/tokens) for the channels the page needs, and the browser uses that.
Do I miss events if the connection drops?
No. Every event has an increasing id; SSE resumes with Last-Event-ID, WebSocket and long polling with the last cursor, within the retention period.
Is it gRPC?
It is the Connect protocol, which is gRPC-compatible and generated from the same .proto (download it at /api/v1/axto.proto). Native gRPC over HTTP/2 trailers is not possible on an edge runtime.
How do AI agents connect?
Add https://axto.io/api/v1/mcp as a remote MCP server with your API key. Agents get tools for your AI, legal deadlines, citations, redlines, privacy scans, the prompt library and realtime events.
What does it cost?
The developer API is included in every paid plan; the plan sets the number of keys, requests per minute and webhooks. AI usage runs on your own keys.