HTTP API
Accounts, logs and readings
6 routes your API key can call. Each says who may call it; every example assumes KEY is your API key. What only the dashboard does (signing in, making API keys, connecting accounts) isn't listed here: it's in the full OpenAPI spec.
/v1/workspaces/{wid}/usageThe workspace's usage over the last 7, 30 or 90 UTC days, today included
People and API keys
Hours and spend count only time inside the window, at each sandbox's fixed rate. Spend is rounded to the micro-dollar once per sandbox per day, and every total is the sum of those, so the figures add up. started and failovers count sandboxes created inside the window; running is right now. failovers is how many times a provider was unavailable and Annex moved on. daily has every day, oldest first.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
days? | Inquery | Type7 | 30 | 90 | About |
Answer · 200
usageUsagerequireddaysintegercurrency"USD"Of every
spend_microsin this reporttotalsobjectdailyobject[]providersobject[]regionsobject[]
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/usage' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/accountsOne page of the workspace's accounts (connections), each with its limits, use, spend, status and opt-ins
People and API keys
Accounts metrics (CLAUDE.md). Per connection: what Annex runs on it now; its limits, as the provider reports them where the person opted in (source provider) or Annex's own count against the planner's limit (source estimate); the person's own limits, what was detected, and what plans use (manual always wins); this calendar month's spend as Annex's estimate and, where the person opted in, as the provider billed it; the provider's public status; and which optional permissions the account granted. Provider answers are cached to each provider's cadence (AWS Cost Explorer once a day), so reading this often costs nothing more. API keys may read it.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
page? | Inquery | Typeinteger | AboutA missing or invalid page is 1 |
perPage? | Inquery | Typeinteger | AboutHeld between 1 and 100 |
Answer · 200
accountsAccount[]requiredidstringThe connection (
con_…)providerstringkind"sandbox" | "memory"labelstringstatusobjectThe provider's public status page, read every 5 minutes for every workspace
runningobjectWhat Annex itself runs on the account now
limitsobjectspendobjectopt_insobject[]notesstring[]What the person can do to see more
hostobject | nullYour own server only (null elsewhere): how it is doing, from Annex's latest reading, with no call to it
updated_atstring
metaMetarequiredpageintegertotalintegerItems matching, across all pages
pageCountintegerceil(total / perPage)
perPageinteger
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/accounts' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/accounts/{id}One account (a connection id, con_…); another workspace's is 404
People and API keys
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
id | Inpath | Typestring | About |
Answer · 200
accountAccountrequiredidstringThe connection (
con_…)providerstringkind"sandbox" | "memory"labelstringstatusobjectThe provider's public status page, read every 5 minutes for every workspace
runningobjectWhat Annex itself runs on the account now
limitsobjectspendobjectopt_insobject[]notesstring[]What the person can do to see more
hostobject | nullYour own server only (null elsewhere): how it is doing, from Annex's latest reading, with no call to it
updated_atstring
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/accounts/id' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/accounts/{id}/metricsYour own server's readings over time (CPU, memory, disk, network, sandboxes against its limit)
People and API keys
Annex reads a server about once a minute while it is connected (one Annex reaches over SSH only while sandboxes run on it) and keeps the readings 7 days. Any account that isn't your own server answers no points. API keys may read it.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
id | Inpath | Typestring | About |
since? | Inquery | Typestring | AboutRFC 3339, within the last 7 days (422 otherwise); the last hour if left out |
resolution? | Inquery | Type"raw" | "1m" | "5m" | "1h" | Aboutraw, or the last point in each step (422 otherwise) |
Answer · 200
metricsHostMetricsrequiredconnectionstringsincestringresolution"raw" | "1m" | "5m" | "1h"latestHostPoint | nullpointsHostPoint[]Oldest first
samplingstringWhen Annex reads the server
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/accounts/id/metrics' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/accounts/{id}/logsYour own server's log, newest first (what the Annex helper there did and saw, and its sandboxes' containers starting, ending and running out of memory)
People and API keys
Annex reads the helper's own events about once a minute while the server is connected (one Annex reaches over SSH only while sandboxes run on it) and keeps them 7 days, at most 5,000 lines a server a day (a line says how many more were dropped). Never the server's other logs. A line about a sandbox has its secret values hidden. Any account that isn't your own server answers no lines. API keys may read it.
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
id | Inpath | Typestring | About |
page? | Inquery | Typeinteger | AboutA missing or invalid page is 1 |
perPage? | Inquery | Typeinteger | AboutHeld between 1 and 100 |
since? | Inquery | Typestring | AboutRFC 3339, within the last 7 days (422 otherwise); all 7 days if left out |
level? | Inquery | Type"info" | "warning" | "error" | Aboutinfo: every line; warning: warnings and errors; error: errors only (422 otherwise) |
sandbox? | Inquery | Typestring | AboutOnly the lines about this sandbox |
Answer · 200
logsHostLog[]requiredatstringlevel"info" | "warning" | "error"idstringThe line's id from the server, stable, so a line seen live and the same line kept merge into one
source"helper" | "sandbox" | "container"helper: the Annex helper about itself; sandbox: the helper about one sandbox; container: Docker about a sandbox's container
sandboxstringThe sandbox the line is about; left out for the server itself
textstringPlain words, at most 4 KiB
metaMetarequiredpageintegertotalintegerItems matching, across all pages
pageCountintegerceil(total / perPage)
perPageinteger
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/accounts/id/logs' \
-H 'Authorization: Bearer anx_live_…'/v1/workspaces/{wid}/accounts/{id}/logs/streamYour own server's log as it happens, as Server-Sent Events (live tail)
People and API keys
One "log" event per line (data is a HostLog; its id resumes), as the Annex helper on the server notes it, filtered like …/logs. First come the lines Annex hasn't stored yet (it stores them about once a minute), so merge them with …/logs by the line's id. Reconnect with Last-Event-ID to get the stored lines after the last one you saw (up to 500), then the live ones again. Display only: what is kept is …/logs. A comment every 15 s keeps the stream open; a stream with no line for 30 minutes ends (reconnect to keep following). If the server is removed, one "gone" event says so and the stream closes. A server offline only pauses it. At most 10 live logs at once per workspace and 4 per person or API key (429). Errors before it opens are ordinary JSON. API keys may follow it; MCP has no stream (workspace_info accounts with logs reads the same by page).
| Parameter | In | Type | About |
|---|---|---|---|
wid | Inpath | Typestring | AboutWorkspace id |
id | Inpath | Typestring | About |
level? | Inquery | Type"info" | "warning" | "error" | AboutAs …/logs (422 otherwise) |
sandbox? | Inquery | Typestring | AboutOnly the lines about this sandbox |
Last-Event-ID? | Inheader | Typestring | About |
Answer · 200
id: …, event: log, data: {HostLog} … or event: gone, data: {message, code}
curl -X GET 'https://annex.eversonder.com/v1/workspaces/wsp_…/accounts/id/logs/stream' \
-H 'Authorization: Bearer anx_live_…'