vedicAPI

Usage alerts and webhooks

Know before you run out. We watch your usage and errors and tell you by email or with a signed webhook to your server.

What we alert on

  • quota_50
    When50% of your plan's monthly API calls are used
    How oftenOnce a billing month
  • quota_80
    When80% used
    How oftenOnce a billing month
  • quota_100
    WhenAll used. On Free, calls now get 429 until the month resets; on paid plans extra API calls are billed
    How oftenOnce a billing month
  • cap_reached
    WhenExtra API calls reached your monthly spend cap, so calls above the plan get 429
    How oftenOnce a billing month
  • ai_chat_low, ai_call_low
    When20% of your AI questions or call minutes is left
    How oftenOnce a pack
  • ai_chat_out, ai_call_out
    WhenNone left: AI gets 429 ai_limit, API calls keep working
    How oftenOnce a pack
  • error_spike
    WhenMore than 5% of at least 50 requests failed in the last 15 minutes
    How oftenAt most once an hour
  • test
    WhenYou pressed Send test alert
    How oftenWhen you press it

Turn each one on or off, and add up to 5 email addresses and one webhook URL, in Alerts in your dashboard. Every alert also shows under the bell in the dashboard. We check usage every minute, and at once when a call is refused by a limit.

The webhook

We send a POST with a JSON body to your https URL, with a 5 second timeout and one retry. Answer with any 2xx status.

Body
{
  "id": "al_7Qm2xYp9KdRt3a",
  "kind": "quota_80",
  "title": "80% of your monthly API calls used",
  "detail": "4,00,112 of 5,00,000 API calls used on the Growth plan. Resets 1 Dec.",
  "account_id": "f24c3ef9-f7eb-41e3-8ca5-ba50085ae80b",
  "created_at": "2026-11-24T09:14:02Z"
}

Check the signature

Every webhook carries X-Vedicapi-Signature: sha256=<hex>, an HMAC-SHA256 of the raw body with your webhook secret. We show the secret once, when you add the URL or rotate it. Reject any request whose signature doesn't match.

import crypto from "node:crypto";

// Use the raw request body, before JSON parsing.
export function isFromVedicapi(rawBody, signatureHeader, secret) {
  const expected = "sha256=" + crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
  const a = Buffer.from(expected);
  const b = Buffer.from(signatureHeader || "");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}
Use id to ignore a repeat if a retry arrives after your server already handled the first try.

Your billing month and time zone

Months, limits, Retry-After, the dashboard's daily chart, invoices and GET /usage all run in your account's time zone: India time for Indian accounts, your own zone otherwise. You can change it in the dashboard until your first invoice. GET /usage answers include timezone.