/llm-credentialsCheck a provider API key and store it (encrypted).
Link LLM Key
Checks the key with the provider, then stores it encrypted at rest. The key is never returned in any response; key_hint shows its last four characters. Linking a key for a provider that already has one replaces the old key at once, so you can rotate a key with no gap. If the provider later refuses the key (revoked, out of credit, rate-limited), the call or chat turn fails: it never falls back to the Aethex key. Groq (groq:…), Cerebras (cerebras:…) and xAI (xai:…) models can be set on an agent only after you link that vendor's key. Realtime models keep running on the Aethex key. A custom endpoint also takes base_url and is checked with GET <base_url>/models; agents name it as custom:<model>, for voice calls only.
Request body
4providerstringrequiredProvider the key belongs to:
openai,anthropic,openrouter,groq,cerebras,xai, orcustomfor your own OpenAI-compatible server.api_keystringrequiredThe provider API key. Checked with the provider before it is stored; never echoed back.
labelstringoptionalOptional human-readable label.
base_urlstringoptionalRequired for
custom, refused for every other provider: your server's chat-completions root, such ashttps://llm.example.com/v1. Requests go to<base_url>/chat/completions. HTTPS on port 443 to a public host, with no credentials, query or fragment. See Your own LLM.
Errors
4The provider rejected the key, provider is not one of the supported values, or base_url is missing, malformed or does not resolve to a public address.
Check the key in your provider's console and that provider matches it.
Another key for the same provider was linked at the same moment.
Retry the request.
Per-tenant link rate limit exceeded (5/min).
Retry after the Retry-After interval.
The provider, or your base_url, could not be reached to check the key, or the rate limiter is offline.
Retry shortly.
