Roundhouse Account API
What the credential in front of a request is entitled to, what it has left, and what each route costs on each of the two paid lanes.
What the credential in front of a request is entitled to, what it has left, and what each route costs on each of the two paid lanes.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/roundhouseai-io:roundhouseai-io-account-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Roundhouse read Account API
version: '0'
summary: The x402 settlement index and agent identity record, as JSON.
description: 'Public, read-only, and free to start — no key required. Roundhouse indexes x402
settlements and ERC-8004 identities into one queryable record.
Two conventions worth knowing before you build against it:
- **An empty array is an answer; a failure is not.** A refused query returns 503
`upstream_unavailable` naming the resource, never 200 with an empty list. On a
settlement index "no rows" would read as "nothing ever happened".
- **Aggregates are per-entity.** Every figure is one wallet''s or one pair''s own. Site-wide
totals are deliberately confined to the /stats page and are not served here.
Cursor-paginated lists carry `next_before`; pass it back as `?before=`. The leaderboard is
the exception and pages by `?offset=`.
Every endpoint here is also a Model Context Protocol tool at `POST /v0/mcp`, gated by the
same API key. See https://roundhouseai.io/docs/api/mcp.'
license:
name: Roundhouse terms
url: https://roundhouseai.io/terms
contact:
name: Roundhouse
url: https://roundhouseai.io/docs/api
servers:
- url: https://api.roundhouseai.io/v0
description: Canonical base URL. The API worker on its own host, isolated from the dashboard.
- url: https://roundhouseai.io/api/v0
description: The same API through the dashboard origin. Same responses, one more hop; needs no CORS from a browser on that origin.
tags:
- name: Account
description: What the credential in front of a request is entitled to, what it has left, and what each route costs on each of the two paid lanes.
paths:
/account:
get:
operationId: getAccount
summary: What this caller is entitled to, and what it would be charged
description: 'Who the credential in front of this request resolves to, which of the two paid lanes it would take, what it has left to spend, and the price of every route on both lanes. Unmetered and answerable WITHOUT a key: checking your balance must never cost a unit and must never be the thing that fails. A caller with no key gets a real answer (`tier: anonymous`, `lane: x402`, the full price list), not a 401, so both prices can be compared before committing to either. An unrecognised key also answers 200, with `key_recognised: false` — this is the endpoint you reach for when your key is the thing that is broken, so it must work then.'
tags:
- Account
responses:
'200':
description: Success.
content:
application/json:
schema:
type: object
properties:
authenticated:
description: Whether a credential was accepted.
key_present:
description: Whether a credential was sent at all.
key_recognised:
description: Whether it resolved, or NULL when none was sent — three-valued, because "no key" and "a key that did not resolve" need different fixes and one `false` for both would conflate them.
tier:
description: '`anonymous`, `trial`, `oauth`, or the organization key tier.'
plan:
description: The organization's plan key, or null when there is no organization.
lane:
description: 'Which lane this caller would take on a metered route, so it can be PREDICTED rather than discovered by being refused: `credit` draws down Query Units, `x402` pays per call, `invalid_key` resolves to nothing, `no_account` is a caller with no organisation behind it on the MCP surface, where there is no x402 door, and `upgrade_required` is that same surface reached by a caller that HAS an organisation whose plan excludes the route. The last two were one value until a signed-in connection with an organisation and a balance was told it had no account behind it.'
organisation:
description: Id and display name, or null. Named so an operator with several accounts knows which one to top up.
balance:
description: Units available and the low-balance threshold, or NULL with a `balance_note` saying why there is no balance to report — an organizationless caller has none, which is not the same as having zero. `low_balance` is already computed here so a client does not have to know the threshold to apply it.
metered_routes:
description: 'Every route with what one call costs on each lane: `qu` on the credit lane, `x402_usd` on the payment lane. Routes that cost nothing are listed AT ZERO rather than omitted, because a caller cannot tell "free" from "not thought about" by absence. `runSql`''s `qu` is its MINIMUM — a query is priced by the time it takes, and `sql_tiers` gives the ceilings.'
balance_note:
description: 'Present only when `balance` is null, saying WHICH kind of nothing it is: no credential, one that did not resolve, a trial key that holds no balance by design, or an organization row that could not be read. A null balance is never a zero.'
sql_tiers:
description: 'What one `run_sql` call may cost, which is no longer one number: a query is priced by the time it takes, at one Query Unit per started five seconds with a floor of one. Each tier gives its `timeout_seconds`, its `max_qu` (what is HELD for the call and the most it can cost), its own rate limit, and two separate booleans — `allowed` is whether this caller''s plan may buy it, `available` is whether this deployment can serve it at all. They are separate because "upgrade your plan" and "report a misconfiguration" are different things to go and do, and `note` says which applies.'
top_up_url:
description: Org-scoped deep link to the top-up page, or the plans page for a caller with no organization.
as_of:
description: When this answer was assembled.
summary:
description: One sentence saying what this lane means, for a human reading it in an agent transcript.
'503':
description: '`upstream_unavailable` — the underlying query was refused. An empty array is a real answer; this is not one.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- {}
- bearerAuth: []
- apiKeyHeader: []
components:
schemas:
Error:
type: object
description: Errors never echo the query or PostgREST's `details`/`hint`, both of which would leak the statement and its filter values.
properties:
error:
type: string
description: Stable machine-readable code.
detail:
type: string
description: Human-readable explanation. May be absent.
required:
- error
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: An `rh_live_…` key as a bearer token. Optional — raises rate limits.
apiKeyHeader:
type: apiKey
in: header
name: x-api-key
description: The same key, as a header. Equivalent to the bearer form.