Skip to content

API Keys

import { Aside } from ‘@astrojs/starlight/components’;

All API keys are stored in ~/.ptah/settings.json and encrypted with your OS keychain (see Global Settings → Encryption of secrets). You can paste them through the UI under Settings → Providers, or edit the file directly.

ProviderWhere to get a keyConfig key
Claudeconsole.anthropic.com → API Keysproviders.claude.apiKey
CopilotGitHub account → Copilot settings (see Copilot CLI docs)providers.copilot.apiKey
CodexYour Codex provider dashboardproviders.codex.apiKey
Geminiaistudio.google.com → Get API keyproviders.gemini.apiKey
OllamaNo key required — set baseUrl to your local serverproviders.ollama.baseUrl
OpenRouteropenrouter.ai → Keysproviders.openrouter.apiKey
ProviderWhere to get a keyConfig key
Tavilytavily.com → DashboardwebSearch.tavily.apiKey
Serperserper.dev → API KeyswebSearch.serper.apiKey
Exaexa.ai → KeyswebSearch.exa.apiKey

After saving, open a new chat and watch the status strip at the bottom of the window. A green dot next to the provider name means the key authenticated successfully. A red dot means the provider rejected the key — see Troubleshooting → Provider errors.

  1. Generate a new key on the provider’s dashboard.
  2. Paste it into Settings → Providers → [Provider] → API key.
  3. Revoke the old key on the dashboard.

Ptah picks up the new key immediately — no restart required.

Click the trash icon next to the key field, or delete the apiKey entry from settings.json. The provider will be marked unavailable in the chat UI until a key is restored.