> ## 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 your Loops user config

> Updates the caller's Loops user config using JSON Merge Patch (RFC 7396) semantics per field: omit a field to leave it unchanged, send null to clear (inherit the org-level allowlist), or send a list to set the allowlist. Empty lists are rejected.



## OpenAPI

````yaml patch /v1/loops/user_config
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/loops/user_config:
    patch:
      summary: Patches the caller's Loops user config
      description: >-
        Updates the caller's Loops user config using JSON Merge Patch (RFC 7396)
        semantics per field: omit a field to leave it unchanged, send null to
        clear (inherit the org-level allowlist), or send a list to set the
        allowlist. Empty lists are rejected.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchLoopsUserConfigRequestV1'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchLoopsUserConfigResponseV1'
      x-codeSamples:
        - lang: bash
          source: |-
            curl --request PATCH \
            --url https://api.baseten.co/v1/loops/user_config \
            --header "Authorization: Bearer $BASETEN_API_KEY" \
            --data '{
              "trainer_accelerator_priority": [
                "H100",
                "H200"
              ],
              "sampler_accelerator_priority": [
                "H100",
                "H200"
              ]
            }'
        - lang: python
          source: |-
            import requests
            import os
            API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")
            url = "https://api.baseten.co/v1/loops/user_config"

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

            response = requests.request(
                "PATCH",
                url,
                headers=headers,
                json={'trainer_accelerator_priority': ['H100', 'H200'], 'sampler_accelerator_priority': ['H100', 'H200']}
            )

            print(response.text)
components:
  schemas:
    PatchLoopsUserConfigRequestV1:
      description: |-
        Request body for ``PATCH /v1/loops/user_config``.

        Follows JSON Merge Patch (RFC 7396) semantics per field: omit the field
        to leave it unchanged, send ``null`` to clear and inherit the org-level
        allowlist, send a list to set the allowlist. Empty lists are rejected
        because the storage layer normalizes ``null`` and ``[]`` identically, so
        accepting both would create two ways to spell the same intent.
      properties:
        trainer_accelerator_priority:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          description: >-
            Ordered list of GPU types for trainer deployments, highest priority
            first. Send a list to set; send null to clear (inherit org
            allowlist); omit to leave unchanged. Empty list is rejected.
          examples:
            - - H100
              - H200
          title: Trainer Accelerator Priority
          x-null-distinct: true
        sampler_accelerator_priority:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          description: >-
            Ordered list of GPU types for sampler deployments, highest priority
            first. Send a list to set; send null to clear (inherit org
            allowlist); omit to leave unchanged. Empty list is rejected.
          examples:
            - - H100
              - H200
          title: Sampler Accelerator Priority
          x-null-distinct: true
      title: PatchLoopsUserConfigRequestV1
      type: object
    PatchLoopsUserConfigResponseV1:
      description: Response for ``PATCH /v1/loops/user_config``.
      properties:
        user_config:
          $ref: '#/components/schemas/LoopsUserConfigV1'
          description: The updated Loops user config.
      required:
        - user_config
      title: PatchLoopsUserConfigResponseV1
      type: object
    LoopsUserConfigV1:
      description: The caller's Loops user-level config (accelerator priorities).
      properties:
        trainer_accelerator_priority:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            Ordered allowlist of GPU types for your Loops trainer deployments,
            highest priority first. Intersected with the org-level allowlist
            (org acts as a ceiling). Null means 'inherit the org-level
            allowlist'.
          examples:
            - - H100
              - H200
          title: Trainer Accelerator Priority
        sampler_accelerator_priority:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            Ordered allowlist of GPU types for your Loops sampler deployments,
            highest priority first. Intersected with the org-level allowlist
            (org acts as a ceiling). Null means 'inherit the org-level
            allowlist'.
          examples:
            - - H100
              - H200
          title: Sampler Accelerator Priority
      required:
        - trainer_accelerator_priority
        - sampler_accelerator_priority
      title: LoopsUserConfigV1
      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.

````