Skip to main content
GET
/
admin
/
smart-models
List smart-model policies
curl --request GET \
  --url https://{organization_id}.platform.barndoor.ai/api/llm-gateway/admin/smart-models \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "model_alias": "smart-coder",
    "enabled": true,
    "determiner_model_alias": "gpt-4o-mini",
    "slots": [
      {
        "model_alias": "<string>",
        "label": "<string>"
      }
    ],
    "context_breakpoints": [
      4000,
      32000
    ],
    "determiner_input_max_chars": 2000,
    "default_slot_on_failure": 123,
    "description": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
]

Authorizations

Authorization
string
header
required

JWT obtained through Barndoor's authentication flow. Pass the token verbatim in Authorization: Bearer <token>. Use the Barndoor SDK's loginInteractive() helper to obtain a token in scripts and notebooks.

Response

200 - application/json

List of smart-model policies

id
string<uuid>
required
org_id
string<uuid>
required
model_alias
string
required

The new alias clients call (must not collide with existing routes)

Example:

"smart-coder"

enabled
boolean
required
determiner_model_alias
string
required

The model the gateway uses to classify each request

Example:

"gpt-4o-mini"

slots
object[]
required
Minimum array length: 1
context_breakpoints
integer[]
required

Token counts at which the determiner switches between slots

Example:
[4000, 32000]
determiner_input_max_chars
integer
required
Example:

2000

default_slot_on_failure
integer
required

Slot index used when the determiner fails or times out

description
string | null
created_at
string<date-time>
updated_at
string<date-time>