Nyne.ai API Login
Account APIs

API Usage Endpoint

A single synchronous endpoint to view all API usage across enrichment and search requests: credits consumed, allocation, remaining balance, and detailed per-API breakdowns. Without month/year, it reports the active billing period. Supplying both selects that calendar month (future periods are rejected with invalid_date). For prepaid accounts, usage and available credits are workspace-scoped across every API key in that workspace; legacy manual-billing accounts remain scoped to the authenticated key. The response reports credits, not dollars: the monetary price per credit is determined by the account's subscription or credit-purchase tier. Usage checks are free.

GET https://api.nyne.ai/usage API key

Manual credentials take precedence over your account key.

Overview

The Usage endpoint reports account-level API consumption so developers can monitor credits, monthly allocation, request volume, and per-API breakdowns.

Best for

  • Monitoring credit balance
  • Auditing API consumption
  • Showing usage in internal dashboards

Returns

  • Credit allocation and remaining balance
  • Request and usage totals
  • Per-API breakdowns

Parameters

month integer optional
Calendar month to report (1-12). Omit both month and year to use the active billing period.
year integer optional
Calendar year to report (2020-2030). Supply it together with month; omit both to use the active billing period.

Credit usage

Credits are charged based on the matched configuration. The listed cost is the per-result unit price.

Feature Credits Notes
Usage 0 Monitoring endpoint - usage checks are free
Heads up
Empty results do not burn credits.

Responses

200 Usage statistics retrieved
400 invalid_month / invalid_year / invalid_date (future months are rejected)
401 missing_api_key / invalid_api_key / missing_api_secret / invalid_api_secret
403 api_key_disabled
429 rate_limit_exceeded
500 internal_error

A successful response wraps the payload in the { success, data, timestamp } envelope (also shown live in the panel on the right):

{
  "success": true,
  "data": {
    "month": 12,
    "year": 2024,
    "period": "2024-12",
    "period_type": "calendar_month",
    "scope": {
      "type": "workspace",
      "workspace_id": 1234,
      "authenticated_api_key_id": 5678
    },
    "credits_used": {
      "total": 68,
      "search": 45,
      "enrichment": 23
    },
    "requests_count": {
      "total": 25,
      "search": 15,
      "enrichment": 10
    },
    "limits": {
      "monthly_allocation": 10000,
      "available_credits": 9932,
      "is_unlimited": false
    },
    "breakdown": {
      "search_results_returned": 45,
      "enrichments_performed": 23,
      "total_credits_consumed": 68
    }
  },
  "timestamp": "2026-01-01T00:00:00"
}