Skip to main content
PUT
Set or clear your own model key (CR5; Anthropic direct, other providers through the gateway)

Authorizations

x-api-key
string
header
required

Required when the deployment sets SS_REQUIRE_AUTH=1

Body

application/json
provider
enum<string>
required

anthropic (direct), a gateway provider (GET's providers lists each with the fields it takes), or managed (clear)

Available options:
anthropic,
openai,
google-gemini,
mistral-ai,
groq,
together-ai,
openrouter,
cohere,
perplexity-ai,
xai,
cerebras,
deepinfra,
sambanova,
ai21,
baseten,
azure-openai,
microsoft-foundry,
aws-bedrock,
google-vertex,
openai-compatible,
moonshot,
deepseek,
fireworks,
managed
api_key
string<password>
write-only

anthropic / openai / azure-openai: the API key; aws-bedrock: a Bedrock API key (or use the access keys)

api_version
string

azure-openai (required) / microsoft-foundry (optional): the API version, e.g. 2024-10-21

aws_access_key_id
string<password>
write-only
aws_secret_access_key
string<password>
write-only
azure_endpoint
string

azure-openai / microsoft-foundry: https://.openai.azure.com

base_url
string

openai-compatible (required) / moonshot, deepseek, fireworks (default their own) / openai (optional): the API's base URL

models
string[]

Gateway providers: 1 to 32 models to offer, as the provider names them (Azure / Foundry: deployment names; Bedrock: model or inference-profile ids). Called as <provider account>/<name> (GET /v1/llm.models).

project_id
string

google-vertex: the Google Cloud project

publisher
string

microsoft-foundry: the models' publisher, e.g. OpenAI

region
string

aws-bedrock / google-vertex: the region (e.g. us-east-1, us-east5, global)

scope
enum<string>
Available options:
user,
org
service_account_json
string<password>
write-only

google-vertex: a service-account key file (JSON)

Response

The provider setting after the change (never the key)

can_set_org
boolean
effective
enum<string>
Available options:
managed,
own_key
kms
string | null
org
object
org_id
string
provider
string
providers
object[]

The providers this deployment can take a key for: {id, label, via: direct | gateway, fields: [{name, required, secret, about}], base_url?}

source
enum<string> | null
Available options:
user,
org
user
object

The caller's own setting: provider, fingerprint, set_by, set_at_unix_ms — never the key.