getUsage()

Signature
client.getUsage(): Promise<Usage>

Usage#

ts
import { VeloraClient } from '@rimora/velora'
import fetch from 'node-fetch'

const client = new VeloraClient({
  apiKey: process.env.VELORA_API_KEY,
  fetch: fetch as any
})

const { usage, limits, period } = await client.getUsage()

console.log(`Jobs: ${usage.jobs} / ${limits.jobs}`)
console.log(`Executions this month: ${usage.executions} / ${limits.executions}`)
console.log(`Period: ${period.start} – ${period.end}`)

// Check if near limit
if (usage.jobs / limits.jobs > 0.9) {
  console.warn('Approaching job limit — consider upgrading your plan')
}

Response#

Usage
{
  "usage": {
    "jobs": 12,
    "executions": 3840,
    "api_calls": 215
  },
  "limits": {
    "jobs": 50,
    "executions": 10000,
    "api_calls": -1
  },
  "period": {
    "start": "2026-04-01T00:00:00.000Z",
    "end": "2026-04-30T23:59:59.000Z"
  }
}
A limit value of -1 means unlimited for that dimension on your current plan.

Required scope#

Requires: jobs:read (or admin, *)

Common errors#

StatuserrorCause
401invalid_api_keyMissing or revoked API key
403insufficient_scopeKey lacks jobs:read scope

© 2026 Velora · API Documentation