Vanguard AI

Account & usage

Inspect your balance and usage, and configure where results are stored.

Balance

GET /v1/account/balance API key
200 Balance
{ "status": "success", "balance": 100, "plan": "FREE" }

Usage history

GET /v1/account/usage API key

Query parameters

service
string
Filter by service, e.g. "ocr".
status
success | error
Filter by outcome.
apiKeyId
uuid
Filter by the key that made the call.
from
date-time
Start of the range (ISO 8601).
to
date-time
End of the range (ISO 8601).
limit
integer
Page size. Default 20.
offset
integer
Page offset. Default 0.
200 Recent events + summary
{
  "status": "success",
  "recent": [
    { "id": "...", "service": "ocr", "credits": 1, "latencyMs": 842, "status": "success", "createdAt": "..." }
  ],
  "summary": [ { "service": "ocr", "calls": 42, "credits": 42 } ]
}

Aggregate stats

GET /v1/account/usage/stats API key

Returns aggregates by service, by key, by status, and a time series — handy for building a usage dashboard.

Bring-your-own storage

GET /v1/account/storage API key
POST /v1/account/storage API key

Configure an S3‑compatible bucket to hold stored results.

JSON body (POST)

endpoint *
uri
S3-compatible endpoint URL.
region
string
Bucket region.
bucket *
string
Bucket name.
accessKeyId *
string
Access key id.
secretAccessKey *
string
Secret access key (stored encrypted).