Add an API key
add_byok_keyAdd and validate a BYOK API key for supported AI providers in one app; store it encrypted in Supabase Vault, never return the raw key, and quarantine failed probes.
Instructions
Add and immediately validate a BYOK API key for anthropic | openai | openrouter | firecrawl | browserbase | cursor | supabase (a scoped, read-only Supabase access token, checked against the linked supabase_project_ref). The raw key is stored encrypted in Supabase Vault and never returned; failed probes remain quarantined. Optional baseUrl is accepted only for allow-listed OpenAI-compatible HTTPS providers. The key is added to this one app; a key for every app in the organization or every app you own (universal) is added in the console, Settings → AI keys. Write; NOT idempotent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The API key value to add | |
| label | No | Human-readable label for this key | |
| baseUrl | No | Allow-listed OpenAI-compatible HTTPS base URL | |
| priority | No | Priority for ordering (lower = higher priority) | |
| provider | Yes | Provider slug | |
| projectId | Yes | Project id (`project_id` is accepted too.) |