curl --request POST \
--url https://api.timbal.ai/orgs/{org_id}/models/policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "byteplus"
}
'{
"created_at": "2023-11-07T05:31:56Z",
"effect": "allow",
"id": "<string>",
"provider": "<string>",
"created_by_user_id": "<string>",
"model_id": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Model Policies
Create Model Policy
Create a rule restricting which LLM providers or models the organization can use.
POST
/
orgs
/
{org_id}
/
models
/
policies
curl --request POST \
--url https://api.timbal.ai/orgs/{org_id}/models/policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "byteplus"
}
'{
"created_at": "2023-11-07T05:31:56Z",
"effect": "allow",
"id": "<string>",
"provider": "<string>",
"created_by_user_id": "<string>",
"model_id": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Authorizations
Timbal API key. Obtain your API key from the Timbal platform settings. See Authentication for more information.
Path Parameters
Body
application/json
Response
Policy rule created
An organization policy rule restricting LLM provider or model usage.
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.
Available options:
allow, deny Model provider slug, e.g. byteplus, openai.
User who created the rule.
Model targeted by the rule. Omitted when the rule covers the whole provider.