Update Directives
BetaWe just launched Apps: hosted models, actions and pages, on the same bill as your inference.Read the Apps docs

Update Directives

PATCHhttps://api.inferencebureau.com/v1/projects/{id}/directives

Change a project's, environment's or key's Directives, based on the policy_version you read. A stale version is refused with 409 and nothing changes. Also /v1/environments/{id}/directives and /v1/keys/{id}/directives.

Body

application/json; directives or set, not both
  • policy_versionintegerrequired

    The version you read. It moves on by one with each change.

  • directivesobjectoptional

    The whole level, replacing what is there. {} clears it.

  • setobjectoptional

    Single fields by path, keeping everything else, as the console's table edits do: allowedModels, limits.requestsPerMinute, budget.monthlyUsd, alerts.budgetPercentages… null clears a field. One tag budget is tagBudgets.inference-bureau-search (the whole entry; null removes it) or tagBudgets.inference-bureau-search.monthlyUsd; other tags are kept. One alias is aliases.org/fast, set to a model id or a preset (null removes it); other aliases are kept. allowedModels takes model ids and vendor/*. A preset may carry deprecatedAt (YYYY-MM-DD, UTC) and replacedBy (another alias or a model id) to retire the alias.

Notes

  • Validationoptional

    Exactly as in the console: unknown fields, unknown routing profiles, uncertified fallback models, allowed models that are neither an id nor vendor/*, and an alias replaced by itself or by an uncertified model are refused with 400 invalid_request. alerts.lowBalanceUsd is set in the team's Directives, so projects, environments and keys refuse it. Revoked and expired keys can't change.

  • Conflictsoptional

    409 version_conflict when the level changed since you read it, in the console or the API. Read it again and reapply.

  • Auditoptional

    A policy.update event with the policy before and after.