v51

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01206322659.2 KB
orgs

Create a model policy

Create a rule restricting which LLM providers or models the organization can use.

post/orgs/{org_id}/models/policies

Path parameters

org_idstring required

Request body

effect'allow' | 'deny'

Whether a policy rule allows or denies its target. A model-level rule beats a provider-level rule; deny beats allow at the same specificity.

model_idstring nullable

Model to target. Omit to target every model of the provider.

providerstring required

Model provider slug, e.g. byteplus, openai.

Response

Policy rule created

created_atstring date-time required
created_by_user_idstring nullable

User who created the rule.

effect'allow' | 'deny' required

Whether a policy rule allows or denies its target. A model-level rule beats a provider-level rule; deny beats allow at the same specificity.

idstring required
model_idstring nullable

Model targeted by the rule. Omitted when the rule covers the whole provider.

providerstring required

Model provider slug, e.g. byteplus, openai.