# Quota Policies

Control usage and costs by setting token limits per user or per team through the Nexus portal.

## Overview

Quota policies let you define spending and usage boundaries for your organization. Policies are managed entirely through the Nexus portal web interface — no CLI or configuration files required.

## Creating a Quota Policy

1. Log into [nexus.allcode.com](https://nexus.allcode.com)
2. Navigate to **Quotas** in the left sidebar
3. Click **Create Policy**
4. Configure the policy:

| Field | Description |
|-------|-------------|
| **Policy Name** | A descriptive name (e.g., "Engineering Team Standard") |
| **Scope** | Per-user or per-team |
| **Token Limit** | Maximum tokens per period (input + output combined) |
| **Period** | Daily, weekly, or monthly reset cycle |
| **Enforcement Mode** | Soft limit (warn) or hard limit (block) |
| **Model Restriction** | Optionally restrict to specific Claude models |

5. Click **Save Policy**

## Enforcement Modes

| Mode | Behavior |
|------|----------|
| **Soft (Warn)** | Users receive a warning when approaching the limit but can continue. Usage is flagged in the Audit Log. |
| **Hard (Block)** | Requests are denied once the limit is reached. Users see a clear message explaining the quota has been exceeded. |

## Assigning Policies

### To Individual Users

1. Go to **Users** in the sidebar
2. Select a user
3. Under **Quota Policy**, choose the policy from the dropdown
4. Click **Save**

### To Teams

1. Go to **Quotas** → **Teams**
2. Create or select a team
3. Add users to the team
4. Assign a quota policy to the team
5. Click **Save**

When a user belongs to a team with a policy, the more restrictive limit applies (individual or team).

## Monitoring Usage Against Quotas

- **Dashboard** — Shows organization-wide usage vs. total quota allocation
- **Users** — Shows each user's current consumption against their assigned policy
- **Quotas** — Shows policy utilization across all assigned users/teams

## Editing and Deleting Policies

- To edit: Go to **Quotas**, click the policy name, modify fields, and click **Save**
- To delete: Click the **⋮** menu next to the policy and select **Delete**

Deleting a policy removes it from all assigned users and teams. Those users will have unrestricted access until a new policy is assigned.

## Default Policy

You can set a **default policy** that applies to all users who don't have an explicit assignment:

1. Go to **Quotas** → **Settings**
2. Enable **Default Policy**
3. Select or create the policy to use as default
4. Click **Save**

## Example Configurations

**Conservative (cost control):**
- Scope: Per-user
- Limit: 500,000 tokens/day
- Enforcement: Hard
- Models: Sonnet only

**Standard (balanced):**
- Scope: Per-user
- Limit: 2,000,000 tokens/day
- Enforcement: Soft
- Models: All

**Power User (unrestricted):**
- Scope: Per-user
- Limit: 10,000,000 tokens/day
- Enforcement: Soft
- Models: All (including Opus)

## Next Steps

- [View Billing Reports](./api.md)
- [Review Audit Log](./security.md)
