Skip to content
Search documentation titles, headings, and guides
API v1Updated 2026-11-24

Reseller API

Complete REST reference for the reseller program: login, quota top-up, minting, customer management, and usage reporting.

The reseller API is a REST surface under /api/reseller. Every endpoint except login requires authentication: a reseller login token (Authorization: Bearer <jwt>, HS256, valid for 24 hours) or a persistent reseller API key (Authorization: Bearer zrr_<key_id>_<secret>, created in the dashboard). Keys authenticate every endpoint except the session-only ones; see Reseller API keys below.

Authentication endpoints#

POST/api/reseller/auth/login
Auth: public

Authenticate and obtain a reseller JWT. The token is HS256 and valid for 24 hours.

Parameters

emailstringbodyrequired

Registered reseller email.

passwordstringbodyrequired

Account password.

Request Example

curl -X POST "https://api.zrouter.dev/api/reseller/auth/login" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "<password>"
  }'

Responses

200Authenticated. Returns the JWT and the reseller profile.
{
  "token": "<token>",
  "reseller": {
    "id": "<reseller-id>",
    "email": "[email protected]",
    "name": "Your Name",
    "status": "active"
  }
}
401`invalid_credentials` — wrong email or password, or the reseller is `blocked`. A blocked reseller cannot log in.
429`rate_limited` — too many login attempts (5 per minute).
POST/api/reseller/auth/password
Auth: reseller-jwt

Change your password. Returns a fresh token; every older token is rejected afterwards. Responses are served with Cache-Control: no-store.

Parameters

current_passwordstringbodyrequired

Your current password.

new_passwordstringbodyrequired

The new password, 8 to 128 characters.

Request Example

curl -X POST "https://api.zrouter.dev/api/reseller/auth/password" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "current_password": "<current-password>",
    "new_password": "<new-password>"
  }'

Responses

200Password changed. Returns a fresh token — use it from now on; every older token is rejected with `401`.
{
  "token": "<fresh-token>"
}
401`invalid_credentials` — wrong current password (your existing token stays valid) or missing or invalid JWT.
422`validation_error` — the new password is not 8 to 128 characters.

Account endpoints#

Reseller API keys#

Persistent keys for server-to-server calls. Create and revoke them in the dashboard (Account → API keys) with a signed-in session — these three management endpoints also require the session (a key gets 403 session_required). A key authenticates all other endpoints on this page via Authorization: Bearer zrr_<key_id>_<secret>, keeps working after a password change, and is checked against revocation, account blocking, the email blacklist and its expiry on every request. Up to 10 active keys, each named; expires_at is optional.

GET/api/reseller/api-keys
Auth: reseller-jwt

List your keys. Never returns key values or secrets.

Responses

200Key list with effective status (`active`, `expired`, `revoked`).
{
  "keys": [
    {
      "id": "<key-uuid>",
      "name": "production",
      "public_prefix": "zrr_<key_id>",
      "created_at": "2026-11-24T10:00:00Z",
      "expires_at": null,
      "last_used_at": "2026-11-24T12:30:00Z",
      "revoked_at": null,
      "status": "active"
    }
  ]
}
401`invalid_credentials` — missing or invalid session.
POST/api/reseller/api-keys
Auth: reseller-jwt

Create a key. The full key is returned exactly once; store it immediately. Served with Cache-Control: no-store.

Parameters

namestringbodyrequired

Key name, 1 to 64 characters.

expires_atstringbodyoptional

Optional expiry, RFC 3339 timestamp (e.g. `2027-01-01T00:00:00Z`).

Request Example

curl -X POST "https://api.zrouter.dev/api/reseller/api-keys" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "production",
    "expires_at": "2027-01-01T00:00:00Z"
  }'

Responses

201Key created. `key` is shown this once and never again.
{
  "id": "<key-uuid>",
  "name": "production",
  "key": "zrr_<key_id>_<secret>",
  "public_prefix": "zrr_<key_id>",
  "expires_at": "2027-01-01T00:00:00Z"
}
401`invalid_credentials` — missing or invalid session.
403`session_required` — a reseller API key was sent; key management needs a signed-in session.
409`api_key_limit_reached` — you already hold 10 active keys. Revoke one first.
422`validation_error` — name missing/invalid or `expires_at` in the past.
DELETE/api/reseller/api-keys/{id}
Auth: reseller-jwt

Revoke one of your keys. Idempotent — revoking an already-revoked key still returns 200. The key stops authenticating immediately.

Parameters

idstringpathrequired

Key UUID from the create response or the list.

Responses

200Revoked (or was already revoked).
{ "status": "revoked" }
401`invalid_credentials` — missing or invalid session.
403`session_required` — a reseller API key was sent.
404`not_found` — no such key for your account.

Example — check the balance with a reseller key instead of a login token:

curl "https://api.zrouter.dev/api/reseller/balance" \
  -H "Authorization: Bearer zrr_<key_id>_<secret>"

Profile and balance#

GET/api/reseller/me
Auth: reseller-jwt

Return the authenticated reseller's profile, including current status.

Responses

200Reseller profile.
{
  "id": "<reseller-id>",
  "email": "[email protected]",
  "name": "Your Name",
  "status": "active"
}
401`invalid_credentials` — missing or invalid JWT.
GET/api/reseller/balance
Auth: reseller-jwt

Return the current quota balance as an integer micro-USD value.

Responses

200Current quota.
{
  "balance_usd_micro": "99500000"
}
401`invalid_credentials` — missing or invalid JWT.

Top-up endpoints#

POST/api/reseller/topup
Auth: reseller-jwt

Create a top-up order that adds USD quota. Available methods: qris (QRIS via Tako, with a fee), sumopod (QRIS without a fee), crypto (USDC/USDT on Solana, 1:1), or crypto_bep20 (USDT/USDC on BNB Smart Chain, 1:1, with token_kind usdt or usdc). Rate: Rp10,000 = $1 of quota. The order starts in pending and is credited only after confirmation.

Parameters

methodstringbodyrequired

Payment method for this order.

Allowed values:qriscryptosumopodcrypto_bep20
amount_idrintegerbodyoptional

Principal amount in IDR. Required when `method` is `qris` or `sumopod`.

amount_usd_microintegerbodyoptional

Amount in micro-USD. Required when `method` is `crypto` or `crypto_bep20`.

token_kindstringbodyoptional

Invoice token label for `crypto_bep20` (BEP20 on BSC chain 56). USDT and USDC are both accepted 1:1 whichever you pass. Ignored by every other method.

Allowed values:usdtusdc

Request Example

curl -X POST "https://api.zrouter.dev/api/reseller/topup" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"method": "qris", "amount_idr": 50000}'

Responses

201Top-up order created in `pending` and `payment_status` `pending`. For QRIS the response carries the QR content and image; for SumoPod it carries the raw QRIS string (`qr_content`) and a hosted payment page (`payment_url`); for crypto it carries deposit addresses. `crypto_bep20` orders additionally carry the immutable network facts: `network` (`bsc`), `chain_id` (`56`), `token_kind`, `contract_address`, `expected_raw` (the invoice amount as an 18-decimal token amount), and — once observed — `received_raw`/`received_micro`; the deposit EOA is `deposit_address`. `quota_usd_micro` is the credited amount (fee never credited); `paid_at`/`credited_at` appear once set.
{
  "id": "0d9c6f5e-4c1b-4f6e-9d2a-7b3f8c1e5a20",
  "order_number": "RTO-0d9c6f5e-4c1b-4f6e-9d2a-7b3f8c1e5a20",
  "payment_method": "qris",
  "provider": "tako",
  "amount_idr": 50000,
  "fee_idr": 2500,
  "total_idr": 52500,
  "quota_usd_micro": 5000000,
  "status": "pending",
  "payment_status": "pending",
  "provider_payment_id": "...",
  "expires_at": "2026-09-16T00:15:00Z",
  "created_at": "2026-09-16T00:00:00Z",
  "qr_content": "0002...",
  "qr_image_url": "https://...",
  "payment_url": "https://..."
}
422`validation_error` — missing or contradictory fields, or an amount the payment provider rejects.
503`provider_unavailable` — the payment provider is temporarily unavailable.
Create a crypto top-up order
curl -X POST "https://api.zrouter.dev/api/reseller/topup" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"method": "crypto", "amount_usd_micro": 20000000}'
Create a BEP20 (BSC) top-up order
curl -X POST "https://api.zrouter.dev/api/reseller/topup" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"method": "crypto_bep20", "amount_usd_micro": 20000000, "token_kind": "usdt"}'
GET/api/reseller/topup/{orderID}
Auth: reseller-jwt

Get the status of a top-up order and reconcile it. If the payment has finalized, the order is marked paid and your quota is credited in the same call. The status field is the order lifecycle (pending → crediting → credited, or expired / failed); payment_status is the derived payment view (paid, pending, expired, failed) — a paid payment on a not-yet-credited order still credits. Prefer this GET endpoint for polling.

Parameters

orderIDstringpathrequired

The order `id` returned by `POST /api/reseller/topup`.

Request Example

curl "https://api.zrouter.dev/api/reseller/topup/<order-id>" \
  -H "Authorization: Bearer <token>"

Responses

200The updated order. Same shape as the create response; `paid_at` and `credited_at` appear once set.
{
  "id": "0d9c6f5e-4c1b-4f6e-9d2a-7b3f8c1e5a20",
  "order_number": "RTO-0d9c6f5e-4c1b-4f6e-9d2a-7b3f8c1e5a20",
  "payment_method": "qris",
  "provider": "tako",
  "amount_idr": 50000,
  "fee_idr": 2500,
  "total_idr": 52500,
  "quota_usd_micro": 5000000,
  "status": "credited",
  "payment_status": "paid",
  "provider_payment_id": "...",
  "expires_at": "2026-09-16T00:15:00Z",
  "created_at": "2026-09-16T00:00:00Z",
  "paid_at": "2026-09-16T00:07:41Z",
  "credited_at": "2026-09-16T00:07:41Z"
}
404`topup_not_found` — the order does not exist for this reseller.
GET/api/reseller/topups
Auth: reseller-jwt

List your top-up orders, newest first. Each entry has the same shape as the single-order response. total is the total number of your orders (not the page size), for pagination.

Parameters

limitintegerqueryoptional

Page size, default 20, max 100.

offsetintegerqueryoptional

Page offset, default 0.

Request Example

curl "https://api.zrouter.dev/api/reseller/topups?limit=20&offset=0" \
  -H "Authorization: Bearer <token>"

Responses

200A page of your top-up orders plus the total count.
{
  "topups": [
    {
      "id": "0d9c6f5e-...",
      "order_number": "RTO-0d9c6f5e-...",
      "payment_method": "qris",
      "provider": "tako",
      "amount_idr": 50000,
      "fee_idr": 2500,
      "total_idr": 52500,
      "quota_usd_micro": 5000000,
      "status": "credited",
      "payment_status": "paid",
      "expires_at": "2026-09-16T00:15:00Z",
      "created_at": "2026-09-16T00:00:00Z",
      "paid_at": "2026-09-16T00:07:41Z",
      "credited_at": "2026-09-16T00:07:41Z"
    }
  ],
  "total": 1
}
POST/api/reseller/topup/{orderID}/check
Auth: reseller-jwt

Legacy alias of GET /api/reseller/topup/{orderID} — same poll-and-reconcile behavior and the same response body. Kept for backward compatibility.

Parameters

orderIDstringpathrequired

The order id returned by `POST /api/reseller/topup`.

Request Example

curl -X POST "https://api.zrouter.dev/api/reseller/topup/<order-id>/check" \
  -H "Authorization: Bearer <token>"

Responses

200The updated order — same body as `GET /api/reseller/topup/{orderID}`.
404`topup_not_found` — the order does not exist for this reseller.

Minting endpoints#

POST/api/reseller/mint
Auth: reseller-jwt

Mint a Token Plan tier to a customer, debiting your quota atomically. Idempotent on operation_id. See Quota & Minting.

Parameters

operation_idstringbodyrequired

Client-generated idempotency key. Non-empty, at most 128 characters.

customer_emailstringbodyrequired

Email of the target customer (a zrouter user).

plan_tier_idstringbodyrequired

The Token Plan tier to grant. See the live [pricing page](/en/pricing).

Request Example

curl -X POST "https://api.zrouter.dev/api/reseller/mint" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "operation_id": "op_1234567890abcdef",
    "customer_email": "[email protected]",
    "plan_tier_id": "<tier-id>"
  }'

Responses

201Mint applied. A replay with the same `operation_id` and the same payload also returns `201` with `already_applied: true` and no second debit.
{
  "customer_user_id": "<user-id>",
  "model_id": "<model-id>",
  "granted_tokens": 1000,
  "price_usd_micro": "1000000",
  "balance_after": "98500000",
  "already_applied": false
}
402`insufficient_quota` — your quota cannot cover this mint.
409`idempotency_conflict` — `operation_id` was reused with a different payload.
422`tier_not_available` or `validation_error` — the tier is not for sale, or fields are malformed.
500`internal_error` — an unexpected internal failure.

Tier catalog#

GET /api/reseller/tiers lists the Token Plan tiers you can mint, one entry per tier, ordered by tier price ascending then model name ascending. The topup_idr_required field is the IDR top-up quota needed to cover the tier at the fixed rate of Rp10.000 per USD (tier_usd_cents × 100); the 5% QRIS processing fee is separate and never included. Only safe, public fields are returned.

GET/api/reseller/tiers
Auth: reseller-jwt

Return the list of Token Plan tiers available to mint, sorted by tier price ascending then model name ascending. Internal-only pricing fields are never exposed.

Responses

200The list of mintable tiers.
{
  "tiers": [
    {
      "plan_tier_id": "<tier-id>",
      "model_id": "<model-id>",
      "model_name": "<public-name>",
      "tier_usd_cents": 100,
      "price_usd_micro": 1000000,
      "granted_tokens": 1000,
      "topup_idr_required": 10000
    }
  ]
}
401`invalid_credentials` — missing or invalid JWT.

Customer endpoints#

GET/api/reseller/customers
Auth: reseller-jwt

List the customers associated with this reseller, with cursor pagination. Use q to search by email.

Parameters

limitintegerqueryoptionaldefault: 200

Page size. Default 200, maximum 200.

cursorstringqueryoptional

Opaque cursor from a previous response's `next_cursor`.

qstringqueryoptional

Case-insensitive substring of the customer's email.

Request Example

curl "https://api.zrouter.dev/api/reseller/customers?limit=50&q=example" \
  -H "Authorization: Bearer <token>"

Responses

200A page of customers. `next_cursor` is `null` on the last page. `total` counts all your customers; `matched` is present only when `q` is given.
{
  "customers": [
    {
      "user_id": "<user-id>",
      "email": "[email protected]",
      "display_name": "Customer",
      "created_at": "2026-09-16T00:00:00Z"
    }
  ],
  "next_cursor": null,
  "total": 1,
  "matched": 1
}
401`invalid_credentials` — missing or invalid JWT.
422`validation_error` — malformed `cursor`.
POST/api/reseller/customers
Auth: reseller-jwt

Resolve-or-create a customer by email. If the zrouter user does not exist, one is created and linked to this reseller.

Parameters

emailstringbodyrequired

The customer's email.

Request Example

curl -X POST "https://api.zrouter.dev/api/reseller/customers" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]"}'

Responses

200The resolved or newly created customer.
{
  "user_id": "<user-id>",
  "email": "[email protected]",
  "created": false
}
422`validation_error` — malformed email.
POST/api/reseller/customers/{userID}/keys
Auth: reseller-jwt

Create an API key for a customer. The secret is revealed once and never stored. The response is served with Cache-Control: no-store. You may create any number of keys for a customer.

Parameters

userIDstringpathrequired

The customer's user id.

namestringbodyrequired

A label for this key.

Request Example

curl -X POST "https://api.zrouter.dev/api/reseller/customers/<user-id>/keys" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"name": "production"}'

Responses

201Key created. The `secret` is shown exactly once.
{
  "key_id": "<key-id>",
  "name": "production",
  "secret": "zr_<public-id>_<secret>"
}
404The target user is not a customer of this reseller.
GET/api/reseller/customers/{userID}/keys
Auth: reseller-jwt

List every API key of the customer account — active or not, including keys the customer created themselves. Secrets are never returned.

Parameters

userIDstringpathrequired

The customer's user id.

Request Example

curl "https://api.zrouter.dev/api/reseller/customers/<user-id>/keys" \
  -H "Authorization: Bearer <token>"

Responses

200The customer's keys. `created_by_this_reseller` is `true` for keys you created.
{
  "keys": [
    {
      "key_id": "<key-id>",
      "name": "production",
      "prefix": "zr_<public-id>",
      "status": "active",
      "created_at": "2026-09-16T00:00:00Z",
      "expires_at": null,
      "last_used_at": "2026-09-17T08:30:00Z",
      "created_by_this_reseller": true
    }
  ]
}
404The target user is not a customer of this reseller.
DELETE/api/reseller/keys/{keyID}
Auth: reseller-jwt

Revoke an API key. Scoped: the key must belong to a customer of this reseller, otherwise the request fails with 404.

Parameters

keyIDstringpathrequired

The key id to revoke.

Request Example

curl -X DELETE "https://api.zrouter.dev/api/reseller/keys/<key-id>" \
  -H "Authorization: Bearer <token>"

Responses

200Key revoked.
404The key does not exist or is not owned by a customer of this reseller.

Balance endpoints#

The balance endpoints share one response shape: a payg object with a USD balance as a decimal string, and a token_plans array of integer token counts. Money is always a decimal string of micro-USD (for example "0.000001" is $0.000001) — never a float — and token counts are always integers. A revoked key still resolves to its owner's balances, so you can reconcile historical usage.

GET/api/reseller/keys/{keyID}/balances
Auth: reseller-jwt

Return the PAYG balance and Token Plan balances of the customer who owns the given API key. Works even if the key is revoked, for historical reconciliation. Scoped: the key must belong to a customer of this reseller, otherwise the request fails with 404.

Parameters

keyIDstringpathrequired

The API key id (UUID) to look up.

Request Example

curl "https://api.zrouter.dev/api/reseller/keys/<key-id>/balances" \
  -H "Authorization: Bearer <token>"

Responses

200The key owner's balances, including `payg` and `token_plans`.
{
  "key_id": "<key-id>",
  "customer_user_id": "<user-id>",
  "payg": {
    "currency": "USD",
    "balance": "0.000001"
  },
  "token_plans": [
    {
      "model": "<public-name>",
      "purchased_tokens": 1000,
      "used_tokens": 123,
      "remaining_tokens": 877,
      "status": "active"
    }
  ],
  "as_of": "2026-09-16T00:00:00Z"
}
401`invalid_credentials` — missing or invalid JWT.
404`not_found` — the key does not exist or is not owned by a customer of this reseller.
422`validation_error` — `keyID` is not a valid UUID.
GET/api/reseller/customers/{userID}/balances
Auth: reseller-jwt

Return the PAYG balance and Token Plan balances for one of your customers. Same shape as the key balance endpoint, minus the key_id field. The customer must be owned by this reseller, otherwise the request fails with 404.

Parameters

userIDstringpathrequired

The customer's user id (UUID).

Request Example

curl "https://api.zrouter.dev/api/reseller/customers/<user-id>/balances" \
  -H "Authorization: Bearer <token>"

Responses

200The customer's balances, including `payg` and `token_plans`.
{
  "customer_user_id": "<user-id>",
  "payg": {
    "currency": "USD",
    "balance": "0.000001"
  },
  "token_plans": [
    {
      "model": "<public-name>",
      "purchased_tokens": 1000,
      "used_tokens": 123,
      "remaining_tokens": 877,
      "status": "active"
    }
  ],
  "as_of": "2026-09-16T00:00:00Z"
}
401`invalid_credentials` — missing or invalid JWT.
404`not_found` — the customer is not owned by this reseller.
422`validation_error` — `userID` is not a valid UUID.

Usage endpoints#

GET/api/reseller/usage
Auth: reseller-jwt

Return settled usage for this reseller's customers, newest first, with cursor pagination. Covers the last 90 days only, 50 items per page. Each item includes the cost as cost_usd_micro (integer micro-USD) — the usage value at pay-as-you-go prices.

Parameters

limitintegerqueryoptionaldefault: 50

Page size. Default 50.

cursorstringqueryoptional

Opaque cursor from a previous response's `next_cursor`.

user_idstringqueryoptional

Only this customer's usage. Must be one of your customers.

fromstringqueryoptional

Start of the range, RFC3339. The 90-day window is never widened.

tostringqueryoptional

End of the range, RFC3339.

Request Example

curl "https://api.zrouter.dev/api/reseller/usage?user_id=<user-id>&from=2026-09-01T00:00:00Z" \
  -H "Authorization: Bearer <token>"

Responses

200A page of usage events. `window_start` is the effective start of the range.
{
  "data": [
    {
      "user_id": "<user-id>",
      "model": "<public-name>",
      "total_tokens": 49,
      "cost_usd_micro": 120,
      "timestamp": "2026-09-16T00:00:00Z"
    }
  ],
  "next_cursor": "<opaque-string>",
  "window_start": "2026-08-18T00:00:00Z"
}
401`invalid_credentials` — missing or invalid JWT.
404`not_found` — `user_id` is not a customer of this reseller.
422`validation_error` — malformed parameter, or `from` is after `to`.
GET/api/reseller/usage/summary
Auth: reseller-jwt

Aggregate usage per UTC day and per customer. The cost is the usage value at pay-as-you-go prices, the same meaning as in /usage.

Parameters

user_idstringqueryoptional

Only this customer. Must be one of your customers.

fromstringqueryoptional

Start of the range, RFC3339. The 90-day window is never widened.

tostringqueryoptional

End of the range, RFC3339.

Request Example

curl "https://api.zrouter.dev/api/reseller/usage/summary" \
  -H "Authorization: Bearer <token>"

Responses

200`days` is newest first; `customers` is ordered by largest cost first. `window_start` is the effective start of the range.
{
  "days": [
    {
      "day": "2026-09-16",
      "requests": 12,
      "input_tokens": 3400,
      "output_tokens": 1800,
      "total_tokens": 5200,
      "cost_usd_micro": "0.001450"
    }
  ],
  "customers": [
    {
      "user_id": "<user-id>",
      "email": "[email protected]",
      "requests": 12,
      "input_tokens": 3400,
      "output_tokens": 1800,
      "total_tokens": 5200,
      "cost_usd_micro": "0.001450"
    }
  ],
  "window_start": "2026-08-18T00:00:00Z"
}
401`invalid_credentials` — missing or invalid JWT.
404`not_found` — `user_id` is not a customer of this reseller.
422`validation_error` — malformed parameter, or `from` is after `to`.
GET/api/reseller/mints
Auth: reseller-jwt

Mint history, newest first. price_usd_micro is a decimal string.

Parameters

limitintegerqueryoptionaldefault: 50

Page size. Default 50, maximum 200.

cursorstringqueryoptional

Opaque cursor from a previous response's `next_cursor`.

user_idstringqueryoptional

Only mints to this customer.

Request Example

curl "https://api.zrouter.dev/api/reseller/mints?limit=50" \
  -H "Authorization: Bearer <token>"

Responses

200A page of mints. `next_cursor` is `null` on the last page.
{
  "mints": [
    {
      "id": "<mint-id>",
      "operation_id": "op_1234567890abcdef",
      "customer_user_id": "<user-id>",
      "email": "[email protected]",
      "model": "<public-name>",
      "granted_tokens": 1000,
      "price_usd_micro": "1.000000",
      "created_at": "2026-09-16T00:00:00Z"
    }
  ],
  "next_cursor": null
}
401`invalid_credentials` — missing or invalid JWT.
404`not_found` — `user_id` is not a customer of this reseller.
422`validation_error` — malformed `cursor` or `user_id`.

Your customers can check their own balance#

With their own API key, your customers can call GET /api/customer/balances and GET /api/customer/usage themselves. Send the key as Authorization: Bearer <key> or x-api-key: <key>.

Customer self-check
curl "https://api.zrouter.dev/api/customer/balances" \
  -H "Authorization: Bearer zr_<public-id>_<secret>"

curl "https://api.zrouter.dev/api/customer/usage" \
  -H "x-api-key: zr_<public-id>_<secret>"