Skip to content

Set or rotate the tenant's AI provider key

PUT
/api/v1/ai/credential
curl --request PUT \
--url https://app.avera.io/api/v1/ai/credential \
--header 'Content-Type: application/json' \
--data '{ "apiKey": "example", "provider": "example" }'

BYOK: the tenant brings its own AI provider key, and spend goes to the provider. The key is validated against the provider before it is persisted, so a typo fails here rather than mid-generation. The key is stored write-only and never returned by any endpoint. Tenant-admin gated.

Media typeapplication/json
object
apiKey
required
string
provider
string | null

Example generated

{
"apiKey": "example",
"provider": "example"
}

OK

Media type*/*
object
configured
required
boolean
provider
string | null
keyPrefix
string | null
createdAt
string | null format: date-time
rotatedAt
string | null format: date-time
lastValidatedAt
string | null format: date-time
lastUsedAt
string | null format: date-time