Connect (or replace) a project's AI keys
seo_project_connect_aiStores the AI provider key this project's generation, audits and research run on — BYOK: the tokens bill YOUR provider account, not ours. Recommended: a Google Gemini API key (aistudio.google.com/apikey); its free tier works with no card. Optionally stores a Perplexity API key to enable citation-bearing AI visibility checks. Keys are stored encrypted and can never be read back — only replaced or cleared. FREE — this call costs nothing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aiModel | No | Optional model id; defaults to gemini-2.5-flash on the Gemini endpoint. | |
| aiApiKey | No | The AI provider key to store (replaces any stored one). Omit to leave unchanged. | |
| aiBaseUrl | No | Optional OpenAI-compatible base URL; defaults to Google's Gemini endpoint. | |
| projectId | Yes | The project id, exactly as returned by seo_project_list (a cuid such as 'cmtjyi1q20000l204octn48ai'). Not the slug, not the display name. If you do not have one, call seo_project_list first. | |
| clearAiKey | No | Pass true to REMOVE the stored AI key — generation stops until a new one is connected. | |
| perplexityApiKey | No | Optional Perplexity API key for visibility checks; replaces any stored one. Omit to leave unchanged. | |
| clearPerplexityKey | No | Pass true to REMOVE the stored Perplexity key. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | ||
| projectId | Yes | ||
| aiKeyConnected | Yes | ||
| perplexityKeyConnected | Yes |