Event ·Multi-source

一份提示词模板:让智能体用你自己的 Anthropic API key 干活

Lenny Rachitsky 分享了一份可直接复制的提示词,让 Claude Code 等智能体改用用户自己的 Anthropic API 账户,而不是智能体自带的模型额度。模板覆盖从要 key 到跑通任务的完整 6 步流程:先通过安全 secret 字段(不在聊天中明文)索取 API key 和 workspace ID,只在本地存储且不打印。 技术上,模板要求写一个小 helper 脚本调用 Anthropic Messages API(api.anthropic.com/v1/messages),带 x-api-key 和 anthropic-version 请求头,必要时加 anthropic-workspace-id。然后通过 GET /v1/models 列出该 key 可用的模型供用户选择,发一条测试消息验证连通性,失败时输出具体错误(如 credit balance too low)方便到 console.anthropic.com 修账单。 跑通后的玩法是分工:让指定的 Claude 模型写初稿,智能体本身负责审阅和事实核查,注意过滤 thinking block 只留文本。这套方法适合想用自己的 API 额度跑长任务、又不想烧智能体订阅额度的开发者。

Current read

这是个拿来就能用的提示词模板,教你让智能体走你自己的 Anthropic API 账户干活,key 走安全字段不进聊天记录,还带测试和报错排查步骤。经常跑长任务、嫌订阅额度不够的人照抄一遍就能省不少钱。

11 sources14° AI heatLast updated 2026/11/17 00:54:12

Evidence

11 sources
Primary sourceLenny Rachitsky
View source
Related source 1掘金本周最热
View source
Related source 2shao__meng
View source
Related source 5Claude Code: GitHub Releases
View source
Related source 7Detik Inet
View source
Related source 8Tibor Blaho
View source
Related source 9lmarena.ai
View source
Related source 10阿里通义 Qwen
View source

Conflict check

Dedup data only shows that these sources discuss the same event, not that they agree. There is no structured supporting or refuting evidence yet, so no conflict is inferred automatically.