Moonborn — API · billing
Snapshot of metered usage for the current billing period
Read directly from the metering feature counters (F4.1) — no Stripe round-trip.
GET/v1/billing/usagescope · Bearer (API key or session JWT)
Responses
200OK
Body
| Field | Type | Description |
|---|---|---|
| periodStartreq | string | |
| periodEndreq | string | |
| metricsreq | object | |
| overageMinorreq | number |
401Unauthenticated
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string |
Examples
cURL
curl -X GET https://api.moonborn.co/v1/billing/usage \ -H "Authorization: Bearer $MOONBORN_API_KEY"
TypeScript
import Moonborn from '@moonborn/sdk';
const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });
const result = await client.billing.getCurrentUsage();Python
import os from moonborn import Moonborn client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"]) result = client.billing.get_current_usage()