Skip to main content
GET
/
v1
/
credits
/
usage
const usage = await client.credits.usage({
  from: "2025-01-01T00:00:00Z",
  to: "2025-03-31T23:59:59Z",
  limit: 50,
});

console.log(`Total used: ${usage.total_used} credits`);
for (const tx of usage.data) {
  console.log(`${tx.service}: ${tx.amount} credits - ${tx.description}`);
}
{
  "data": [
    {
      "id": "tx_abc123",
      "service": "enhancement",
      "amount": -12,
      "table_id": "tbl_xyz789",
      "description": "Enhanced 6 rows × description column",
      "created_at": "2025-03-10T14:30:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 128
  },
  "total_used": 3420
}

Query parameters

page
integer
default:"1"
Page number for pagination.
limit
integer
default:"25"
Number of items per page (max 100).
from
string
Filter transactions from this ISO 8601 date.
to
string
Filter transactions up to this ISO 8601 date.
service
string
Filter by service type (e.g., extraction, enhancement).

Response

data
array
pagination
object
total_used
number
Total credits consumed across all matching transactions (not just the current page).
const usage = await client.credits.usage({
  from: "2025-01-01T00:00:00Z",
  to: "2025-03-31T23:59:59Z",
  limit: 50,
});

console.log(`Total used: ${usage.total_used} credits`);
for (const tx of usage.data) {
  console.log(`${tx.service}: ${tx.amount} credits - ${tx.description}`);
}
{
  "data": [
    {
      "id": "tx_abc123",
      "service": "enhancement",
      "amount": -12,
      "table_id": "tbl_xyz789",
      "description": "Enhanced 6 rows × description column",
      "created_at": "2025-03-10T14:30:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 128
  },
  "total_used": 3420
}