Claude AI Setup

Connect Anthropic’s Claude models to GTM Toolkit so you can generate insights, keyword plans, and fix suggestions.

Choose a Model
Toolkit is tested with Claude 3 family models
  • claude-3-haiku-20240307 — cost-efficient for keyword research and lint summaries.
  • claude-3-sonnet-20240229 — balanced performance for competitor deep-dives.
  • claude-3-opus-20240229 — premium option for narrative or long-form analysis.
Configure Environment Variables
Store credentials securely and expose them to the CLI
# .env.local (do not commit)
CLAUDE_API_KEY=sk-ant-xxxxxxxxxxxxxxxx
CLAUDE_MODEL=claude-3-sonnet-20240229
Optional gtm.config.js Overrides
Store defaults in your config so team members share the same model choices
// gtm.config.js
module.exports = {
  ai: {
    provider: 'claude',
    model: process.env.CLAUDE_MODEL ?? 'claude-3-haiku-20240307',
    apiKey: process.env.CLAUDE_API_KEY,
  },
};
Smoke Test
Confirm credentials and quotas before adding to CI
# Generate keyword suggestions for a topic
npx gtm-toolkit analyze --keywords “go to market automation” --output tmp/keywords.json

If you see rate limit errors, double-check account quotas and consider batching requests manually (for example, by adding a short sleep between commands in CI).

Security
Production Tips
Keep credentials safe as your automation footprint grows
  • • Store keys in secrets managers (1Password, Doppler, AWS Secrets Manager) instead of plaintext files.
  • • Use separate keys for staging vs production to track usage and revoke access selectively.
  • • Rotate keys quarterly—update CI secrets and redeploy to ensure no stale environments.