---
title: Get automation credit balance
description: Read the automation credit balance.
url: https://www.hacktron.ai/docs/api/credits/get-automation-credit-balance
---

# Get automation credit balance

Returns the organisation's [automation credits](/docs/platform/automations/credits), which [Remediation](/docs/platform/automations/remediation) runs are charged to, with the totals purchased, used, and granted. `balance` can be negative. `is_unlimited` is true for organisations whose runs are never charged.

For Whitebox credits, use [`GET /credits`](/docs/api/credits/get-credit-balance).

## Request

`GET /credits/automation`

Send an [API key](/docs/api/authentication) with the `read` scope in the `X-Api-Key` header.

:::examples

```bash title="Request" wrap=false
curl "https://api.hacktron.ai/v1/credits/automation" \
  -H "X-Api-Key: $HACKTRON_API_KEY"
```

```json title="Response 200 OK" showLineNumbers=false wrap=false
{
  "organization_id": "f336d0bc-b841-465b-8045-024475c079dd",
  "balance": 3800,
  "total_purchased": 0,
  "total_used": 1200,
  "total_granted": 5000,
  "used_this_period": 450,
  "is_unlimited": false
}
```

:::

## Responses

### 200 OK

| Field | Type | Description |
| --- | --- | --- |
| `organization_id` | string, required | Organisation UUID. |
| `balance` | number, required | Current automation credit balance (may be negative). |
| `total_purchased` | number, required | Total automation credits purchased across all time. |
| `total_used` | number, required | Total automation credits deducted for completed runs. |
| `total_granted` | number, required | Total automation credits granted. |
| `used_this_period` | number, required, nullable | Credits deducted since the start of the current billing period, null when the organisation has no billing period. |
| `is_unlimited` | boolean, required | Whether runs are exempt from automation credit charges. |
