Skip to main content
POST
/
admin
/
smart-models
/
preview
Preview a smart-model decision
curl --request POST \
  --url https://{organization_id}.platform.barndoor.ai/api/llm-gateway/admin/smart-models/preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model_alias": "<string>",
  "determiner_model_alias": "<string>",
  "slots": [
    {
      "model_alias": "<string>",
      "label": "<string>"
    }
  ],
  "text": "<string>",
  "description": "<string>",
  "enabled": true,
  "context_breakpoints": [
    123
  ],
  "determiner_input_max_chars": 123,
  "default_slot_on_failure": 123,
  "endpoint": "/v1/chat/completions",
  "requires_tools": false,
  "requires_vision": false,
  "token_count": 123
}
'
{
  "target_model_alias": "<string>",
  "decision": {}
}

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.

Body

application/json
model_alias
string
required
determiner_model_alias
string
required
slots
object[]
required
Minimum array length: 1
text
string
required

Sample request body the determiner should classify

description
string
enabled
boolean
default:true
context_breakpoints
integer[]
determiner_input_max_chars
integer
default_slot_on_failure
integer
endpoint
string
default:/v1/chat/completions
requires_tools
boolean
default:false
requires_vision
boolean
default:false
token_count
integer

Optional override for the estimated token count

Response

The slot the determiner picked and the resolved alias

target_model_alias
string
decision
object

Routing decision details (slot index, classifier output, etc.)