AI Agent
Use your own AI key with the AI Agent
Your AI Agent can write its replies with an AI account of your own. Paste your key, run a quick test, and switch to it with one click. You can switch back to Anthropic (Claude) at any time. Your key is stored encrypted, used only for your workspace and never shown again after you save it.
Where to find it
Open Automate → AI Agent, stay on the WhatsApp tab, then open the AI Brain tab. The panel on the right is called AI connection (API key). The Overview tab shows which AI is answering under Bot status, for example "Tanvik AI (Claude)".
Using Meta Business Agent? The key panel is replaced by a note: "API key not used while Meta Business Agent is active." Switch the AI provider cards at the top of the tab back to Tanvik AI and click Save to use your own key.
Add an Anthropic (Claude) key
01
Choose the provider
Under AI provider, pick Anthropic (Claude). The list shows each provider with "key saved" or "no key", and marks the one in use as "ACTIVE".
02
Paste your key
Paste it into the API key box and click Save key. Once saved, the panel says "Anthropic key connected". To replace it, paste a new key and save again.
03
Remove it if you want
Click Remove key and confirm. With no Anthropic key set, the panel says replies use Tanvik's shared key.
Use a different provider
01
Pick the provider
Under AI provider, choose another provider from the list.
02
Paste the key and save
Paste your key and click Save key. Tanvik runs a test straight away.
03
Choose a model
Under Model, leave Default or pick a model from the list. A tick means Tanvik has verified that model. Custom model ID… lets you type one, but it only works if the provider supports function calling; the test checks this.
04
Run the test
Click Test key whenever you change the key or model. The test sends a plain reply and then a tool call. When both work you see "tested OK" with the last four characters of your key and the model name. If not, the panel shows why, for example "Key failed the test", and you can fix the key or choose another model.
05
Switch to it
Once the test passes, click Use this provider. From then on your AI Agent replies with it, and the Overview shows it under Bot status.
06
Switch back any time
While a provider other than Anthropic is active and selected in the list, click Switch back to Anthropic. If you remove the key of the active provider, the bot switches back to Anthropic by itself.
The Use this provider button appears only after a passed test. A provider that has not passed the test cannot be switched on.
Check your usage
The Overview tab shows AI replies this month against your allowance, Tokens used this month and the API cost, and a Token usage — this month table by model with the last 3 months of history. See Set up your AI Agent for what each card means.
Common problems
"That doesn't look like a valid key"
The key was rejected on save. Copy it again from your provider, without spaces, and paste the whole key.
The test failed
Read the reason in the panel. Check the key, then try another model. Models without function calling cannot be used.
I cannot see Use this provider
It shows only for a provider that is not already active and whose test has passed with tool calling.
The panel is missing
You are on the Meta Business Agent card, or you are on a tab other than AI Brain.
Was this article helpful?