Skip to main content
PATCH
Create or update a BYOK provider key

Authorizations

Authorization
string
header
required

JWT authentication token

Path Parameters

provider
enum<string>
required

Provider identifier

Available options:
openrouter,
anthropic,
openai,
google,
xai,
vercel-gateway,
google-vertex,
amazon-bedrock,
azure-foundry

Body

application/json
api_key
string
required

The provider API key (will be encrypted at rest). For google-vertex: must be the full GCP service account JSON string (containing type, client_email, private_key, project_id).

display_name
string | null

Optional display name for this key

location
string | null

Cloud region or endpoint URL for location-aware providers:

  • google-vertex: GCP region for Vertex AI (e.g. "us-central1", "us-east5"). Defaults to "us-central1".
  • amazon-bedrock: AWS region (e.g. "us-east-1"). Defaults to "us-east-1".
  • azure-foundry: Foundry endpoint URL (e.g. "https://{resource}.openai.azure.com" or legacy "https://{resource}.services.ai.azure.com"). Required.

Response

Provider key created or updated

provider_key
object
required

A configured BYOK provider API key

validation
object
required