Skip to main content

Billing

Billing endpoints are read-only and organization scoped.

Authentication & scope

  • Header: X-API-Key: YOUR_API_KEY
  • Required scope: billing:read
  • Use API Reference for interactive Try-it support.

GET /v1/billing/history

Returns paginated billing history.

Bash

curl -X GET "https://api.indigenius.ai/v1/billing/history?page=1&pageSize=10" \
  -H "X-API-Key: YOUR_API_KEY"

Node

const response = await fetch(
  'https://api.indigenius.ai/v1/billing/history?page=1&pageSize=10',
  { headers: { 'X-API-Key': process.env.INDIGENIUS_API_KEY } },
);
console.log(await response.json());

Python

import requests

response = requests.get(
    "https://api.indigenius.ai/v1/billing/history",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"page": 1, "pageSize": 10},
    timeout=30,
)
print(response.status_code)
print(response.json())

200 OK

{
  "status": true,
  "message": "Billing history fetched",
  "data": [
    {
      "id": "665e4a34c65bb95f2f2d72e1",
      "cost": 4.2,
      "duration": 86,
      "product": "agent",
      "unit": "audio"
    }
  ],
  "meta": {
    "page": 1,
    "pageSize": 10,
    "totalPages": 1,
    "totalCount": 1
  }
}

Common status codes

  • 200 success
  • 400 invalid pagination/query
  • 403 missing billing:read
  • 500 server error

Other billing endpoints

All endpoints below support the same auth header and scope.
  • GET /v1/billing/transactions
  • GET /v1/billing/plan
  • GET /v1/billing/currencies

Bash

curl -X GET "https://api.indigenius.ai/v1/billing/transactions?page=1&pageSize=10" \
  -H "X-API-Key: YOUR_API_KEY"

Node

const response = await fetch('https://api.indigenius.ai/v1/billing/plan', {
  headers: { 'X-API-Key': process.env.INDIGENIUS_API_KEY },
});
console.log(await response.json());

Python

import requests
response = requests.get(
    "https://api.indigenius.ai/v1/billing/currencies",
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=30,
)
print(response.status_code)
print(response.json())
Common status codes for these endpoints: 200, 403, 500.