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

# Pin a Model Route into a client slot

> Sets (or replaces) the route that fills one launch slot of a client, overriding the automatic pick. Claude Code: `model` (Default), `ANTHROPIC_DEFAULT_OPUS_MODEL`, `ANTHROPIC_DEFAULT_SONNET_MODEL`, `ANTHROPIC_DEFAULT_HAIKU_MODEL`, `ANTHROPIC_DEFAULT_FABLE_MODEL`; Codex and Kilo Code: `model` only. The alias must be an enabled Model Route in the organization (a routing policy is accepted for a Claude Code or Kilo Code Default). A pin applies to a launch only when the person is allowed the route; otherwise the slot falls back to the automatic pick. The Advisor slot always follows the Opus slot.



## OpenAPI

````yaml /api-reference/openapi.yaml put /api/llm-gateway/admin/client-settings/{client}/slot-pins/{slot_key}
openapi: 3.1.0
info:
  title: Barndoor.ai Public API
  description: Unified public API specification for Barndoor.ai platform
  version: 2.38.0
servers:
  - url: https://{host}
    description: Barndoor public API
    variables:
      host:
        default: platform.barndoor.ai
        description: >-
          The host serving your Barndoor deployment. Defaults to production;
          override it for another environment or a dedicated deployment.
security:
  - ApiKey: []
  - OAuth2:
      - openid
      - profile
      - email
tags:
  - name: dlp
    x-group: Data Control Center
  - name: identity
    x-group: Identity
  - name: llm-gateway
    x-group: LLM Gateway
  - name: notification
    x-group: Notifications
  - name: policy
    x-group: Policies
  - name: registry
    x-group: MCP Gateway
  - name: system-management
    x-group: Log Exports
paths:
  /api/llm-gateway/admin/client-settings/{client}/slot-pins/{slot_key}:
    put:
      tags:
        - llm-gateway
      summary: Pin a Model Route into a client slot
      description: >-
        Sets (or replaces) the route that fills one launch slot of a client,
        overriding the automatic pick. Claude Code: `model` (Default),
        `ANTHROPIC_DEFAULT_OPUS_MODEL`, `ANTHROPIC_DEFAULT_SONNET_MODEL`,
        `ANTHROPIC_DEFAULT_HAIKU_MODEL`, `ANTHROPIC_DEFAULT_FABLE_MODEL`; Codex
        and Kilo Code: `model` only. The alias must be an enabled Model Route in
        the organization (a routing policy is accepted for a Claude Code or Kilo
        Code Default). A pin applies to a launch only when the person is allowed
        the route; otherwise the slot falls back to the automatic pick. The
        Advisor slot always follows the Opus slot.
      operationId: put_slot_pin
      parameters:
        - name: client
          in: path
          description: '`claude` (Claude Code), `codex` (Codex) or `kilo` (Kilo Code)'
          required: true
          schema:
            type: string
        - name: slot_key
          in: path
          description: >-
            The slot's launch config key (`model` or an
            `ANTHROPIC_DEFAULT_*_MODEL` key)
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutSlotPinRequest'
        required: true
      responses:
        '200':
          description: The saved pin and any non-blocking findings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlotPinResponse'
        '400':
          description: >-
            The slot is not pinnable for the client, the alias is not an enabled
            route in this organization, or the client cannot launch or serve it
            (`profile_guardrails` details)
        '401':
          description: Missing or invalid credentials
        '403':
          description: Caller is not permitted to act on this resource in this organization
        '404':
          description: Unknown client
components:
  schemas:
    PutSlotPinRequest:
      type: object
      required:
        - model_alias
      properties:
        change_note:
          type:
            - string
            - 'null'
          description: Optional note recorded on the audit event.
        model_alias:
          type: string
          description: |-
            The Model Route alias to pin into the slot. For a Default slot of
            Claude Code or Kilo Code a routing-policy alias is accepted too. A
            trailing `[1m]` is dropped.
    SlotPinResponse:
      type: object
      required:
        - pin
        - warnings
      properties:
        pin:
          $ref: '#/components/schemas/ClientSlotPin'
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/ProfileGuardrailFinding'
          description: >-
            Non-blocking findings: `family_mismatch` (a Claude family slot
            pinned

            to a route whose primary model is of another family) and

            `seat_only_route` for Claude Code.
    ClientSlotPin:
      type: object
      description: One pinned slot, as stored.
      required:
        - client
        - slot_key
        - model_alias
        - updated_at
      properties:
        client:
          type: string
          description: '`claude` (Claude Code), `codex` (Codex) or `kilo` (Kilo Code).'
        model_alias:
          type: string
          description: The pinned route (or, for a Default slot, routing policy) alias.
        slot_key:
          type: string
          description: >-
            The launch config key of the slot: `model` (Default) or an

            `ANTHROPIC_DEFAULT_*_MODEL` family key. Codex and Kilo Code only
            have

            `model`.
        updated_at:
          type: string
          format: date-time
        updated_by:
          type:
            - string
            - 'null'
          description: Who last set the pin (name or email), when known.
    ProfileGuardrailFinding:
      type: object
      required:
        - code
        - slot
        - alias
        - message
      properties:
        alias:
          type: string
        code:
          type: string
        message:
          type: string
        policies:
          type: array
          items:
            $ref: '#/components/schemas/GuardrailPolicyRef'
        slot:
          type: string
    GuardrailPolicyRef:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        A Barndoor API key, sent as `Authorization: Bearer <key>`. Keys are
        prefixed `bdai_` and are opaque — do not attempt to decode one.
        Interchangeable with an OAuth 2.0 access token.
    OAuth2:
      type: oauth2
      x-issuer: https://auth.barndoor.ai/realms/barndoor
      description: >-
        An OAuth 2.0 access token from Barndoor's identity provider, sent as
        `Authorization: Bearer <token>`. Public clients must use PKCE.
        Interchangeable with an API key.
      flows:
        authorizationCode:
          authorizationUrl: >-
            https://auth.barndoor.ai/realms/barndoor/protocol/openid-connect/auth
          tokenUrl: >-
            https://auth.barndoor.ai/realms/barndoor/protocol/openid-connect/token
          scopes:
            openid: Issue an OIDC ID token identifying the caller.
            profile: Read the caller's basic profile claims.
            email: Read the caller's email address.
            offline_access: Issue a refresh token. Optional — no operation requires it.
        clientCredentials:
          tokenUrl: >-
            https://auth.barndoor.ai/realms/barndoor/protocol/openid-connect/token
          scopes:
            openid: Issue an OIDC ID token identifying the caller.
            profile: Read the caller's basic profile claims.
            email: Read the caller's email address.
            offline_access: Issue a refresh token. Optional — no operation requires it.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.