Update LLM gateway settings in project
Changes the LLM gateway's settings of an organization or a project. The body is a JSON merge patch (RFC 7396), sent as application/merge-patch+json: a setting left out keeps its value, null unsets it, so that it takes what the level above makes apply, and a value replaces it, a list's whole. With If-Match, the update fails with failed_precondition, as 412, if the settings changed since it was read.
Changes the LLM gateway's settings of an organization or a project.
The body is a JSON merge patch (RFC 7396), sent as application/merge-patch+json: a setting left out keeps its value, null unsets it, so that it takes what the level above makes apply, and a value replaces it, a list's whole. With If-Match, the update fails with failed_precondition, as 412, if the settings changed since it was read.
bearerAuthorizationBearer <token>An access token, or an API key.
project*stringThe project's ID.
^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$If-Match?stringThe ETag of the settings as they were read: the update fails with failed_precondition, as 412, if they changed since.
application/merge-patch+json- body
monthlySpendLimit?|The most that requests here may cost in a calendar month (UTC), in US dollars, from $0 to $1,000,000,000, or null for no limit.
OK
application/json- response
effective*What the level above makes apply, which a setting unset here takes: for a project, its organization's effective settings; for an organization, kosem's defaults.
inherited*What the level above makes apply, which a setting unset here takes: for a project, its organization's effective settings; for an organization, kosem's defaults.
monthlySpendLimit?The most that requests here may cost in a calendar month (UTC), in US dollars; absent while unset, which is no limit. An organization's limit counts all of its projects, and a project's only itself. Once a limit is reached, the gateway refuses requests until the month ends; requests already running may go a little past it. Only models whose prices kosem knows count.
name*stringResource name, organizations/{organization_id}/settings/llmGateway or projects/{project_id}/settings/llmGateway.
updateTime?stringWhen the settings set here last changed; absent if they never did.
date-timecurl -X PATCH 'https://api.kosem.ai/v1/projects/string/settings/llmGateway' \
-H 'Content-Type: application/merge-patch+json' \
-d '{}'{
"effective": {
"monthlySpendLimit": {
"source": "organization",
"value": {
"currencyCode": "string",
"nanos": -999999999,
"units": 0
}
}
},
"inherited": {
"monthlySpendLimit": {
"source": "organization",
"value": {
"currencyCode": "string",
"nanos": -999999999,
"units": 0
}
}
},
"monthlySpendLimit": {
"currencyCode": "string",
"nanos": -999999999,
"units": 0
},
"name": "string",
"updateTime": "2019-08-24T14:15:22Z"
}