Skip to main content
PUT
/
v1
/
providers
/
{provider}
Create or replace credentials for a provider
curl --request PUT \
  --url https://api.example.com/v1/providers/{provider} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "api_key": "sk-ant-...",
  "base_url": "https://api.anthropic.com",
  "access_key_id": "<string>",
  "secret_access_key": "<string>",
  "region": "us-east-1",
  "service_account_json": "<string>"
}
'
{
  "keyHint": "3456",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

provider
enum<string>
required
Available options:
anthropic,
openai,
bedrock,
vertex

Body

application/json
api_key
string

anthropic | openai — the API key

Example:

"sk-ant-..."

base_url
string

anthropic | openai — optional custom base URL

Example:

"https://api.anthropic.com"

access_key_id
string

bedrock — AWS access key id

secret_access_key
string

bedrock — AWS secret access key

region
string

bedrock — AWS region, or vertex — optional GCP region

Example:

"us-east-1"

service_account_json
string

vertex — GCP service-account JSON, as a string

Response

provider
enum<string>
required
Available options:
anthropic,
openai,
bedrock,
vertex
status
enum<string>
required
Available options:
active,
disabled
keyHint
string
required

Last 4 characters of the primary secret, for display only

Example:

"3456"

updatedAt
string<date-time>
required