Usage metering
How tokens, requests, and spend are counted.
Every successful request is metered. Counts and spend roll up to the
Usage view on your dashboard and to GET /v1/management/credits.
What’s counted
| Field | Source |
|---|---|
request_count | One per /v1/chat/completions call |
prompt_tokens | The model’s usage.prompt_tokens |
completion_tokens | The model’s usage.completion_tokens |
cached_tokens | Cached-prefix portion of the prompt, when the upstream reports it |
cost | Per-token price applied to the above; same value returned inline as usage.cost |
status_code | HTTP status of the upstream response |
Cost reporting
Every successful response includes usage.cost (USD) inline — the
exact amount debited from your balance — plus an X-Dynoyard-Cost-USD
response header on non-streaming calls. The dashboard Spend view and
GET /v1/management/credits reconcile to the same number to the cent.
Streaming
For SSE streams we automatically set stream_options: { include_usage: true } (when you haven’t) so the final data: chunk before [DONE]
carries the usage object including usage.cost. If you explicitly
set include_usage: false, token counts may be unavailable for that
request — keep the default unless you have a reason to disable it.
What’s NOT counted
- Failed requests (4xx / 5xx) — recorded for diagnostics, never billed.
GET /v1/modelsand other non-completion endpoints — free.
Metering reliability
Usage events are recorded fire-and-forget — no synchronous round-trip on your request path. A periodic reconciliation pass settles any gap as a safety net, so billing stays accurate even if an individual telemetry write is dropped.
Billing
Pricing is pay-as-you-go per-token — see billing and the pricing page. No tiers, no subscription.