http
PATCH /accounts/{account_id}/inference-policyUpdate the models an account allows and denies and its default model, replacing each key sent; returns the policy. Requires account.settings.manage.
Servers
JSON
1[2 {3 "url": "https://api.veryfront.com"4 }5]Authentication
JSON
1[2 {3 "bearerAuth": []4 },5 {6 "apiKeyAuth": []7 }8]JSON
1{2 "bearerAuth": {3 "type": "http",4 "scheme": "bearer",5 "bearerFormat": "JWT or API Key",6 "description": "Use a JWT bearer token or a Veryfront API key in the `Authorization` header."7 },8 "apiKeyAuth": {9 "type": "apiKey",10 "in": "header",11 "name": "X-API-Key",12 "description": "Alternative API key header for `vf_<prefix>_<secret>` tokens."13 }14}Parameters
| Name | Location | Required | Description |
|---|---|---|---|
| account_id | path | Yes |
Parameter contracts
JSON
1[2 {3 "schema": {4 "type": "string",5 "format": "uuid"6 },7 "required": true,8 "name": "account_id",9 "in": "path"10 }11]Request body
JSON
1{2 "required": true,3 "content": {4 "application/json": {5 "schema": {6 "type": "object",7 "properties": {8 "models": {9 "type": "object",10 "properties": {11 "allowed": {12 "type": [13 "array",14 "null"15 ],16 "items": {17 "type": "string",18 "minLength": 1,19 "maxLength": 200,20 "pattern": "^[a-z0-9][a-z0-9._/-]*$",21 "description": "Model ID returned by list_models. Known catalog aliases are normalized to canonical IDs. Policy IDs use letters, digits, dots, underscores, slashes, and hyphens; arbitrary provider model strings are not accepted."22 },23 "maxItems": 500,24 "description": "Model IDs from list_models the account allows. Null removes the restriction; an empty list allows nothing. Omit to keep the stored list."25 },26 "denied": {27 "type": "array",28 "items": {29 "type": "string",30 "minLength": 1,31 "maxLength": 200,32 "pattern": "^[a-z0-9][a-z0-9._/-]*$",33 "description": "Model ID returned by list_models. Known catalog aliases are normalized to canonical IDs. Policy IDs use letters, digits, dots, underscores, slashes, and hyphens; arbitrary provider model strings are not accepted."34 },35 "maxItems": 500,36 "description": "Model IDs from list_models the account denies. A denial overrides an allowance. Omit to keep the stored list."37 }38 },39 "additionalProperties": false,40 "description": "Models the account allows and denies. Every project of the account can only narrow them."41 },42 "default_model": {43 "type": [44 "string",45 "null"46 ],47 "minLength": 1,48 "maxLength": 200,49 "pattern": "^[a-z0-9][a-z0-9._/-]*$",50 "description": "Default model of projects that set none. It must be allowed by the policy. Null uses the built-in default. Omit to keep the stored value."51 }52 },53 "additionalProperties": false54 }55 }56 }57}Responses
200
The account inference policy after the update. Requires a signed-in account owner or admin. API keys are rejected regardless of their scopes.
JSON
1{2 "description": "The account inference policy after the update. Requires a signed-in account owner or admin. API keys are rejected regardless of their scopes.",3 "content": {4 "application/json": {5 "schema": {6 "$ref": "#/components/schemas/AccountInferencePolicy"7 }8 }9 }10}400
Bad request
JSON
1{2 "description": "Bad request",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}401
Unauthorized
JSON
1{2 "description": "Unauthorized",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}403
Requires a signed-in session as the account owner or an admin with account.settings.manage. API keys are refused whatever their scopes, so no API key scope grants access.
JSON
1{2 "description": "Requires a signed-in session as the account owner or an admin with `account.settings.manage`. API keys are refused whatever their scopes, so no API key scope grants access.",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}404
Not found
JSON
1{2 "description": "Not found",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}422
A model in models.allowed or default_model is retired (model-retired). The Problem detail names its successor; nothing is saved.
JSON
1{2 "description": "A model in `models.allowed` or `default_model` is retired (`model-retired`). The Problem detail names its successor; nothing is saved.",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}500
Server error
JSON
1{2 "description": "Server error",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}Referenced contracts
components/schemas/AccountInferencePolicy
JSON
1{2 "type": "object",3 "properties": {4 "account_id": {5 "type": "string",6 "format": "uuid"7 },8 "models": {9 "type": "object",10 "properties": {11 "allowed": {12 "type": [13 "array",14 "null"15 ],16 "items": {17 "type": "string"18 },19 "description": "Canonical model IDs that may be used. Null means no restriction; an empty list allows nothing."20 },21 "denied": {22 "type": "array",23 "items": {24 "type": "string"25 },26 "description": "Canonical model IDs that may not be used. A denial overrides an allowance; an empty list denies nothing."27 }28 },29 "required": [30 "allowed",31 "denied"32 ],33 "description": "Models the account allows and denies. Every project of the account inherits them and can only narrow them."34 },35 "default_model": {36 "type": [37 "string",38 "null"39 ],40 "description": "Default model ID. Null uses the built-in default, mistral/mistral-small-2503. A project default wins over the account default."41 }42 },43 "required": [44 "account_id",45 "models",46 "default_model"47 ]48}components/schemas/Problem
JSON
1{2 "type": "object",3 "properties": {4 "cause": {5 "type": "string",6 "enum": [7 "schedule_concurrency_forbidden",8 "schedule_fire_in_progress",9 "schedule_run_limit_reached"10 ],11 "description": "Schedule admission refusal."12 },13 "idempotency": {14 "type": "object",15 "properties": {16 "state": {17 "type": "string",18 "enum": [19 "in_progress",20 "payload_mismatch",21 "outcome_unknown"22 ]23 },24 "operation": {25 "type": "string",26 "minLength": 127 },28 "retryable": {29 "type": "boolean"30 },31 "retry_after_seconds": {32 "type": [33 "integer",34 "null"35 ],36 "minimum": 037 },38 "expires_at": {39 "type": [40 "string",41 "null"42 ]43 },44 "recovery": {45 "type": "object",46 "properties": {47 "available": {48 "type": "boolean"49 },50 "description": {51 "type": "string"52 },53 "resource_url": {54 "type": "string"55 }56 },57 "required": [58 "available",59 "description"60 ]61 }62 },63 "required": [64 "state",65 "operation",66 "retryable",67 "retry_after_seconds",68 "expires_at"69 ],70 "description": "Replay status, retry timing, and recovery lookup."71 },72 "type": {73 "type": "string",74 "description": "URI reference identifying the problem type",75 "example": "https://api.veryfront.com/errors/validation-failed"76 },77 "title": {78 "type": "string",79 "description": "Short human-readable summary of the problem",80 "example": "Validation Failed"81 },82 "status": {83 "type": "integer",84 "minimum": 100,85 "maximum": 599,86 "description": "HTTP status code",87 "example": 40088 },89 "code": {90 "type": "string",91 "description": "Stable machine-readable error code",92 "example": "RUN_INVALID_INPUT"93 },94 "detail": {95 "type": "string",96 "description": "Human-readable explanation specific to this occurrence",97 "example": "The 'email' field must be a valid email address"98 },99 "instance": {100 "type": "string",101 "description": "URI reference identifying the specific occurrence",102 "example": "/projects/my-project/members"103 },104 "slug": {105 "type": "string",106 "description": "Stable identifier for the problem type",107 "example": "validation-failed"108 },109 "category": {110 "type": "string",111 "enum": [112 "AUTH",113 "RESOURCE",114 "VALIDATION",115 "DATABASE",116 "SUBSCRIPTION",117 "INTEGRATION",118 "INTERNAL"119 ],120 "description": "API error category",121 "example": "VALIDATION"122 },123 "suggestion": {124 "type": "string",125 "description": "Suggested action to resolve the problem",126 "example": "Check the request body and query parameters against the API documentation."127 },128 "errors": {129 "type": "array",130 "items": {131 "type": "object",132 "properties": {133 "field": {134 "type": "string",135 "description": "Field path that caused the error",136 "example": "email"137 },138 "message": {139 "type": "string",140 "description": "Error message for this field",141 "example": "Invalid email format"142 },143 "code": {144 "type": "string",145 "description": "Error code for this field",146 "example": "INVALID_FORMAT"147 }148 },149 "required": [150 "field",151 "message"152 ]153 },154 "description": "Detailed field-level errors for validation failures"155 }156 },157 "required": [158 "type",159 "title",160 "status"161 ]162}Operation contract
JSON
1{2 "operationId": "updateAccountInferencePolicy",3 "tags": [4 "ai-gateway/Models/Account inference policy"5 ],6 "summary": "Update account inference policy",7 "description": "Update the models an account allows and denies and its default model, replacing each key sent; returns the policy. Requires account.settings.manage.",8 "parameters": [9 {10 "schema": {11 "type": "string",12 "format": "uuid"13 },14 "required": true,15 "name": "account_id",16 "in": "path"17 }18 ],19 "requestBody": {20 "required": true,21 "content": {22 "application/json": {23 "schema": {24 "type": "object",25 "properties": {26 "models": {27 "type": "object",28 "properties": {29 "allowed": {30 "type": [31 "array",32 "null"33 ],34 "items": {35 "type": "string",36 "minLength": 1,37 "maxLength": 200,38 "pattern": "^[a-z0-9][a-z0-9._/-]*$",39 "description": "Model ID returned by list_models. Known catalog aliases are normalized to canonical IDs. Policy IDs use letters, digits, dots, underscores, slashes, and hyphens; arbitrary provider model strings are not accepted."40 },41 "maxItems": 500,42 "description": "Model IDs from list_models the account allows. Null removes the restriction; an empty list allows nothing. Omit to keep the stored list."43 },44 "denied": {45 "type": "array",46 "items": {47 "type": "string",48 "minLength": 1,49 "maxLength": 200,50 "pattern": "^[a-z0-9][a-z0-9._/-]*$",51 "description": "Model ID returned by list_models. Known catalog aliases are normalized to canonical IDs. Policy IDs use letters, digits, dots, underscores, slashes, and hyphens; arbitrary provider model strings are not accepted."52 },53 "maxItems": 500,54 "description": "Model IDs from list_models the account denies. A denial overrides an allowance. Omit to keep the stored list."55 }56 },57 "additionalProperties": false,58 "description": "Models the account allows and denies. Every project of the account can only narrow them."59 },60 "default_model": {61 "type": [62 "string",63 "null"64 ],65 "minLength": 1,66 "maxLength": 200,67 "pattern": "^[a-z0-9][a-z0-9._/-]*$",68 "description": "Default model of projects that set none. It must be allowed by the policy. Null uses the built-in default. Omit to keep the stored value."69 }70 },71 "additionalProperties": false72 }73 }74 }75 },76 "responses": {77 "200": {78 "description": "The account inference policy after the update. Requires a signed-in account owner or admin. API keys are rejected regardless of their scopes.",79 "content": {80 "application/json": {81 "schema": {82 "$ref": "#/components/schemas/AccountInferencePolicy"83 }84 }85 }86 },87 "400": {88 "description": "Bad request",89 "content": {90 "application/problem+json": {91 "schema": {92 "$ref": "#/components/schemas/Problem"93 }94 }95 }96 },97 "401": {98 "description": "Unauthorized",99 "content": {100 "application/problem+json": {101 "schema": {102 "$ref": "#/components/schemas/Problem"103 }104 }105 }106 },107 "403": {108 "description": "Requires a signed-in session as the account owner or an admin with `account.settings.manage`. API keys are refused whatever their scopes, so no API key scope grants access.",109 "content": {110 "application/problem+json": {111 "schema": {112 "$ref": "#/components/schemas/Problem"113 }114 }115 }116 },117 "404": {118 "description": "Not found",119 "content": {120 "application/problem+json": {121 "schema": {122 "$ref": "#/components/schemas/Problem"123 }124 }125 }126 },127 "422": {128 "description": "A model in `models.allowed` or `default_model` is retired (`model-retired`). The Problem detail names its successor; nothing is saved.",129 "content": {130 "application/problem+json": {131 "schema": {132 "$ref": "#/components/schemas/Problem"133 }134 }135 }136 },137 "500": {138 "description": "Server error",139 "content": {140 "application/problem+json": {141 "schema": {142 "$ref": "#/components/schemas/Problem"143 }144 }145 }146 }147 },148 "x-documentation-source-tag": "Account inference policy",149 "x-canonical-documentation": {150 "domain": "ai-gateway",151 "resource": "Models",152 "subgroup": "Account inference policy",153 "name": "Update account inference policy",154 "description": "Update the models an account allows and denies and its default model, replacing each key sent; returns the policy. Requires account.settings.manage.",155 "operationId": "updateAccountInferencePolicy"156 },157 "x-mint": {158 "href": "/cloud/rest/api-reference/ai-gateway-models-account-inference-policy/update-account-inference-policy"159 }160}