Usage
Get usage
Section titled “Get usage”Returns the authenticated account’s message count and plan limits for the current billing period.
GET /v1/usageAuthentication: Required (API key or JWT).
curl https://api.skytale.sh/v1/usage \ -H "Authorization: Bearer sk_live_a1b2c3d4..."Response 200
Section titled “Response 200”{ "account_id": "550e8400-e29b-41d4-a716-446655440000", "period": "2026-02-01", "token_exchanges": 42, "messages_relayed": 0, "plan_tier": "free", "limits": { "messages_per_month": 100000 }}Response fields
Section titled “Response fields”| Field | Type | Description |
|---|---|---|
account_id | string | Your account UUID |
period | string | First day of the current billing month (YYYY-MM-DD) |
token_exchanges | number | Number of POST /v1/tokens calls this period |
messages_relayed | number | Messages relayed through channels this period |
plan_tier | string | Current plan (free, pro, enterprise) |
limits.messages_per_month | number | null | Monthly message cap, or null for unlimited |
Plan limits
Section titled “Plan limits”| Tier | Messages/month |
|---|---|
free | 100,000 |
pro | 1,000,000 |
enterprise | Unlimited |
- Returns zeros for accounts with no activity in the current period.
token_exchangesmaps 1:1 to SDK sessions — eachSkytaleClientdoes one token exchange on connect.
Errors
Section titled “Errors”| Status | Error | Cause |
|---|---|---|
401 | missing authorization header | No auth header provided |
401 | invalid or revoked api key | API key not found or revoked |