Lenny shares his full prompt for routing an AI Bot through his own Anthropic API key
lennysan · x · 2026-11-17
Lenny (of Lenny's Newsletter) shares a reusable prompt template for having an AI Bot use Claude through his own Anthropic API account (e.g. drafting podcast guest briefs). The flow: collect the API key via a secure secret field (never in chat), store it locally and never print it, write a helper script calling the Anthropic Messages API with x-api-key / anthropic-version / optional workspace headers, list available models via GET /v1/models so he can pick one, send a test message and surface exact errors (e.g. low balance) for billing fixes, then persist everything into skills and routines.
More from coding & agent
- Fable 5.2 praised as first model that ignores unimportant feedback and tells you to ship — neuroecology · 2026-11-17
- Claude Code on desktop now runs iPhone Duo in the iOS simulator, folding to test layouts — maxleiter · 2026-11-17
- OpenAI's jxnlco on building taste: 'If you want good taste, you have to eat' — jxnlco · 2026-11-17
- I ran 3,360 experiments to see if AI agents recommend the right products — santiviquez · 2026-11-17
- Together AI and Ollama explain how prefix caching keeps long agent sessions fast — togethercompute · 2026-11-17
- Recreating The Godfather's office scene with MiniMax H3 in ComfyUI: 3 shots, 37s — hucun16 · 2026-11-17