Hosted form of the railgate product (TextForAgents LLC). One declarative payment policy per enrolled agent; your own gate/signer calls the decide endpoint at its signing hook and receives an ALLOW or REFUSE verdict from the rail-agnostic policy core (budgets, counterparty allowlists, velocity, intent binding, replay protection), with the rail oracle's decide-time quote (fee, expected finality, replay-window exposure) for the chosen rail (EVM/x402 or XRPL shapes). The service never signs, never holds a key, and never custodies or moves funds — settlement runs through your own signer on the chosen rail.
$2 per agent / month flat — no percentage of payment volume, ever. Rail fees pass-through at cost, never marked up. One-time trial: the first month for the first 10 agents is free, once per operator account (canonical-identity enforced: re-registering under a variant name or wallet spelling does not re-grant). The railgate adapter package is a free downloadable artifact.
POST /register with {"account_name": "...", "payer_wallet": "0x..."} returns {account_id, api_key} — the api_key is shown once; store it. Every operator-scoped route takes Authorization: Bearer <api_key>. Credentials are per-operator and revocable (support@textforagents.com). Records are per-operator: another operator's policy or account reads return 404, never the record.
GET /health — unauthenticated; service status, pay-to, price.POST /subscribe — body {"agent_count": N}. Trial-covered agents (first subscribe, up to 10) activate at $0 with no payment demanded. Otherwise, without payment it returns a 402 x402 challenge naming exactly 2000000 x billable_agents atomic USDC (Base) to the pay-to in /.well-known/x402; re-send with a verified X-PAYMENT header to activate/extend the 30-day term. A replayed payment (spent nonce) is refused; a bogus payment is rejected; neither activates or extends a subscription.POST /policy — body {"agent_id": "...", "policy": {...}}; the policy is the P4 gate library's declarative JSON schema (per_call_cap_atomic, session_budget_atomic, daily_budget_atomic, per_counterparty_cap_atomic, allowed_networks, allowed_assets, counterparty_allowlist, max_payments_per_window, window_seconds, replay_window_seconds, intent_required, asset_decimals). Invalid policies are rejected 422, fail-closed.GET /policy/{agent_id} — read back your stored policy.POST /decide — body {"agent_id": "...", "rail": "evm-x402"|"xrpl-testnet", "amount_atomic": N, "pay_to": "...", "resource_url": "...", "intent": "optional declared purpose"}. Returns {"verdict": "ALLOW"|"REFUSE", ...}; a REFUSE carries the structured refusal enum (code, detail, suggested_action: do_not_retry / escalate_to_operator / degrade_or_skip / retry_after_window / declare_intent_and_retry). A REFUSE is final for that declaration. An ALLOW commits the policy's budget reservation; no settlement is performed by this service.POST /sync — body {"declarations": [{"declaration_id": "...", "hash": "..."}]}. IDs and hashes ONLY — requests carrying keys, seed material, or intent contents are rejected 400.GET /account — enrolled agents, trial-grant state, current subscription period, billed agent count, your payments.GET /docs, GET /openapi.json, GET /terms, GET /privacy, GET /llms.txt, GET /.well-known/x402, GET /monitoring.json, GET /cost-watch.json — public surfaces, no auth.curl -X POST $BASE/register -d '{"account_name":"my-fleet","payer_wallet":"0xYourWallet"}'
curl -X POST $BASE/subscribe -H "Authorization: Bearer $KEY" -d '{"agent_count": 3}' # trial: activates free
curl -X POST $BASE/policy -H "Authorization: Bearer $KEY" -d '{"agent_id":"agent-1","policy":{...}}'
curl -X POST $BASE/decide -H "Authorization: Bearer $KEY" -d '{"agent_id":"agent-1","rail":"evm-x402","amount_atomic":100000,"pay_to":"0x1111...","resource_url":"https://api.example.test/weather","intent":"buy weather data"}'
Support: support@textforagents.com