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

# Create the safe default Claude launch setup for a login provider

> Creates a Model Route per current Claude model on the login provider, first enabling the newest catalog Opus, Sonnet, Haiku or Fable model on it when nothing in that family is enabled (`models_enabled` lists them; the organization's pricing requirement applies). Because a login (seat) token works only for Claude Code, each route it creates that has no fallback behind it yet also gets a lower-priority fallback target on the first enabled API-key, Bedrock, Vertex or Foundry provider (by name) that has the same model enabled; `routes[].fallback_provider` names it. A route that already exists with only login-token targets gets the same fallback (never a second one), and `fallback_provider` reports the fallback a route already has. Routes left with only login-token targets are returned in `warnings` (code `seat_only_route`).



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/llm-gateway/admin/agent-runtime-profiles/default-setup
openapi: 3.1.0
info:
  title: Barndoor.ai Public API
  description: Unified public API specification for Barndoor.ai platform
  version: 2.18.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/agent-runtime-profiles/default-setup:
    post:
      tags:
        - llm-gateway
      summary: Create the safe default Claude launch setup for a login provider
      description: >-
        Creates a Model Route per current Claude model on the login provider,
        first enabling the newest catalog Opus, Sonnet, Haiku or Fable model on
        it when nothing in that family is enabled (`models_enabled` lists them;
        the organization's pricing requirement applies). Because a login (seat)
        token works only for Claude Code, each route it creates that has no
        fallback behind it yet also gets a lower-priority fallback target on the
        first enabled API-key, Bedrock, Vertex or Foundry provider (by name)
        that has the same model enabled; `routes[].fallback_provider` names it.
        A route that already exists with only login-token targets gets the same
        fallback (never a second one), and `fallback_provider` reports the
        fallback a route already has. Routes left with only login-token targets
        are returned in `warnings` (code `seat_only_route`).
      operationId: create_default_setup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DefaultSetupRequest'
        required: true
      responses:
        '200':
          description: The routes and launch profile created or already present
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultSetupResponse'
        '400':
          description: >-
            The provider or its model catalog cannot support the default setup,
            a model alias is already routed on another provider, or a model the
            setup would enable has no pricing while the organization requires
            it; nothing is changed
        '401':
          description: Missing or invalid credentials
        '403':
          description: Caller is not permitted to act on this resource in this organization
        '404':
          description: No such provider in this organization
        '503':
          description: Governance config read timed out; safe to retry
components:
  schemas:
    DefaultSetupRequest:
      type: object
      required:
        - provider_id
        - client
      properties:
        client:
          type: string
        provider_id:
          type: string
          format: uuid
    DefaultSetupResponse:
      type: object
      required:
        - routes
        - profile
        - policies_needing_update
        - models_enabled
        - warnings
      properties:
        models_enabled:
          type: array
          items:
            type: string
          description: >-
            Models this run enabled on the login provider because nothing in
            their

            family (Opus, Sonnet, Haiku, Fable) was enabled there.
        policies_needing_update:
          type: array
          items:
            $ref: '#/components/schemas/PolicyNeedingUpdate'
        profile:
          $ref: '#/components/schemas/DefaultSetupProfile'
        routes:
          type: array
          items:
            $ref: '#/components/schemas/DefaultSetupRoute'
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/ProfileGuardrailFinding'
          description: >-
            `seat_only_route` warnings for the setup's routes that still have
            only

            seat-token targets that serve after this run: a route this run
            created

            found no enabled API-key, Bedrock, Vertex or Foundry provider with
            the

            model; the route already existed with no non-seat target; or its

            existing fallback does not serve (switched off, or its provider or
            model

            is off), which the setup leaves for the admin to fix.
    PolicyNeedingUpdate:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
    DefaultSetupProfile:
      type: object
      required:
        - slug
        - created
        - is_org_default
        - preferences_seeded
      properties:
        created:
          type: boolean
          description: >-
            True when no settings row existed for the client and this run
            created it.
        is_org_default:
          type: boolean
        preferences_seeded:
          type: boolean
          description: >-
            True when this run wrote the setup's models as the settings'

            preferences (a new row, or a row whose preferences were empty).
            False

            when existing preferences were left alone.
        slug:
          type: string
    DefaultSetupRoute:
      type: object
      required:
        - alias
        - created
      properties:
        alias:
          type: string
        created:
          type: boolean
        fallback_provider:
          type:
            - string
            - 'null'
          description: >-
            The non-seat provider (API key, Bedrock, Vertex, Foundry) behind the

            route as its fallback target, so clients other than Claude Code are
            not

            refused by Anthropic: one this run added, or one the route already
            had.

            Null when the route has none, or when its fallback does not serve
            (switched off, or its provider or model is off): that route is in
            `warnings`.
    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.