vedicAPI

Usage

Your usage for a month, India time: API calls used, requests and errors, by day, by endpoint and by end user. Without end_user it also gives the plan, extra API calls and their cost so far, and your spend cap if set. Free to call.

GET/usage
Free to call

Authentication

Send your API key as a Bearer token. Keys start with sk_live_. Keep keys on your server. More on keys

Authorization: Bearer $VEDICAPI_KEY

Headers

  • Authorization
    Requiredrequired
    DescriptionBearer followed by your API key.
  • X-End-User
    Requiredoptional
    DescriptionYour own id for the person the call is for, up to 64 characters. Shows in Request logs. End-user tags

Query parameters

  • monthstring

    Month, YYYY-MM. Default this month.

    Example 2026-11
  • end_userstring

    Only calls with this X-End-User tag. The plan and cost fields are left out when you send it.

Response

JSON with 200 OK. Every answer carries units (how many API calls this request counts as) and request_id, and the same values in the X-Units and X-Request-Id headers. The example below is the real answer to the request shown.

  • aiobject
  • as_ofstringUTC time the numbers were read.
  • by_dayarrayPer day: units, calls and errors.
  • by_end_userarrayPer X-End-User tag, top 100.
  • by_endpointarrayPer endpoint, most API calls first.
  • callsnumberRequests this month, errors included.
  • currencystringINR or USD.
  • errorsnumberRequests that ended in an error.
  • extra_cost_minornumberCost of the extra calls so far, in the currency's smallest unit (paise or cents).
  • extra_unitsnumberAPI calls past the plan this month.
  • fromstringFirst day of the month.
  • monthstringThe month, YYYY-MM, India time.
  • notestringA short note on how to read the answer.
  • planobjectYour plan and its API calls a month. Left out when you send end_user.
  • timezonestringTime zone of the month and of by_day.
  • tostringLast day of the month.
  • units_usednumberAPI calls counted this month. Errors are never counted.
  • unitsnumberHow many API calls this request counts as: 1, or 5 for a heavy call; 0 for errors and free endpoints.
  • request_idstringId of this call. Search it in Request logs. Also sent as the X-Request-Id header.

Errors

  • 400
    Codesinvalid_monthinvalid_end_user
    WhenA field is missing or invalid. The message names the field.
  • 401
    Codesmissing_keyunknown_key
    WhenNo key, or the key is wrong, revoked or past its rotation window.
  • 403
    Codesnot_allowed
    WhenThe key has an allow list and this call came from another IP or domain.
  • 404
    Codesno_such_endpoint
    WhenWrong path or method.
  • 429
    Codesrate_limitedmonthly_limitspend_cap
    WhenOver a limit. Wait the Retry-After seconds before trying again.
  • 500
    Codesinternal
    WhenThe log store could not be read. Retry.

Errors are never charged. Every error has one shape: { "error": "<message>", "code": "<code>", "request_id": "req_..." }. Errors and limits