/v1/private/llm-provider-key/{id}Update LLM Provider's ApiKeyUpdate LLM Provider's ApiKey. api_key and auth_config are mutually exclusive: setting a valid auth_config on a provider that holds a static api_key clears the stored key; send auth_config as an empty object to clear the recipe and switch back to a static key
Parameters
idstring · uuidpathrequiredRequest body
application/json
api_keystringauth_configobjectDynamic token auth recipe. Send the '__SECRET__' sentinel as a credential value to keep the stored secret; send an empty object to clear the auth config.
Show child attributes
credentialsarray of objectFields sent to the token URL. Values flagged as secret are write-only: they read back as the '__SECRET__' sentinel
Show child attributes
Show array items
Fields sent to the token URL. Values flagged as secret are write-only: they read back as the '__SECRET__' sentinel
keystringrequiredsecretbooleanSecret values are encrypted at rest and never read back; once true it cannot be unset
valuestringexpires_fieldstringField holding the token lifetime in seconds in the reply; dot-path for nested replies
fallback_ttl_secondsinteger · int64Lifetime in seconds assumed when the reply doesn't state one, capped at one year; 0 disables caching for such replies. A reply-stated lifetime always wins
send_asstringHow credentials are sent: form body (default), JSON body, or basic auth (id/secret in an HTTP Basic header, remaining fields in the form body)
token_fieldstringField holding the token in the reply; dot-path for nested replies
token_urlstringAuth service URL the credentials are sent to
base_urlstringconfigurationobjectheadersobjectnamestringprovider_namestringProvider name - can be set to migrate legacy custom LLM or Bedrock providers to the new multi-provider format. Once set, it cannot be changed. Should only be set for custom LLM and Bedrock providers.
{
"api_key": "",
"auth_config": {
"credentials": [
{
"key": "string",
"secret": "",
"value": "string"
}
],
"expires_field": "expires_in",
"fallback_ttl_seconds": 0,
"send_as": "basic",
"token_field": "access_token",
"token_url": "https://developer.api.example.com/authentication/v1/token"
},
"base_url": "string",
"configuration": {
"additionalProp1": "string"
},
"headers": {
"additionalProp1": "string"
},
"name": "string",
"provider_name": "ollama"
}Responses
codeinteger · int32detailsstringmessagestring{
"code": 0,
"details": "string",
"message": "string"
}codeinteger · int32detailsstringmessagestring{
"code": 0,
"details": "string",
"message": "string"
}codeinteger · int32detailsstringmessagestring{
"code": 0,
"details": "string",
"message": "string"
}