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

# Get Batch Limits

> Check your batch limits, current usage, credit and billing before you upload.

Returns your plan's batch limits, what's running now, your credit and whether billing is set up. Call it before you upload to tell whether [Create a Batch](https://docs.zerodrift.com/api-reference/batches/create-batch.md) would be refused. Read-only API keys are allowed.

## Response

**limits** `object`

**properties**

**max\_active\_batches** `integer`

Batches you can have running at once.

**max\_in\_flight\_items** `integer`

Messages you can have in flight across running batches.

**max\_items** `integer`

Messages per batch (100,000).

**max\_upload\_bytes** `integer`

Bytes per uploaded file (256 MB).

**current** `object`

`active_batches` and `in_flight_items` now. Counts batches that are `validating`, `in_progress`, `canceling` or `finalizing`.

**credit** `object | null`

`available`: your balance, less the estimated cost of running batches. `rate_per_unit`: your batch price per unit of up to 2,000 input tokens. `null` when your balance can't be read.

**billing** `object`

`enforced`: whether batches are charged. `has_account`: whether you have a billing account. If `enforced` is `true` and `has_account` is `false`, a batch fails with `pricing_unavailable`, so set up billing first.

```bash cURL theme={null}
curl https://api.zerodrift.ai/api/v3/batches/limits \
  -H "x-api-key: YOUR_API_KEY"
```

```json 200 OK (example) theme={null}
{
  "api_version": "v3",
  "limits": {
    "max_active_batches": 8,
    "max_in_flight_items": 500000,
    "max_items": 100000,
    "max_upload_bytes": 268435456
  },
  "current": { "active_batches": 1, "in_flight_items": 4200 },
  "credit": {
    "available": { "amount": "12.34", "currency": "USD" },
    "rate_per_unit": { "amount": "0.01", "currency": "USD" }
  },
  "billing": { "enforced": true, "has_account": true }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.