> ## 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…

<Warning>
  **Confirm your deployment before running this request.** This page describes an API contract;
  a published reference does not establish hosted availability. Check the dated
  [host report](/api-reference/hosts) and obtain your deployment URL and credentials.
  Replace the example host if your provisioned service uses a different URL.
</Warning>

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 |

### Using this contract

Read the [source OpenAPI document](/spec/computer-use.json) for declared schemas and alternatives.
This page also includes documented corrections from the [spec overlays](https://github.com/stateset/docs/tree/main/spec/overlays).
Example IDs and values are illustrative; replace them with records from your workspace.

<RequestExample>
  ```bash cURL theme={null}
  curl --silent --show-error --fail-with-body --request GET \
    --url 'https://api.computer.stateset.app/api/v1/quota' \
    --header "X-API-Key: $STATESET_COMPUTER_USE_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>


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