API Reference Endpoints
Balance and usage
Read the prepaid balance, usage by meter, the request log, the account event ledger, the public price list and the top-up status.
These endpoints read the money side of an account: the prepaid balance, what was spent and on which meter, which requests were made, and the event ledger of every tunnel. Balance and usage need a key with the billing:r scope (root keys and tunnel keys have it by default); the request log accepts any key, and the account ledger needs the root key. The price list and the top-up status are public and take no key. Top-ups themselves happen in the panel at mot3r.com/panel. Money is integer micro-USD (1 USD = 1 000 000). Error responses use the envelope described in Errors.
#Retrieve the balance
GET /v1/balance
Returns the available and held balance of the account the key belongs to, with a runway estimate based on the last 7 days of spend.
Authentication: any key with the billing:r scope: the root key or a tunnel key. Test keys and observation keys do not carry this scope and get 403 scope_missing.
Parameters
This endpoint takes no parameters.
Request
curl -sS https://api.mot3r.com/v1/balance \
-H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx"Response 200
{
"ok": true,
"status": 200,
"available_micros": 18420000,
"held_micros": 3000,
"runway_days": 46,
"measured_at": "2026-10-16T15:40:00.000Z"
}| Name | Type | Description |
|---|---|---|
available_micros | integer | Spendable balance in micro-USD. |
held_micros | integer | Amount reserved by calls that are still running (for example an SMS in flight). |
runway_days | integer or null | Whole days the available balance lasts at the average daily spend of the last 7 days; null when there was no spend in that window. |
Error 403
{"error":{"status":403,"reason":"scope_missing","message":"This key does not have the required scope.","scope":"billing:r"}}#Starting credit
A new account starts with a credit of 1 USD (1 000 000 micro-USD), valid for 90 days from sign-up. It counts in available_micros and is enough for about 10 000 tool calls at 100 micro-USD each, so the first agent connects without a top-up. The sign-up screen and the Billing screen of the panel show it as part of the balance.
- The part you have not spent when the 90 days end expires. The account ledger records it as an
expiryentry, and the balance drops by that amount. - An account that has topped up keeps its balance: the credit is counted as spent first, and the money you paid never expires.
- The credit is given once per person. Extra addresses of the same mailbox (for example
name+shop@example.com) open an account without credit. - Starting credit never counts as a payment: the account stays on the test level until the first top-up.
#Retrieve usage
GET /v1/usage
Returns spend for a date range, grouped by meter, key, tunnel or day. Usage comes from a rollup that is at most 5 minutes behind.
Authentication: any key with the billing:r scope: the root key or a tunnel key. A tunnel key sees the usage of the whole account it belongs to.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
from | query | date | yes | First day of the range, YYYY-MM-DD (UTC). Missing or malformed: 400 bad_from. |
to | query | date | yes | Last day of the range, inclusive, YYYY-MM-DD (UTC). Missing or malformed: 400 bad_to. |
group_by | query | string | no | meter (default), key, line or day. |
to must not be earlier than from, and the range may span at most 400 days.
Request
curl -sS "https://api.mot3r.com/v1/usage?from=2026-10-01&to=2026-10-16&group_by=meter" \
-H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx"Response 200
{
"ok": true,
"status": 200,
"group_by": "meter",
"rows": [
{ "grp": "mail.recipient", "quantity": 42, "amount_micros": 42000, "events": 40 },
{ "grp": "mcp.tool_call", "quantity": 3810, "amount_micros": 381000, "events": 3810 },
{ "grp": "sms_byoc.message", "quantity": 12, "amount_micros": 12000, "events": 12 }
],
"measured_at": "2026-10-16T15:40:00.000Z"
}| Name | Type | Description |
|---|---|---|
group_by | string | The grouping that was applied. |
rows[].grp | string | The group value: a meter id, a key id, a tunnel id or a day (YYYY-MM-DD), depending on group_by. |
rows[].quantity | number | Units consumed on the meter (calls, recipients, characters, messages). |
rows[].amount_micros | integer | Amount charged in micro-USD. |
rows[].events | integer | Number of billed events. |
Error 400
{"error":{"status":400,"reason":"bad_usage_query","message":"Bad usage query."}}#List request logs
GET /v1/logs
Returns the requests made by the account over the last 30 days, newest first: which key and tunnel called which tool, the HTTP status, the duration and the amount charged.
Authentication: any key. The root key sees every tunnel and can filter with line; a tunnel key sees only the requests of its own tunnel, whatever line says.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | no | Number of rows, 1 to 500. Default 100. |
line | query | string | no | Tunnel id (uuid) or handle. Unknown tunnel: 404 line_not_found. |
Request
curl -sS "https://api.mot3r.com/v1/logs?limit=2&line=support" \
-H "Authorization: Bearer mot_lk_live_xxxxxxxxxxxx"Response 200
{
"rows": [
{
"at": "2026-10-16T15:38:12.204Z",
"id": 918274,
"key_prefix": "mot_lk_live_a1b2c3",
"line": "support",
"surface": "mcp",
"tool": "line_send",
"status": 200,
"reason": null,
"duration_ms": 412,
"amount_micros": 1100,
"request_id": "8d0c6f1e-2b3a-4c5d-9e6f-7a8b9c0d1e2f",
"client": "claude-code",
"country": "DE"
},
{
"at": "2026-10-16T15:37:55.019Z",
"id": 918266,
"key_prefix": "mot_lk_live_a1b2c3",
"line": "support",
"surface": "rest",
"tool": "sms_send",
"status": 403,
"reason": "byoc_destination_not_allowed",
"duration_ms": 38,
"amount_micros": 0,
"request_id": "order-1042-sms",
"client": "curl/8.7.1",
"country": null
}
],
"next_cursor": null,
"measured_at": "2026-10-16T15:40:00.000Z"
}| Name | Type | Description |
|---|---|---|
surface | string | Where the request arrived: mcp, rest or sse. |
tool | string or null | MCP tool or REST action name. |
status | integer | HTTP status returned to the caller. |
reason | string or null | Error reason when the request failed. |
amount_micros | integer | Amount charged for this request. |
client | string or null | Client name reported by the caller. |
next_cursor | null | Always null when called with a key; use limit to size the page. |
Add ?format=csv to receive the rows as CSV.
Error 404
{"error":{"status":404,"reason":"line_not_found","message":"No such line in this account."}}#List the account ledger
GET /v1/account/ledger
Returns the event ledger of every tunnel in the account, newest first: tool calls, MCP sessions opening, renames, key creation and other recorded events, with who did it and from where. Entries are never deleted. This is an activity record, not a money ledger.
Authentication: root key only. A tunnel key gets 403 key_kind_not_allowed. The root key sees the client IP address of each entry.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
before | query | string | no | Return entries older than this entry id. Pass the next value of the previous page. |
limit | query | integer | no | Entries per page, 1 to 200. Default 50. |
Request
curl -sS "https://api.mot3r.com/v1/account/ledger?limit=2" \
-H "Authorization: Bearer $MOT_ROOT_KEY"Response 200
{
"line_id": null,
"items": [
{
"id": "48211",
"at": "2026-10-16T15:38:12.611Z",
"actor_kind": "agent",
"actor_name": "claude-code",
"line_id": "7c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"event": "tool.call",
"tool": "line_send",
"ip": "203.0.113.24",
"detail": { "status": 200, "reason": null, "request_id": "8d0c6f1e-2b3a-4c5d-9e6f-7a8b9c0d1e2f", "duration_ms": 412 }
},
{
"id": "48207",
"at": "2026-10-16T15:30:02.118Z",
"actor_kind": "agent",
"actor_name": "claude-code",
"line_id": "7c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"event": "port.initialize",
"tool": null,
"ip": "203.0.113.24",
"detail": { "client_name": "claude-code", "client_version": "2.1.0" }
}
],
"next": "48207",
"ip_visible": true,
"measured_at": "2026-10-16T15:40:00.000Z"
}| Name | Type | Description |
|---|---|---|
items[].id | string | Entry id. Use it as before to page back. |
items[].actor_kind | string | agent, czlowiek (a person, for example in the panel) or system. |
items[].event | string | Event name in subject.action form, for example tool.call, port.initialize, line.rename, key.created. |
items[].ip | string or null | Client address; null when the caller may not see addresses or the event had none. |
items[].detail | object | Event-specific fields. |
next | string or null | Cursor for the next page; null when this page is the last one. |
ip_visible | boolean | Whether addresses are shown to this caller. |
Error 403
{"error":{"status":403,"reason":"key_kind_not_allowed","message":"This kind of key cannot do this. Use a tunnel key or the account root key."}}#Retrieve the price list
GET /v1/pricing
Returns the public price list: every billable meter with its unit price, the display price and how many units 10 USD buys. Billing is prepaid; there are no plans. The response is cacheable for 5 minutes and can be called from a browser on any origin.
Authentication: none.
Parameters
This endpoint takes no parameters.
Request
curl -sS https://api.mot3r.com/v1/pricingResponse 200 (trimmed to three items)
{
"currency": "USD",
"billing": "prepaid",
"plans": false,
"min_topup_usd": 10,
"rounding": "Each call is rounded up to the next micro-dollar (0.000001 USD).",
"items": [
{
"meter_id": "mcp.tool_call",
"family": "mcp",
"label": "MCP tool call",
"unit": "call",
"note": "Every tools/call, reads included",
"sort": 10,
"state": "live",
"unit_price_micros": 100,
"per_units": 1,
"meter_unit": "call",
"display_per": 1,
"display_price_micros": 100,
"units_per_10_usd": 100000,
"verified_at": "2026-09-28T23:45:00+00:00",
"effective_from": "2026-09-29T07:45:43.377162+00:00",
"version": 1,
"cost_checked_at": null,
"cost_source": "estimate"
},
{
"meter_id": "mail.recipient",
"family": "mail",
"label": "Mail",
"unit": "recipient",
"note": "Plus one MCP call per send",
"sort": 30,
"state": "live",
"unit_price_micros": 1000,
"per_units": 1,
"meter_unit": "recipient",
"display_per": 1,
"display_price_micros": 1000,
"units_per_10_usd": 10000,
"verified_at": "2026-09-28T23:45:00+00:00",
"effective_from": "2026-09-29T07:45:43.377162+00:00",
"version": 1,
"cost_checked_at": "2026-10-16T02:30:03.656721+00:00",
"cost_source": "provider_price"
},
{
"meter_id": "mrag.ingest_char",
"family": "mrag",
"label": "Memory: ingest",
"unit": "1M characters",
"note": null,
"sort": 40,
"state": "live",
"unit_price_micros": 20,
"per_units": 1000,
"meter_unit": "char",
"display_per": 1000000,
"display_price_micros": 20000,
"units_per_10_usd": 500,
"verified_at": "2026-09-28T23:45:00+00:00",
"effective_from": "2026-09-29T07:45:43.377162+00:00",
"version": 1,
"cost_checked_at": null,
"cost_source": "estimate"
}
],
"unmeasured": [],
"scheduled": [],
"measured_at": "2026-10-16T15:39:03.320514+00:00"
}| Name | Type | Description |
|---|---|---|
items[].meter_id | string | Meter that usage is billed on; the same id appears in GET /v1/usage. |
items[].state | string | live entries are billed; other entries are listed without billing. |
items[].unit_price_micros | integer | Price in micro-USD for per_units units of meter_unit. |
items[].display_price_micros | integer | Price in micro-USD for display_per units of meter_unit, matching the human-readable unit. |
items[].units_per_10_usd | number or null | How many display units 10 USD buys. |
items[].cost_source | string | provider_price, estimate or not_measured. |
unmeasured | array | Announced meters without a price; their price fields are null. |
scheduled | array | Price changes with an effective_from date in the future, with previous_display_price_micros and direction. |
Error 503
{"error":{"status":503,"reason":"unmeasured","message":"mot could not read this value. This is a failure on our side, not missing data."}}#Retrieve the top-up status
GET /v1/topup/status
Tells whether top-ups are open and which amounts can be bought. Use it before sending a user to the panel to top up.
Authentication: none.
Parameters
This endpoint takes no parameters.
Request
curl -sS https://api.mot3r.com/v1/topup/statusResponse 200
{
"enabled": true,
"amounts_usd": [10, 25, 50, 100],
"min_usd": 10,
"measured_at": "2026-10-16T15:39:03.864Z"
}When top-ups are closed the response is still 200, with enabled: false:
{
"enabled": false,
"reason": "topups_disabled",
"message": "Top-ups are closed right now. Test keys keep working without a top-up; try again later.",
"amounts_usd": [10, 25, 50, 100],
"min_usd": 10,
"measured_at": "2026-10-16T15:39:03.864Z"
}Error 503
{"error":{"status":503,"reason":"unmeasured","message":"mot could not read this value. This is a failure on our side, not missing data."}}