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

# Get Quota V1

> Pre-flight quota check. Cheaper than /usage when all you need to know is 'can I send another batch right now?' — skips the lifetime aggregation across…

Pre-flight quota check.

Cheaper than `/usage` when all you need to know is 'can I send another
batch right now?' — skips the lifetime aggregation across UsageRecord
and the by-status job count.

### Response

`QuotaResponse`

<ResponseField name="plan_name" type="string,null">
  Subscription plan label, or None if no subscription is on file.
</ResponseField>

<ResponseField name="period_tasks_used" type="integer" required />

<ResponseField name="task_quota" type="integer" required />

<ResponseField name="remaining" type="integer" required>
  Convenience: max(quota - used, 0).
</ResponseField>

<ResponseField name="is_exhausted" type="boolean" required>
  True iff `remaining == 0`. Tenants can branch on this without arithmetic.
</ResponseField>

<ResponseField name="billing_period_start" type="string,null" />

<ResponseField name="billing_period_end" type="string,null" />

### Status codes

| Code  | Meaning             |
| ----- | ------------------- |
| `200` | Successful Response |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.computer.stateset.app/api/v1/quota' \
    --header 'X-API-Key: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "plan_name": "string",
    "period_tasks_used": 1,
    "task_quota": 1,
    "remaining": 1,
    "is_exhausted": true,
    "billing_period_start": "string",
    "billing_period_end": "string"
  }
  ```
</ResponseExample>
