> ## 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 up Grid for your organization

> Prepare Grid for your organization: organize teams, connect model providers, choose each team's models, and set spend limits.

Set up Grid once per team: add its members, choose the models it can use, and set its spend limits. When you finish, developers on the team can run `baseten grid setup` and see the team's models in their coding agent.

Manage Grid from the **Grid** page in the [Baseten app](https://app.baseten.co/grid). Use **Activity** and **Users** to review usage. Choose a team on **Routes**, **Connections**, or **Guardrails** to manage its models, provider keys, or budgets. You can also manage [routes](https://docs.baseten.co/reference/cli/baseten/grid.md#route), [provider connections](https://docs.baseten.co/reference/cli/baseten/grid.md#connection), and [team settings](https://docs.baseten.co/reference/cli/baseten/grid.md#team-settings) with the Baseten CLI, or manage every setting with the Management API.

## Before you begin

* Baseten has enabled Grid for your organization. To request access, [Contact us](mailto:support@baseten.co).
* You're an organization Admin, or an Admin of each team you set up. Team members can use a team's routes but can't change them.
* To use Anthropic, OpenAI, or xAI models, you have an API key from that provider. See [Choose a provider API key](#choose-a-provider-api-key).

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.

## Credentials and ownership

Grid uses different credentials for administration, coding agents, and upstream model providers:

| Credential | Who uses it | Purpose |
| - | - | - |
| Baseten sign-in | Admins and developers | Sign in to the Baseten app or CLI with your organization account. |
| Grid API key | A developer's configured coding agents | Authenticate model requests to Grid. Grid attributes spend to the key's creator and applies limits in the team. Standard setup creates or reuses this key. |
| Provider API key | An admin connects it to a team | Allow the team's routes to call Anthropic, OpenAI, or xAI. The provider bills the account behind the key. Developers don't need to install it on their machines. |

Use an authorized Baseten API key for Management API operations. It is separate from the inference-only provider key you add in **Connections**.

## Organize teams and members

Grid uses your organization's [teams](https://docs.baseten.co/organization/teams.md). Each team has its own routes, provider connections, harness defaults, and spend limits. Create a team for each group of developers that needs different models or a different budget, such as an infrastructure team with frontier models and a \$10,000 team-wide limit, and a go-to-market team with open-weight models only.

[Invite developers to a team](https://docs.baseten.co/organization/teams.md#invite-members-to-a-team), or sync team membership from your identity provider with [SCIM](https://docs.baseten.co/organization/sso-and-scim.md). A developer on several teams picks one with `--team` when they run setup.

## Connect model providers

Skip this step if the team uses only Baseten Model APIs. Connecting a provider supplies its credential; you still need to [add its models to the team](#choose-team-models).

> [tab] UI
>
> **To connect a model provider**:
>
> 1. Sign in to your workspace at [app.baseten.co](https://app.baseten.co) and choose **Grid** in the sidebar.
> 2. Choose **Connections**.
> 3. Choose the team from the dropdown.
> 4. Choose **Connect** for the provider.
> 5. Enter a provider API key restricted to inference, then save. See [Choose a provider API key](#choose-a-provider-api-key).
>
> Confirm that the provider appears as connected for the team.
>
> To replace an existing key, choose the provider's edit icon.

> [tab] Baseten CLI
>
> **To connect a model provider**:
>
> Replace `<team>` with your team's name or ID. This example connects Anthropic. For OpenAI or xAI, change the provider and use a distinct secret name, such as `openai-key` or `xai-key`, in both commands. Reusing a secret name replaces its value and affects connections that already use it.
>
> 1. Save the provider key as a [team secret](https://docs.baseten.co/organization/secrets.md). Run the following command and enter the key at the prompt:
>
>    ```sh theme={"system"}
>    baseten org secret set --team "<team>" --name anthropic-key
>    ```
>
> 2. Create a connection that uses that secret:
>
>    ```sh theme={"system"}
>    baseten grid connection create --team "<team>" \
>      --provider anthropic --secret-name anthropic-key
>    ```
>
> 3. Check that the connection lists the intended provider and secret:
>
>    ```sh theme={"system"}
>    baseten grid connection list --team "<team>"
>    ```
>
> For more information, see [`baseten grid connection create`](https://docs.baseten.co/reference/cli/baseten/grid#connection).

Baseten stores the key as a secret on the team and never shows it again. The provider bills its own usage to that key. To rotate the key, edit the connection; every route that uses the connection switches to the new key.

### Choose a provider API key

Give Grid a key that can run inference but can't administer your provider account. A service account key isn't automatically restricted to inference. Check both the account's permissions and the key's scope before you add it.

| Provider | Use | Don't use |
| - | - | - |
| Anthropic | A workspace-scoped service account key without organization administration permissions | An Admin API key |
| OpenAI | A restricted service account key that can only perform inference | An admin key or an unrestricted key |
| xAI | An inference API key with access to the required endpoints and models | A Management API key |

For key creation and permissions, see the [Anthropic authentication guide](https://platform.claude.com/docs/en/manage-claude/authentication), [OpenAI project API key guide](https://help.openai.com/en/articles/9186755-managing-projects-in-the-api-platform), and [xAI API key permissions](https://docs.x.ai/developers/rest-api-reference/management/auth).

## Choose team models

Add the models a team's developers can pick in their coding agent. Mix open-weight models from Model APIs with frontier models from a connected provider, so developers can use a frontier model for the hardest problems and an open-weight model for routine work without leaving their agent.

> [tab] UI
>
> **To add models to a team**:
>
> 1. Sign in to your workspace at [app.baseten.co](https://app.baseten.co) and choose **Grid** in the sidebar.
> 2. Choose **Routes**.
> 3. Choose the team from the dropdown.
> 4. Choose **Add routes**.
> 5. Choose **Model APIs** or a connected provider.
> 6. Add each model that the team should be able to call.
>
> Confirm that the new models appear in the team's routes.

> [tab] Baseten CLI
>
> **To add models to a team**:
>
> Replace `<team>` with your team's name or ID. For a Model API, replace `<model>` with its model name and run the following command:
>
> ```sh theme={"system"}
> baseten grid route create --team "<team>" \
>   --target-type baseten-model-api --target-model "<model>"
> ```
>
> For a model from a connected provider:
>
> 1. List the team's connections and copy the connection's ID:
>
>    ```sh theme={"system"}
>    baseten grid connection list --team "<team>"
>    ```
>
> 2. Replace `<provider-model>` with the provider's model name and `<connection-id>` with the ID from the previous step:
>
>    ```sh theme={"system"}
>    baseten grid route create --team "<team>" \
>      --target-type connection --target-model "<provider-model>" \
>      --target-connection-id "<connection-id>"
>    ```
>
> For either model type, confirm that the new model appears in the team's routes:
>
> ```sh theme={"system"}
> baseten grid route list --team "<team>"
> ```
>
> For more information, see [`baseten grid route create`](https://docs.baseten.co/reference/cli/baseten/grid#route).

Grid lists a model in a coding agent only when the agent can call the model's API and the model supports tool calling. See [Model requirements](https://docs.baseten.co/grid/supported-agents-and-models.md#model-requirements).

### Add an auto route

An auto route lets a classifier choose among several direct routes for each request. The default route handles a request when the classifier doesn't choose one. Auto routes can't contain other auto routes.

Add the direct routes the classifier can choose before creating the auto route.

> [tab] UI
>
> **To add an auto route**:
>
> 1. Sign in to your workspace at [app.baseten.co](https://app.baseten.co) and choose **Grid** in the sidebar.
> 2. Choose **Routes**.
> 3. Choose the team from the dropdown.
> 4. Choose **Add routes**.
> 5. Choose **Intelligent routing**.
> 6. Enter the route's display name.
> 7. Choose the allowed routes and a default route from that set.
> 8. Choose an available classifier.
> 9. Choose **Add intelligent route**.
>
> Confirm that the auto route appears in the team's routes with the intended classifier and allowed models.

> [tab] Baseten CLI
>
> **To add an auto route**:
>
> Replace `<team>` with your team's name or ID.
>
> 1. List the team's direct routes and copy the IDs of the routes to include:
>
>    ```sh theme={"system"}
>    baseten grid route list --team "<team>"
>    ```
>
> 2. List available classifiers and copy the classifier's ID:
>
>    ```sh theme={"system"}
>    baseten grid classifier list
>    ```
>
> 3. Create the auto route. Replace the placeholders with the IDs from the previous steps. The default must be one of the allowed routes:
>
>    ```sh theme={"system"}
>    baseten grid route create --team "<team>" \
>      --target-type classifier --classifier-id "<classifier-id>" \
>      --allowed-route-id "<primary-route-id>" \
>      --allowed-route-id "<background-route-id>" \
>      --default-route-id "<primary-route-id>" \
>      --display-name "Coding assistant"
>    ```
>
> 4. Replace `<auto-route-id>` with the new route's ID and check its classifier, allowed routes, and default route:
>
>    ```sh theme={"system"}
>    baseten grid route describe --id "<auto-route-id>"
>    ```
>
> For more information, see [`baseten grid route create`](https://docs.baseten.co/reference/cli/baseten/grid#route) and [`baseten grid classifier list`](https://docs.baseten.co/reference/cli/baseten/grid#classifier).

Developers can select the auto route in their coding agent like any other compatible team route.

## Set harness defaults

Set harness defaults to choose the model each coding agent uses when a developer runs setup without picking one. Claude Code and OpenCode have a primary model and a background model for lightweight tasks; Codex and Pi have a primary model only.

To pair a frontier model with a cheaper one, set a frontier route as the primary model and an open-weight Model API as the background model. Developers get the frontier model for their main work, while lightweight background requests go to the open-weight model.

Without an override, Baseten recommends routes from the team's LLM Model APIs. It recommends the highest-ranked Model API for primary work and the least expensive Model API for background work. Connected-provider routes aren't automatic recommendations, but you can select a compatible provider route as an override.

> [tab] UI
>
> **To choose a coding agent's default models**:
>
> 1. Sign in to your workspace at [app.baseten.co](https://app.baseten.co) and choose **Grid** in the sidebar.
> 2. Choose **Routes**.
> 3. Choose the team from the dropdown.
> 4. Under **Harness model overrides**, expand **Harness overrides**.
> 5. For **Default**, choose the primary route for the coding agent.
> 6. For **Background**, where available, choose the route for lightweight tasks.
> 7. Choose **Save changes**.
>
> Confirm that the selected routes remain in the team's harness overrides.

> [tab] Baseten CLI
>
> **To choose a coding agent's default models**:
>
> Replace `<team>` with your team's name or ID. This example sets Claude Code's primary and background routes.
>
> 1. List the team's routes and copy the IDs of the primary and background models:
>
>    ```sh theme={"system"}
>    baseten grid route list --team "<team>"
>    ```
>
> 2. Save those route IDs as Claude Code's defaults:
>
>    ```sh theme={"system"}
>    baseten grid team-settings update --team "<team>" \
>      --harness claude-code \
>      --primary-route-id "<primary-route-id>" \
>      --background-route-id "<background-route-id>"
>    ```
>
> 3. Check that Claude Code lists the intended primary and background routes:
>
>    ```sh theme={"system"}
>    baseten grid harness-defaults --team "<team>" --harness claude-code
>    ```
>
> For more information, see [`baseten grid team-settings update`](https://docs.baseten.co/reference/cli/baseten/grid#team-settings) and [`baseten grid harness-defaults`](https://docs.baseten.co/reference/cli/baseten/grid#harness-defaults).

> [tab] Management API
>
> **To choose a coding agent's default models**:
>
> Set `BASETEN_API_KEY` to a Baseten API key with team Admin permissions. 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. This example sets Claude Code's primary and background routes.
>
> 1. List the team's routes and copy the IDs of the primary and background models:
>
>    ```sh theme={"system"}
>    curl --get "https://api.baseten.co/v1/grid/routes" \
>      --header "Authorization: Bearer $BASETEN_API_KEY" \
>      --data-urlencode "team_id=<team_id>"
>    ```
>
> 2. Save those route IDs as Claude Code's defaults:
>
>    ```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>","harness_defaults":{"claude_code":{"primary":"<primary-route-id>","background":"<background-route-id>"}}}'
>    ```
>
> 3. Read the team's settings to confirm the saved routes:
>
>    ```sh theme={"system"}
>    curl --get "https://api.baseten.co/v1/grid/team_settings" \
>      --header "Authorization: Bearer $BASETEN_API_KEY" \
>      --data-urlencode "team_id=<team_id>"
>    ```
>
>    Check `harness_defaults.claude_code.primary.route.id` and `harness_defaults.claude_code.background.route.id` against the IDs you saved.
>
> For more information, see [Update team settings](https://docs.baseten.co/reference/management-api/team-settings/update-team-settings.md) and [Get team settings](https://docs.baseten.co/reference/management-api/team-settings/get-team-settings.md).

Only the defaults you provide change. Developers who use team defaults pick up the changes when they next run setup or [sync](https://docs.baseten.co/grid/developers/set-up.md#pick-up-new-routes). Explicit route choices take precedence over team defaults.

## Set spend limits

Set a per-member limit for the team, a team-wide limit, or both. See [Set spend limits and view usage](https://docs.baseten.co/grid/manage.md) for how limits combine and how to change one developer's limit.

## Verify the team is ready

Before inviting the whole team to connect, have one member complete [developer setup](https://docs.baseten.co/grid/developers/set-up.md) and send a test request. Confirm that:

* The intended team models appear in the coding agent's model picker.
* The selected model returns a response.
* Existing MCP tools still work if the team relies on them.
* Usage appears for that developer after the metering delay, which can be up to 15 minutes.

## Roll out to developers

Once the pilot works, use [Roll out Grid to developers](https://docs.baseten.co/grid/roll-out.md) for an announcement template and scripted setup options.
