---
title: "Create a model policy"
method: POST
path: "/orgs/{org_id}/models/policies"
tags: ["orgs"]
---

# Create a model policy

`POST /orgs/{org_id}/models/policies`

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

## Path parameters

- `org_id` string, required

## Request body

- CreateModelPolicyBody — Request body for `POST /orgs/{org_id}/models/policies`.
  - `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_id` string, nullable — Model to target. Omit to target every model of the provider.
  - `provider` string, required — Model provider slug, e.g. `byteplus`, `openai`.

## Response `201`

Policy rule created

- ModelPolicy — An organization policy rule restricting LLM provider or model usage.
  - `created_at` string, date-time, required
  - `created_by_user_id` string, 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.
  - `id` string, required
  - `model_id` string, nullable — Model targeted by the rule. Omitted when the rule covers the whole provider.
  - `provider` string, required — Model provider slug, e.g. `byteplus`, `openai`.

## Other responses

- `400` — Bad request
- `403` — Forbidden
- `409` — Rule already exists

## Changes

- **2026-07-17** `33e77c7fd113` — 1 info
  - endpoint added
- **2026-03-16** `eb2c08128881` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/timbal-ai/apis/timbal-platform-api/changes/orgs/:org_id/models/policies/post.md)

---

[API](https://skmtc.dev/timbal-ai/apis/timbal-platform-api.md) · [All operations](https://skmtc.dev/timbal-ai/apis/timbal-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/timbal-ai/timbal-platform-api/revisions/dd7e398ce0d3/schema)
