---
title: "Your prepaid credit for paid calls: the balance, the calls it pays, when it expires, each top-up with its receipt and unused part, and the history (calls by day, refunds, expiry)"
method: GET
path: "/api/credits"
tags: ["Pay over HTTP 402"]
---

# Your prepaid credit for paid calls: the balance, the calls it pays, when it expires, each top-up with its receipt and unused part, and the history (calls by day, refunds, expiry)

`GET /api/credits`

## Request

- Base URL: `https://agentdrives.com`
- URL: `https://agentdrives.com/api/credits`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

## Response `200`

The credit

- Credit
  - `balance_cents` integer
  - `calls_left` integer
  - `expires_at` string, date-time, nullable
  - `currency` 'usd'
  - `topups` object[]
    - `id` string
    - `amount_cents` integer
    - `paid_with` 'stripe' | 'tempo' | 'evm'
    - `paid_at` string, date-time
    - `refunded_cents` integer
    - `unused_cents` integer
    - `receipt_url` string
  - `history` object[]
    - `kind` 'topup' | 'call' | 'refund' | 'expire' | 'adjust'
    - `at` string, date-time
    - `day` string: Calls: the day they were made, summed
    - `cents` integer
    - `calls` integer
  - `rules` object
  - `open` boolean: Whether top-ups are open now

## Other responses

- `401`: Error as problem details (RFC 9457) with a machine-readable `error` and a `fix` that says what to do next

---

[API](https://skmtc.dev/agentdrives/apis/agentdrives-api.md) · [All operations](https://skmtc.dev/agentdrives/apis/agentdrives-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentdrives/apis/agentdrives-api/revisions/ae3f2c04ff72?raw)
