Skip to content

Set or change the instance's own AI account

PUT
/api/platform/ai-account
curl --request PUT \
--url https://forge.example.com/api/platform/ai-account \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "vendor": "example", "model": "example", "identity": "example", "apiKey": "example", "workspaceId": "example", "region": "example", "monthlyTokens": 1, "reason": "example", "version": 1, "resourceName": "example", "deployment": "example", "project": "example", "endpoint": "example", "routineModel": "example", "routineDeployment": "example" }'

For an operator administrator, with a reason. A vendor this build can use, the model as the vendor names it, identity key (the default) or instance (the server’s own AWS identity, on Amazon Bedrock, when the server has one), the apiKey, the workspaceId for an Anthropic key made for a whole organization, the region for Amazon Bedrock, and monthlyTokens. The key is sealed with the instance’s own keys before it is stored, and never answered; left out, the key set here is kept for the same vendor. An account set here is in effect at once on every instance of the API, in place of the server’s settings. Send the version you read, 0 for the first: a stale one answers 409 with currentVersion.

Media typeapplication/json
object
vendor
required
string
model
required
string
identity
required
null | string
apiKey
required
null | string
workspaceId
required
null | string
region
required
null | string
monthlyTokens
required
null | integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
reason
required
string
version
required
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
resourceName
null | string
deployment
null | string
project
null | string
endpoint
null | string
routineModel
null | string
routineDeployment
null | string

Example generated

{
"vendor": "example",
"model": "example",
"identity": "example",
"apiKey": "example",
"workspaceId": "example",
"region": "example",
"monthlyTokens": 1,
"reason": "example",
"version": 1,
"resourceName": "example",
"deployment": "example",
"project": "example",
"endpoint": "example",
"routineModel": "example",
"routineDeployment": "example"
}

OK

Media typeapplication/json
object
inUse
required
string
account
required
One of:
null
console
required
One of:
null
consoleProblem
required
null | string
vendors
required
Array<object>
object
key
required
string
label
required
string
models
required
Array<object>
object
id
required
string
label
required
string
tested
required
boolean
retentionRequired
boolean
geography
null | string
available
required
boolean
identity
string
default: key
retention
null | string
retentionRequiredNote
null | string
regions
Array<object> | null
object
key
required
string
label
required
string
geography
required
string
identities
Array<string> | null
limits
Array<string> | null
deepDefault
null | string
routineDefault
null | string
reasoningAcrossModels
boolean
takesEffort
boolean
canKeepKeys
required
boolean
instanceIdentity
required
boolean
settingsMonthlyTokens
required
integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
version
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/

Example

{
"account": {
"key": {
"revealable": false
}
},
"console": {
"key": {
"revealable": false
}
},
"vendors": [
{
"models": [
{
"retentionRequired": false
}
],
"identity": "key"
}
]
}

A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.

Media typeapplication/problem+json
object
type
string
title
string
status
integer
detail
string
instance
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}