Skip to content

Update Provider

PUT
/api/settings/providers/{provider_id}
curl --request PUT \
--url http://localhost:8000/api/settings/providers/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "api_key": "example", "base_url": "example", "model": "example", "set_default": true }'

Update a provider’s configuration. Persists to database.

provider_id
required
Provider Id
string
Media typeapplication/json
ProviderUpdate
object
api_key
Any of:
string
base_url
Any of:
string
model
Any of:
string
set_default
Any of:
boolean
Examplegenerated
{
"api_key": "example",
"base_url": "example",
"model": "example",
"set_default": true
}

Successful Response

Media typeapplication/json
Examplegenerated
example

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}