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

# Update team settings

> Changes the team's Grid settings, including default harness models and spend limits.



## OpenAPI

````yaml patch /v1/grid/team_settings
openapi: 3.1.0
info:
  description: REST API for management of Baseten resources
  title: Baseten management API
  version: 1.0.0
servers:
  - url: https://api.baseten.co
security:
  - BearerAuth: []
paths:
  /v1/grid/team_settings:
    patch:
      summary: Updates a team's Grid settings by team ID or your only team
      description: >-
        Changes only the fields in the request, all or nothing. Requires team
        admin, and organization admin to change the team-wide spend limit. The
        team comes from `team_id` instead of the path. Omit it to use the team
        you belong to; when you belong to several, the request fails with a 400.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateGridTeamSettingsRequestV1'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GridTeamSettingsV1'
      x-codeSamples:
        - lang: bash
          source: |-
            curl --request PATCH \
            --url https://api.baseten.co/v1/grid/team_settings \
            --header "Authorization: Bearer $BASETEN_API_KEY" \
            --data '{
              "harness_defaults": null,
              "spend_limit": null,
              "team_id": "abc1234"
            }'
        - lang: python
          source: |-
            import requests
            import os
            API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")
            url = "https://api.baseten.co/v1/grid/team_settings"

            headers = {"Authorization": f"Bearer {API_KEY}"}

            response = requests.request(
                "PATCH",
                url,
                headers=headers,
                json={'harness_defaults': None, 'spend_limit': None, 'team_id': 'abc1234'}
            )

            print(response.text)
components:
  schemas:
    UpdateGridTeamSettingsRequestV1:
      additionalProperties: false
      minProperties: 1
      properties:
        harness_defaults:
          anyOf:
            - $ref: '#/components/schemas/UpdateGridHarnessDefaultsV1'
            - type: 'null'
          default: null
          description: >-
            Harnesses to change; harnesses left out are unchanged. Pass null to
            clear every harness, so each role uses the team's default.
          x-null-distinct: true
        spend_limit:
          anyOf:
            - $ref: '#/components/schemas/UpdateGridTeamSpendLimitSettingV1'
            - type: 'null'
          default: null
          description: >-
            Spend limit fields to change. Pass null to remove the team's limits;
            omit to leave them unchanged.
          x-null-distinct: true
        team_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            ID of the team. When omitted, the team you belong to; required when
            you belong to several.
          examples:
            - abc1234
          title: Team Id
      title: UpdateGridTeamSettingsRequestV1
      type: object
    GridTeamSettingsV1:
      properties:
        team_id:
          description: ID of the team.
          examples:
            - abc1234
          title: Team Id
          type: string
        team_name:
          description: Name of the team.
          examples:
            - Engineering
          title: Team Name
          type: string
        harness_defaults:
          $ref: '#/components/schemas/GridHarnessDefaultsV1'
          description: >-
            Route for each model role of each coding harness. A role with no
            route set by a team admin uses the default chosen from the team's
            Model API routes: the recommended model for `primary` and the
            lowest-priced model for `background`. These defaults never use
            external-provider routes.
        spend_limit:
          $ref: '#/components/schemas/GridTeamSpendLimitSettingV1'
          description: Spend limits for Baseten Grid for members' spend in this team.
      required:
        - team_id
        - team_name
        - harness_defaults
        - spend_limit
      title: GridTeamSettingsV1
      type: object
    UpdateGridHarnessDefaultsV1:
      additionalProperties: false
      minProperties: 1
      properties:
        claude_code:
          anyOf:
            - $ref: '#/components/schemas/UpdateGridBackgroundHarnessModelsV1'
            - type: 'null'
          default: null
          description: >-
            Route IDs for the model roles to change; roles left out are
            unchanged. Every route must belong to the team. Pass null to clear
            every role, or omit to leave the harness unchanged.
          x-null-distinct: true
        opencode:
          anyOf:
            - $ref: '#/components/schemas/UpdateGridBackgroundHarnessModelsV1'
            - type: 'null'
          default: null
          description: >-
            Route IDs for the model roles to change; roles left out are
            unchanged. Every route must belong to the team. Pass null to clear
            every role, or omit to leave the harness unchanged.
          x-null-distinct: true
        codex:
          anyOf:
            - $ref: '#/components/schemas/UpdateGridPrimaryHarnessModelsV1'
            - type: 'null'
          default: null
          description: >-
            Route IDs for the model roles to change; roles left out are
            unchanged. Every route must belong to the team. Pass null to clear
            every role, or omit to leave the harness unchanged.
          x-null-distinct: true
        pi:
          anyOf:
            - $ref: '#/components/schemas/UpdateGridPrimaryHarnessModelsV1'
            - type: 'null'
          default: null
          description: >-
            Route IDs for the model roles to change; roles left out are
            unchanged. Every route must belong to the team. Pass null to clear
            every role, or omit to leave the harness unchanged.
          x-null-distinct: true
      title: UpdateGridHarnessDefaultsV1
      type: object
    UpdateGridTeamSpendLimitSettingV1:
      additionalProperties: false
      minProperties: 1
      properties:
        per_member_monthly_limit_usd:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Spend limit in USD for each UTC calendar month that applies to each
            member's Grid spend in this team, unless the member has a limit of
            their own. Send null to remove it; omit to leave it unchanged.
          examples:
            - '200'
          title: Per Member Monthly Limit Usd
          x-null-distinct: true
        team_wide_monthly_limit_usd:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Spend limit in USD for each UTC calendar month on the Grid spend of
            all members in this team together. Send null to remove it; omit to
            leave it unchanged.
          examples:
            - '5000'
          title: Team Wide Monthly Limit Usd
          x-null-distinct: true
      title: UpdateGridTeamSpendLimitSettingV1
      type: object
    GridHarnessDefaultsV1:
      properties:
        claude_code:
          $ref: '#/components/schemas/GridBackgroundHarnessDefaultsV1'
          description: Default models for Claude Code.
        opencode:
          $ref: '#/components/schemas/GridBackgroundHarnessDefaultsV1'
          description: Default models for OpenCode.
        codex:
          $ref: '#/components/schemas/GridPrimaryHarnessDefaultsV1'
          description: Default models for Codex.
        pi:
          $ref: '#/components/schemas/GridPrimaryHarnessDefaultsV1'
          description: Default models for Pi.
      required:
        - claude_code
        - opencode
        - codex
        - pi
      title: GridHarnessDefaultsV1
      type: object
    GridTeamSpendLimitSettingV1:
      properties:
        per_member_monthly_limit_usd:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Spend limit in USD for each UTC calendar month that applies to each
            member's Grid spend in this team, unless the member has a limit of
            their own. Returned as an exact decimal string. Null when the team
            has no per-member limit.
          examples:
            - '200'
          title: Per Member Monthly Limit Usd
        team_wide_monthly_limit_usd:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Spend limit in USD for each UTC calendar month on the Grid spend of
            all members in this team together. Once it is reached, every
            member's requests in the team are rejected. Returned as an exact
            decimal string. Null when the team has no team-wide limit.
          examples:
            - '5000'
          title: Team Wide Monthly Limit Usd
      required:
        - per_member_monthly_limit_usd
        - team_wide_monthly_limit_usd
      title: GridTeamSpendLimitSettingV1
      type: object
    UpdateGridBackgroundHarnessModelsV1:
      additionalProperties: false
      minProperties: 1
      properties:
        primary:
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          default: null
          description: >-
            Route ID for the primary model, which new sessions use. Omit to keep
            the current route, or pass null to use the team's default.
          examples:
            - abc1234
          title: Primary
          x-null-distinct: true
        background:
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          default: null
          description: >-
            Route ID for background tasks, such as session titles. Omit to keep
            the current route, or pass null to use the team's default.
          examples:
            - def5678
          title: Background
          x-null-distinct: true
      title: UpdateGridBackgroundHarnessModelsV1
      type: object
    UpdateGridPrimaryHarnessModelsV1:
      additionalProperties: false
      minProperties: 1
      properties:
        primary:
          anyOf:
            - minLength: 1
              type: string
            - type: 'null'
          default: null
          description: >-
            Route ID for the primary model, which new sessions use. Omit to keep
            the current route, or pass null to use the team's default.
          examples:
            - abc1234
          title: Primary
          x-null-distinct: true
      title: UpdateGridPrimaryHarnessModelsV1
      type: object
    GridBackgroundHarnessDefaultsV1:
      properties:
        primary:
          anyOf:
            - $ref: '#/components/schemas/GridHarnessModelV1'
            - type: 'null'
          description: >-
            Route for the primary model, which new sessions use. Null when the
            team has no route to use.
        background:
          anyOf:
            - $ref: '#/components/schemas/GridHarnessModelV1'
            - type: 'null'
          description: >-
            Route for background tasks, such as session titles. Null when the
            team has no route to use.
      required:
        - primary
        - background
      title: GridBackgroundHarnessDefaultsV1
      type: object
    GridPrimaryHarnessDefaultsV1:
      properties:
        primary:
          anyOf:
            - $ref: '#/components/schemas/GridHarnessModelV1'
            - type: 'null'
          description: >-
            Route for the primary model, which new sessions use. Null when the
            team has no route to use.
      required:
        - primary
      title: GridPrimaryHarnessDefaultsV1
      type: object
    GridHarnessModelV1:
      properties:
        source:
          $ref: '#/components/schemas/GridSettingSourceV1'
          description: >-
            Where this role's route comes from. `team` covers both a route a
            team admin set and the default chosen from the team's Model API
            routes.
        route:
          $ref: '#/components/schemas/GridRouteV1'
          description: Route to use for this role.
      required:
        - source
        - route
      title: GridHarnessModelV1
      type: object
    GridSettingSourceV1:
      enum:
        - user
        - team
      title: GridSettingSourceV1
      type: string
    GridRouteV1:
      properties:
        id:
          description: Stable route identifier.
          title: Id
          type: string
        name:
          description: Name to send in the inference request's model field.
          title: Name
          type: string
        team_id:
          description: Identifier of the owning team.
          title: Team Id
          type: string
        team_name:
          description: Name of the owning team.
          title: Team Name
          type: string
        display_name:
          description: Display label, defaulting to the route name.
          title: Display Name
          type: string
        description:
          description: Short description of the route, empty when unset.
          title: Description
          type: string
        target:
          description: Configured upstream target.
          discriminator:
            mapping:
              BASETEN_MODEL_API: '#/components/schemas/GridRouteTargetBasetenModelAPIV1'
              CLASSIFIER: '#/components/schemas/GridRouteTargetClassifierV1'
              CONNECTION: '#/components/schemas/GridRouteTargetConnectionV1'
            propertyName: type
          oneOf:
            - $ref: '#/components/schemas/GridRouteTargetBasetenModelAPIV1'
            - $ref: '#/components/schemas/GridRouteTargetConnectionV1'
            - $ref: '#/components/schemas/GridRouteTargetClassifierV1'
          title: Target
        metadata:
          anyOf:
            - $ref: '#/components/schemas/ExploreMetadataV1'
            - type: 'null'
          description: >-
            Resolved model metadata; for a router, the envelope of its allowed
            routes' metadata. Null when nothing is linked.
        invoke_url:
          description: Base URL for inference requests using this route.
          title: Invoke Url
          type: string
        created_at:
          description: Creation time, ISO 8601.
          format: date-time
          title: Created At
          type: string
      required:
        - id
        - name
        - team_id
        - team_name
        - display_name
        - description
        - target
        - metadata
        - invoke_url
        - created_at
      title: GridRouteV1
      type: object
    GridRouteTargetBasetenModelAPIV1:
      properties:
        type:
          const: BASETEN_MODEL_API
          description: Target kind for a Baseten Model API.
          title: Type
          type: string
        model:
          description: Name of the target Model API.
          minLength: 1
          title: Model
          type: string
      required:
        - type
        - model
      title: GridRouteTargetBasetenModelAPIV1
      type: object
    GridRouteTargetClassifierV1:
      properties:
        type:
          const: CLASSIFIER
          description: Target kind for a classifier-based route.
          title: Type
          type: string
        classifier:
          anyOf:
            - $ref: '#/components/schemas/GridClassifierV1'
            - type: 'null'
          description: >-
            Classifier that picks a route for each request. Null for routers
            created before classifiers could be selected.
        default_route:
          $ref: '#/components/schemas/GridRouteRefV1'
          description: Route used when the classifier picks none.
        allowed_routes:
          description: Routes the classifier may pick, in creation order.
          items:
            $ref: '#/components/schemas/GridRouteRefV1'
          title: Allowed Routes
          type: array
      required:
        - type
        - classifier
        - default_route
        - allowed_routes
      title: GridRouteTargetClassifierV1
      type: object
    GridRouteTargetConnectionV1:
      properties:
        type:
          const: CONNECTION
          description: Target kind for a provider reached through a team connection.
          title: Type
          type: string
        model:
          description: Model name sent to the provider.
          minLength: 1
          title: Model
          type: string
        connection_id:
          description: Identifier of the team connection authenticating with the provider.
          title: Connection Id
          type: string
      required:
        - type
        - model
        - connection_id
      title: GridRouteTargetConnectionV1
      type: object
    ExploreMetadataV1:
      properties:
        slug:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Metadata slug, e.g. 'anthropic/claude-opus-4'; null for rows without
            one.
          title: Slug
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Model display name, when available.
          title: Display Name
        release_date:
          anyOf:
            - format: date
              type: string
            - type: 'null'
          description: >-
            Model release date. Month-only source dates use the first day of
            that month.
          title: Release Date
        provider:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Provider key derived from the slug prefix, e.g. 'anthropic'; null
            for unprefixed slugs.
          title: Provider
        context_window:
          anyOf:
            - type: integer
            - type: 'null'
          description: Total context window in tokens.
          title: Context Window
        max_output_tokens:
          anyOf:
            - type: integer
            - type: 'null'
          description: Maximum output tokens per response.
          title: Max Output Tokens
        input_modalities:
          description: Accepted input modalities.
          items:
            type: string
          title: Input Modalities
          type: array
        tools:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the model supports tool calling.
          title: Tools
        reasoning_effort_levels:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Reasoning effort levels the model supports.
          title: Reasoning Effort Levels
        parallel_tool_calls:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the model supports parallel tool calls.
          title: Parallel Tool Calls
        supported_api_formats:
          anyOf:
            - $ref: '#/components/schemas/ExploreMetadataAPIFormatsV1'
            - type: 'null'
          description: API formats the model supports.
        cost:
          anyOf:
            - $ref: '#/components/schemas/ExploreCostV1'
            - type: 'null'
          description: Provider list prices in USD per 1M tokens, when available.
      required:
        - slug
        - display_name
        - release_date
        - provider
        - context_window
        - max_output_tokens
        - input_modalities
        - tools
        - reasoning_effort_levels
        - parallel_tool_calls
        - supported_api_formats
        - cost
      title: ExploreMetadataV1
      type: object
    GridClassifierV1:
      properties:
        id:
          description: Stable classifier identifier.
          examples:
            - general-v1
          title: Id
          type: string
        name:
          description: Display name of the classifier.
          examples:
            - General
          title: Name
          type: string
      required:
        - id
        - name
      title: GridClassifierV1
      type: object
    GridRouteRefV1:
      properties:
        id:
          description: Stable route identifier.
          title: Id
          type: string
        slug:
          description: Name of the route to send in the inference request's model field.
          title: Slug
          type: string
      required:
        - id
        - slug
      title: GridRouteRefV1
      type: object
    ExploreMetadataAPIFormatsV1:
      properties:
        messages:
          default: false
          description: Anthropic Messages API support.
          title: Messages
          type: boolean
        responses:
          default: false
          description: OpenAI Responses API support.
          title: Responses
          type: boolean
        chat_completions:
          default: false
          description: OpenAI Chat Completions API support.
          title: Chat Completions
          type: boolean
      title: ExploreMetadataAPIFormatsV1
      type: object
    ExploreCostV1:
      properties:
        input:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M input tokens, when available.
          title: Input
        output:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M output tokens, when available.
          title: Output
        cache_read:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M input tokens read from cache, when available.
          title: Cache Read
        cache_write:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M input tokens written to cache, when available.
          title: Cache Write
        long_context:
          anyOf:
            - $ref: '#/components/schemas/ExploreCostValuesV1'
            - type: 'null'
          default: null
          description: >-
            Prices for long-context requests, when the provider tiers by context
            length.
      title: ExploreCostV1
      type: object
    ExploreCostValuesV1:
      properties:
        input:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M input tokens, when available.
          title: Input
        output:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M output tokens, when available.
          title: Output
        cache_read:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M input tokens read from cache, when available.
          title: Cache Read
        cache_write:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: USD per 1M input tokens written to cache, when available.
          title: Cache Write
      title: ExploreCostValuesV1
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <api_key>`. The legacy `Authorization:
        Api-Key <api_key>` scheme is also accepted.

````