Create or update a BYOK provider key
BYOK
Create or update a BYOK provider key
Create or update an API key for a specific provider. The key is encrypted at rest and validated against the provider’s API before saving.
Supported providers: openrouter, anthropic, openai, google, xai, vercel-gateway, google-vertex, amazon-bedrock.
Access control:
- Solo users: Manages their own provider keys
- Team admins: Manages provider keys for the team
- Team members/viewers: Returns 403
PATCH
Create or update a BYOK provider key
Authorizations
JWT authentication token
Path Parameters
Provider identifier
Available options:
openrouter, anthropic, openai, google, xai, vercel-gateway, google-vertex, amazon-bedrock Body
application/json
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).
Optional display name for this key
Cloud region for region-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".

