Skip to content

Claude

Claude is Ptah’s default reasoning provider. It supports the full feature set: thinking, prompt caching, vision, and sub-agent spawning.

  • An Anthropic API key from the Anthropic Console.
  • Claude model access enabled on your account.
ModelGood forContextThinking
Claude Opus 4.7The hardest reasoning tasks, long multi-file refactors.200kYes
Claude Sonnet 4.6Daily development work — best speed/quality balance.200kYes
Claude Haiku 4.5Quick edits, autocompletion, low-latency chat.200kLimited

Open Settings → Providers → Claude in the app and paste your API key. The key is stored in encrypted safeStorage.

Non-secret Claude settings live in ~/.ptah/settings.json:

{
"anthropicProviderId": "anthropic",
"llm.defaultProvider": "claude"
}

Set anthropicProviderId to:

  • "anthropic" — direct Anthropic API (requires your API key).
  • "openrouter" — route Claude traffic through OpenRouter instead (requires an OpenRouter key — see OpenRouter).
  • "openai-codex" / "github-copilot" — use Codex or Copilot’s upstream Claude access.
  1. Open the chat.
  2. Select Claude Sonnet 4.6 in the model selector.
  3. Send a simple prompt: What is 2 + 2?
  4. You should see a streaming response and the cost bar should show input/output tokens and a non-zero USD amount.
  • invalid x-api-key — the key is wrong or revoked. Regenerate it in the Anthropic Console and re-paste it in Settings.
  • rate_limit_error — you’ve hit your tier’s RPM or TPM cap. Wait or upgrade your Anthropic plan.
  • model_not_found — your account may not have access to the selected model. Check model permissions in the Anthropic Console.
  • High cost but no output — check the Execution Tree for thinking-block token usage. Switch to a lower effort level to cap thinking budget.