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

# Set spend limits and view usage

> Set per-member and team-wide spend limits, change a developer's monthly limit, and see spend by developer, model, and provider.

Set monthly spend limits for your team:

* Limit what each member can spend in the team.
* Limit what the whole team can spend.

Give a developer a different monthly limit when they need more or less than the team default.

For the CLI procedures, [install the Baseten CLI](https://docs.baseten.co/reference/cli/baseten/overview.md#install) and [sign in](https://docs.baseten.co/reference/cli/baseten/auth.md#login) to your organization.

## How spend limits work

All limits are in USD and reset on the first day of each UTC calendar month.

| Limit | Set on | What it controls |
| - | - | - |
| Per-member limit | A team, by a team or organization Admin | Each member's monthly spend in the team, for every member who doesn't have their own limit. |
| Team-wide limit | A team, by an organization Admin | The team's combined monthly spend. It applies on top of members' own limits. |
| Member limit | One member of a team, by a team or organization Admin | Replaces the team's per-member limit for that member, every month. |
| Current-month override | One member of a team, by a team or organization Admin | Replaces the member's recurring limit or the team's per-member default for the current UTC month. |

A member's own monthly limit replaces the team's per-member default. A current-month override takes precedence over both. The team-wide limit applies separately: reaching it blocks every member's requests in that team, even when someone has remaining personal allowance.

For example, suppose Engineering has a 100 USD per-member default and a 1,000 USD team-wide limit. A developer with a 200 USD member limit can spend up to 200 USD each month, subject to the team's remaining allowance and metering delay. Other members keep the 100 USD default.

A limit of `0` allows no spend after the first metered request. Leave a team budget empty to remove that budget. Clearing a developer's current-month override restores their recurring limit or the team's default.

Limits apply to requests made with Grid API keys a developer created through `baseten grid setup`. Personal Baseten API keys aren't limited.

When a developer or team reaches a limit, their coding agents can't make new requests through Grid in that team until you raise the limit or the next month starts. Baseten meters spend every 15 minutes, so spend can exceed a limit before it takes effect.

## Set a team's limits

Set a per-member default for members who don't have their own limit, and a team-wide limit for combined spend. Team or organization Admins can change the per-member default. Only organization Admins can change the team-wide limit.

> [tab] UI
>
> **To set a team's spend limits**:
>
> 1. Sign in to your workspace at [app.baseten.co](https://app.baseten.co) and choose **Grid** in the sidebar.
> 2. Choose **Guardrails**.
> 3. Choose the team.
> 4. Under **Budgets**, choose **Edit budgets**.
> 5. For **Default user budget**, enter `100` to set the per-member default.
> 6. If you're an organization Admin and also want a team-wide limit, enter `1000` for **Team budget**. Otherwise, leave the existing team budget unchanged.
> 7. Choose **Save**.
>
> Leave an input empty to remove that budget. Team Admins can change the default user budget; only organization Admins can change the team budget.

> [tab] Baseten CLI
>
> **To set a team's spend limits**:
>
> Replace `<team>` with your team's name or ID. As a team or organization Admin, run the following command to set the per-member default:
>
> ```sh theme={"system"}
> baseten grid team-settings update --team "<team>" \
>   --per-member-monthly-limit-usd 100
> ```
>
> As an organization Admin, run the following command to set both the per-member default and team-wide limit:
>
> ```sh theme={"system"}
> baseten grid team-settings update --team "<team>" \
>   --per-member-monthly-limit-usd 100 \
>   --team-wide-monthly-limit-usd 1000
> ```
>
> Check that the returned settings show the limits you set. Only the limits you pass change. Pass `null` as a limit's value to remove it. For more information, see [`baseten grid team-settings update`](https://docs.baseten.co/reference/cli/baseten/grid#team-settings).

> [tab] Management API
>
> **To set a team's spend limits**:
>
> Set `BASETEN_API_KEY` to a team or organization Admin's Baseten API key. Find the team's ID with [List teams](https://docs.baseten.co/reference/management-api/teams/lists-all-teams.md) and replace `<team_id>` with it.
>
> As a team or organization Admin, run the following command to set the per-member default:
>
> ```sh theme={"system"}
> curl --request PATCH \
>   "https://api.baseten.co/v1/grid/team_settings" \
>   --header "Authorization: Bearer $BASETEN_API_KEY" \
>   --header "Content-Type: application/json" \
>   --data '{"team_id":"<team_id>","spend_limit":{"per_member_monthly_limit_usd":"100"}}'
> ```
>
> As an organization Admin, run the following command to set both limits:
>
> ```sh theme={"system"}
> curl --request PATCH \
>   "https://api.baseten.co/v1/grid/team_settings" \
>   --header "Authorization: Bearer $BASETEN_API_KEY" \
>   --header "Content-Type: application/json" \
>   --data '{"team_id":"<team_id>","spend_limit":{"per_member_monthly_limit_usd":"100","team_wide_monthly_limit_usd":"1000"}}'
> ```
>
> Check that `spend_limit.per_member_monthly_limit_usd` is `"100"`. If you also set the team-wide limit, check that `spend_limit.team_wide_monthly_limit_usd` is `"1000"`. Omitted fields stay unchanged; send `null` for a field to remove its limit.

## Change one developer's limit

Team or organization Admins can override a developer's limit for the current UTC month. The override expires when the next month starts. The dashboard changes the current-month override; use the CLI or API to change the developer's recurring monthly limit.

> [tab] UI
>
> **To set a developer's limit to 200 USD for this month**:
>
> 1. Sign in to your workspace at [app.baseten.co](https://app.baseten.co) and choose **Grid** in the sidebar.
> 2. Choose **Users**.
> 3. Choose the team.
> 4. Choose the developer.
> 5. In **Usage this month**, choose **Set limit** or **Change limit**.
> 6. For **Limit (USD per month)**, enter `200`.
> 7. Choose **Save limit**.
>
> Confirm that **Usage this month** shows the new limit. To restore the recurring limit, choose **Use default** (or **Remove limit** when no recurring limit applies), then choose **Save limit**.

> [tab] Baseten CLI
>
> **To set a developer's limit to 200 USD for this month**:
>
> Replace `<team>` with the team's name or ID.
>
> 1. Look up the developer by email and copy their user ID:
>
>    ```sh theme={"system"}
>    baseten org user describe --user-email "<developer-email>"
>    ```
>
> 2. Replace `<user-id>` with the ID from the previous step and set the current-month override:
>
>    ```sh theme={"system"}
>    baseten grid user-settings update --team "<team>" --user-id "<user-id>" \
>      --month-override-usd 200
>    ```
>
> 3. Confirm that the developer's current-month override is 200 USD:
>
>    ```sh theme={"system"}
>    baseten grid user-settings describe --team "<team>" --user-id "<user-id>"
>    ```
>
> **To set a recurring monthly limit of 200 USD starting now**:
>
> Use the team and user ID from the lookup above. This command also clears the current-month override so the recurring limit applies immediately:
>
> ```sh theme={"system"}
> baseten grid user-settings update --team "<team>" --user-id "<user-id>" \
>   --user-monthly-limit-usd 200 --month-override-usd null
> ```
>
> Confirm that the updated settings show a 200 USD monthly limit and no current-month override.
>
> For more information, see [`baseten grid user-settings update`](https://docs.baseten.co/reference/cli/baseten/grid#user-settings).

> [tab] Management API
>
> **To set a developer's limit to 200 USD for this month**:
>
> Set `BASETEN_API_KEY` to a Baseten API key with team Admin permissions. Find the team and developer IDs with [List teams](https://docs.baseten.co/reference/management-api/teams/lists-all-teams.md) and [List users](https://docs.baseten.co/reference/management-api/users/list-users.md). Replace `<team_id>` and `{user_id}` with those IDs, then run the following command:
>
> ```sh theme={"system"}
> curl --request PATCH \
>   "https://api.baseten.co/v1/grid/team_settings/users/{user_id}" \
>   --header "Authorization: Bearer $BASETEN_API_KEY" \
>   --header "Content-Type: application/json" \
>   --data '{"team_id":"<team_id>","spend_limit":{"month_override_usd":"200"}}'
> ```
>
> Check that the response's `spend_limit.month_override_usd` is `"200"`. Omitted fields stay unchanged.
>
> **To set a recurring monthly limit of 200 USD starting now**:
>
> Run the following command to set the recurring limit and clear the current-month override:
>
> ```sh theme={"system"}
> curl --request PATCH \
>   "https://api.baseten.co/v1/grid/team_settings/users/{user_id}" \
>   --header "Authorization: Bearer $BASETEN_API_KEY" \
>   --header "Content-Type: application/json" \
>   --data '{"team_id":"<team_id>","spend_limit":{"user_monthly_limit_usd":"200","month_override_usd":null}}'
> ```
>
> Check that `spend_limit.user_monthly_limit_usd` is `"200"` and `spend_limit.month_override_usd` is `null`.
>
> For more information, see [Update member settings](https://docs.baseten.co/reference/management-api/team-settings/update-member-settings.md).

## See usage

Review spend and tokens by developer to identify who accounts for usage. Organization Admins can see organization-wide usage; other members' access depends on their role and teams. Usage can lag by up to 15 minutes, and Baseten keeps it for 92 days. Vertex AI and OpenAI-compatible usage isn't included.

> [tab] UI
>
> **To review organization-wide usage as an organization Admin**:
>
> 1. Sign in to your workspace at [app.baseten.co](https://app.baseten.co) and choose **Grid** in the sidebar.
> 2. Choose **Activity**.
> 3. Choose the period to review. **Overview** shows spend, tokens, and cache hit rate, with breakdowns by model, team, and provider, plus top users.
> 4. Choose **Intelligent routing** to compare the models selected by an auto route.
> 5. Choose **Users** to see developer spend and token counts. Search by name or email to find a developer.
>
> The UI initially shows the current billing period. Spend-limit enforcement uses UTC calendar months.

> [tab] Baseten CLI
>
> **To see developer spend and tokens over the last week**:
>
> Sign in as an organization Admin, then run the following command:
>
> ```sh theme={"system"}
> baseten grid route usage --since 7d --group-by user
> ```
>
> The command lists daily usage grouped by developer. For more information, see [`baseten grid route usage`](https://docs.baseten.co/reference/cli/baseten/grid#route).

> [tab] Management API
>
> **To retrieve developer spend and tokens for a date range**:
>
> Use an organization Admin's Baseten API key in `BASETEN_API_KEY`. Replace `<start_date>` with an inclusive UTC date and `<end_date>` with an exclusive UTC date, both in `YYYY-MM-DD` format.
>
> Run the following command:
>
> ```sh theme={"system"}
> curl --get "https://api.baseten.co/v1/grid/routes/usage" \
>   --header "Authorization: Bearer $BASETEN_API_KEY" \
>   --data-urlencode "start_date=<start_date>" \
>   --data-urlencode "end_date=<end_date>" \
>   --data-urlencode "group_by=USER" \
>   --data-urlencode "limit=31"
> ```
>
> The response contains daily usage buckets grouped by developer. If `pagination.has_more` is `true`, pass `pagination.cursor` as the `cursor` query parameter to retrieve the next page.

## Compare usage views

Choose the view that matches the question you're answering:

| Question | View | Scope |
| - | - | - |
| What is the organization spending, and on which models? | **Grid → Activity** | Organization-wide activity over the selected period. |
| Which developers account for the spend? | **Grid → Users** | Developer spend and token counts over the selected period. |
| How much have I spent against my limit? | `baseten grid user-settings describe` | Your spend and effective limit in one team for the current UTC month. |
| What does Baseten bill? | Baseten billing and usage | Model API charges, including usage through Grid. Connected-provider charges remain with the provider. |

The dashboard's current billing period and a UTC calendar month can cover different dates. Compare the same period and team before reconciling totals. Provider costs in Grid are estimates, so they may differ from the provider's invoice.

## How Grid usage is billed

* **Model API routes** are billed by Baseten at your organization's Model API prices, including tool calls. They appear on your Baseten bill with the rest of your [Model APIs](https://docs.baseten.co/inference/model-apis/overview.md) usage.
* **Anthropic, OpenAI, and xAI routes** are billed by the provider to the API key in the team's connection. Baseten doesn't charge for them. The costs Grid shows for these routes are estimates of what the provider charges, so spend limits can cover them too.
