Skip to main content
GET
List the organization's model mappings

Authorizations

Authorization
string
header
required

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.

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.

Response

The requested record

cooldown_429_default_secs
integer<int32>
required

Cooldown on a 429 with no usable Retry-After, seconds.

cooldown_base_secs
integer<int32>
required

First cooldown window, doubled on each failed recovery probe up to cooldown_max_secs.

cooldown_failure_threshold
integer<int32>
required

Gateway failures within cooldown_window_secs that cool the route. 0 disables every cooldown of the shared route.

cooldown_max_secs
integer<int32>
required

Cap on every cooldown window.

cooldown_overloaded_secs
integer<int32>
required

Flat cooldown on a 529 "overloaded" with no usable Retry-After, seconds. 0 counts a 529 as an ordinary gateway failure instead.

cooldown_window_secs
integer<int32>
required

Width of the rolling failure window, seconds.

bare_alias
boolean
required
created_at
string<date-time>
required

When this mapping was created. Rows predating the column are backfilled from the owning provider — see migration V58.

enabled
boolean
required
id
string<uuid>
required
kind
enum<string>
required

See [ModelMapping::kind].

Available options:
model,
route
model_alias
string
required
priority
integer<int32>
required
provider_auth_type
string
required
provider_id
string<uuid>
required
provider_name
string
required
retry_on_429_count
integer<int32>
required
retry_on_429_max_wait_secs
integer<int32>
required
source
enum<string>
required

See [ModelMapping::source].

Available options:
catalog,
custom
upstream_model
string
required
effective_pricing
object
required

The rate a request against a given mapping would be billed at, plus which tier produced it.

source is always present. Every other field is None when source == "none" — meaning no rule and no Barndoor default covers this model, so requests succeed but record $0. The rates are deliberately nullable rather than zero-filled: a UI that renders $0.00 for an unpriced model reads as "this model is free", which is exactly the wrong conclusion.

Clients distinguish four states:

  • field absent entirely → backend predates this annotation
  • source == "none" → unpriced, bills at $0 because the rate is unknown
  • source == "provider_reported" → bills what the provider reports per request (BCP-4543, OpenRouter). No rates: the price varies per request.
  • source == "not_metered" → bills at $0 by decision (BCP-3876): the provider's billing_mode is subscription, so no rate is consulted. Rates are None here too, but for the opposite reason, and the UI must not lump it in with "unpriced" — that bucket is a misconfiguration it nags about and offers to bulk-disable.
  • anything else → priced, input/output populated
created_by_email
string | null
created_by_name
string | null
created_by_user_id
string<uuid> | null
last_change_note
string | null

Optional free text explaining why the last change was made ("Raised for the Q3 batch job", "Vendor deprecated the old endpoint").

Admin-authored and rendered in the portal, so it is untrusted input: length-capped here, escaped on render.

last_modified_at
string<date-time> | null

When the change named by last_modified_by_* happened.

Its own column rather than the row's updated_at, because updated_at is bumped by writes nobody is attributed for -- pairing the two would date a named admin's edit to a background job's clock. See the V75 migration for the full reasoning.

last_modified_by_email
string | null
last_modified_by_name
string | null
last_modified_by_user_id
string<uuid> | null
auto_disabled_reason
enum<string> | null

See [ModelMapping::auto_disabled_reason].

Available options:
catalog_retired
request_timeout_secs
integer<int32> | null
stream_idle_timeout_secs
integer<int32> | null
budget_status
object | null

Per-mapping annotation: a budget that is currently blocking traffic for the (provider, upstream, alias) the mapping resolves to. Serialised as budget_status on each listing row.

route_health_status
object | null

Per-mapping annotation: the route is currently suspended by passive-health cooldown. Serialised as route_health_status on each listing row (omitted entirely when the route is healthy).

stale_status
object | null

See [ModelMappingWithBudgetStatus::stale_status].