policies

Create a policy (owner or admin only)

post/api/policies

Request

  • Base URL: https://www.spendline.ai
  • URL: https://www.spendline.ai/api/policies
  • Auth: API key in header x-spendline-key

Request body

idstring uuid
namestring required
type'model_block' | 'model_allow' | 'max_input_tokens' | 'max_output_tokens' required

model_block refuses the named model. model_allow is one ENTRY in an allow-list: every enabled model_allow row sharing one exact scope is one list, and a call must match some entry of every list that applies to it. Both judge the requested and the served model.

modelstring required

Model name to match. Stored lowercased.

match_mode'exact' | 'prefix' | 'contains'
valuenumber nullable

Required positive number for token-limit types. Null for model_block and model_allow.

enforcement'block' | 'warn'

Ignored for model_block and model_allow, which always block.

enabledboolean

Response

Created.

Changes

No recorded changes to this operation across all 1 revision of this API.