> ## Documentation Index
> Fetch the complete documentation index at: https://dev.kernel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get credits

Returns the remaining API credits and billing mode for the organization associated with your API key.

## Example

```bash curl theme={null}
curl https://api.kernel.ai/rest/v1/credits \
  -H "x-api-key: $KERNEL_API_KEY"
```

```json Response (200) theme={null}
{
  "balance": 452,
  "billing_mode": "billable"
}
```

## Response fields

| Field          | Type     | Description                                                                                                    |
| -------------- | -------- | -------------------------------------------------------------------------------------------------------------- |
| `balance`      | `number` | Remaining API credits. Decremented per job based on job type cost.                                             |
| `billing_mode` | `string` | Billing mode for this organization. One of: `billable`, `exempt`. Exempt organizations have unlimited credits. |

## Credit costs

| Job type                | Cost      |
| ----------------------- | --------- |
| Entity resolution       | 1 credit  |
| Firmographic enrichment | 2 credits |
| Resolve parent          | 2 credits |
| Combined                | 3 credits |

Credits are deducted when a job starts and refunded if the job fails.

## Errors

| Status | Response                               | Cause                                   |
| ------ | -------------------------------------- | --------------------------------------- |
| 401    | `{"error":"Missing x-api-key header"}` | No API key provided                     |
| 404    | `{"error":"Organization not found"}`   | API key does not map to an organization |
| 503    | `{"error":"Service unavailable"}`      | Backend temporarily unavailable         |
