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

# List the organization's routing policys



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/llm-gateway/admin/routing-policies
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/routing-policies:
    get:
      tags:
        - llm-gateway
      summary: List the organization's routing policys
      operationId: list_routing_policies
      responses:
        '200':
          description: The requested record
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoutingPolicy'
        '401':
          description: Missing or invalid credentials
        '403':
          description: Caller is not permitted to act on this resource in this organization
components:
  schemas:
    RoutingPolicy:
      type: object
      required:
        - id
        - org_id
        - model_alias
        - enabled
        - posture
        - slots
        - context_breakpoints
        - router_input_max_chars
        - default_slot_on_failure
        - created_at
        - updated_at
      properties:
        context_breakpoints:
          type: array
          items:
            type: integer
            format: int32
        created_at:
          type: string
          format: date-time
        default_slot_on_failure:
          type: integer
          format: int32
        description:
          type:
            - string
            - 'null'
        determiner_model_alias:
          type:
            - string
            - 'null'
          description: >-
            The model that picks a slot. Optional because a policy may be saved
            before

            one is chosen; the picker falls back to the context-size floor when
            it

            is absent. Either a chat model that supports JSON-mode output, or a
            Jev

            classifier model (TypeSafe, or OpenRouter's `typesafe/` models),
            which

            is asked on System One instead of prompted for JSON.
        determiner_prompt:
          type:
            - string
            - 'null'
          description: >-
            Optional override for the determiner's instruction preamble. `None`

            (or empty) falls back to the built-in default (see
            `routing::determiner`).

            The slot catalog, request-metadata block, and JSON-output schema are

            always appended by the gateway so the structured-output contract
            holds

            regardless of what an admin writes here. Not used by a Jev
            determiner,

            whose questions carry their own instructions.
        enabled:
          type: boolean
        id:
          type: string
          format: uuid
        model_alias:
          type: string
        org_id:
          type: string
          format: uuid
        posture:
          $ref: '#/components/schemas/Posture'
          description: How eagerly this policy steps up when the router is unsure.
        router_input_max_chars:
          type: integer
          format: int32
        slots:
          type: array
          items:
            $ref: '#/components/schemas/RoutingSlot'
        updated_at:
          type: string
          format: date-time
    Posture:
      type: string
      description: >-
        Which way a policy leans when the router is genuinely unsure.


        Passed to the router as an instruction, not as a separate code path —
        there

        is one picker, and posture only shifts how it resolves uncertainty. It
        never

        overrides a rule floor, a rule ban, or the caller's model access; those
        are

        applied in code afterwards.
      enum:
        - savings
        - balanced
        - quality
    RoutingSlot:
      type: object
      required:
        - model_alias
      properties:
        description:
          type:
            - string
            - 'null'
          description: >-
            Free-text routing guidance shown to the determiner — e.g. "code and

            debugging" or "long-form writing". Helps the determiner pick this
            slot

            by purpose, not just by index/label. Stored inside the `slots`
            JSONB,

            so no column/migration is needed.
        label:
          type:
            - string
            - 'null'
        model_alias:
          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.