PageSourceSearch

https://kilo.ai/docs/_next/static/chunks/pages/ai-providers/anthropic-f9939e0413d3ea7e.js

js kilo.ai collected 2026-09-24 08:57:35 UTC 8,206 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{34192:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSG:()=>y,default:()=>m,markdoc:()=>f});var i=n(11872),r=n(12863),o=n(92130),a=n(9760),s=n(90102),d=n(89966),l=n(48059);let c={tags:(0,a.X)(s),nodes:(0,a.X)(d),functions:(0,a.X)(l),...(0,a.X)({})},p=new o.Ay.Tokenizer({allowComments:!0}).tokenize('---\ntitle: "Using Anthropic Claude with Kilo Code"\ndescription: "Configure Anthropic\'s Claude models in Kilo Code. Guide to getting an API key, setting up Claude Sonnet and Opus in VS Code and the CLI."\nsidebar_label: Anthropic\n---\n\n# Using Anthropic With Kilo Code\n\nAnthropic is an AI safety and research company that builds reliable, interpretable, and steerable AI systems. Their Claude models are known for their strong reasoning abilities, helpfulness, and honesty.\n\n**Website:** [https://www.anthropic.com/](https://www.anthropic.com/)\n\n## Getting an API Key\n\n1.  **Sign Up/Sign In:** Go to the [Anthropic Console](https://console.anthropic.com/). Create an account or sign in.\n2.  **Navigate to API Keys:** Go to the [API keys](https://console.anthropic.com/settings/keys) section.\n3.  **Create a Key:** Click "Create Key". Give your key a descriptive name (e.g., "Kilo Code").\n4.  **Copy the Key:** **Important:** Copy the API key _immediately_. You will not be able to see it again. Store it securely.\n\n## Configuration in Kilo Code\n\n{% tabs %}\n{% tab label="VSCode" %}\n\nOpen **Settings** (gear icon) and go to the **Providers** tab to add Anthropic and enter your API key.\n\nThe extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format.\n\n{% /tab %}\n{% tab label="CLI" %}\n\nSet the API key as an environment variable or configure it in your `kilo.json` config file:\n\n**Environment variable:**\n\n```bash\nexport ANTHROPIC_API_KEY="your-api-key"\n```\n\n**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`):\n\n```jsonc\n{\n  "provider": {\n    "anthropic": {\n      "env": ["ANTHROPIC_API_KEY"],\n    },\n  },\n}\n```\n\nThen set your default model:\n\n```jsonc\n{\n  "model": "anthropic/claude-sonnet-4-20250514",\n}\n```\n\n{% /tab %}\n{% /tabs %}\n\n## Tips and Notes\n\n- **Prompt Caching:** Claude 3 models support [prompt caching](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching), which can significantly reduce costs and latency for repeated prompts.\n- **Context Window:** Claude models have large context windows (200,000 tokens), allowing you to include a significant amount of code and context in your prompts.\n- **Pricing:** Refer to the [Anthropic Pricing](https://www.anthropic.com/pricing) page for the latest pricing information.\n- **Rate Limits:** Anthropic has strict rate limits based on [usage tiers](https://docs.anthropic.com/en/api/rate-limits#requirements-to-advance-tier). If you\'re repeatedly hitting rate limits, consider contacting Anthropic sales or accessing Claude through a different provider like [OpenRouter](/docs/ai-providers/openrouter) or [Requesty](/docs/ai-providers/requesty).\n'),u=o.Ay.parse(p,{slots:!1}),h=u.attributes.frontmatter?r.Ay.load(u.attributes.frontmatter):{},{components:g}=(0,a._)(c);var y=!0;let f={frontmatter:h};function m(e){let t=e.markdoc;return o.ZR.react(t.content,i,{components:{...g,...e.components}})}},48059:(e,t,n)=>{"use strict";n.r(t),n.d(t,{includes:()=>i,upper:()=>r});let i={transform(e){let[t,n]=Object.values(e);return!!Array.isArray(t)&&t.includes(n)}},r={transform(e){let t=e[0];return"string"==typeof t?t.toUpperCase():t}}},49974:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/ai-providers/anthropic",function(){return n(34192)}])},89966:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fence:()=>o,heading:()=>s,table:()=>l,tbody:()=>p,td:()=>g,th:()=>h,thead:()=>c,tr:()=>u});var i=n(92130),r=n(62968);let o={render:r.NG,attributes:i.a9.fence.attributes};function a(e){return"string"==typeof e?e:i.vw.isTag(e)?e.children.map(a).join(" "):""}let s={render:r.DZ,children:["inline"],attributes:{id:{type:String},level:{type:Number,required:!0,default:1},className:{type:String}},transform(e,t){let n=e.transformAttributes(t),r=e.transformChildren(t),o=n.id&&"string"==typeof n.id?n.id:r.map(a).join(" ").replace(/[?/]/g,"").replace(/\s+/g,"-").toLowerCase();return new i.vw(this.render,{...n,id:o},r)}};var d=n(17499);let l={...i.a9.table,render:d.XI},c={...i.a9.thead,render:d.D1},p={...i.a9.tbody,render:d.vc},u={...i.a9.tr,render:d.Tr},h={...i.a9.th,render:d.Th,attributes:{...i.a9.th.attributes,width:{type:String}}},g={...i.a9.td,render:d.Td,attributes:{...i.a9.td.attributes,colspan:{type:Number},rowspan:{type:Number}}}}
1,90102:(e,t,n)=>{"use strict";n.r(t),n.d(t,{browserFrame:()=>f,callout:()=>r,codicon:()=>o,copyLine:()=>a,flowDiagram:()=>y,icon:()=>l,image:()=>c,imageGallery:()=>p,kiloCodeIcon:()=>u,linebreak:()=>m,tab:()=>d,tabs:()=>s,video:()=>h,youtube:()=>g});var i=n(62968);let r={render:i.Pq,children:["paragraph","tag","list"],attributes:{title:{type:String,description:"Optional custom title for the callout"},type:{type:String,default:"note",matches:["generic","note","tip","info","warning","danger"],description:"The type of callout: generic (no icon/title), note, tip, info, warning, or danger"},collapsed:{type:Boolean,default:!1,description:"When true, the callout starts collapsed and can be expanded by clicking the header"}}},o={render:i.W6,selfClosing:!0,attributes:{name:{type:String,required:!0,description:"The name of the VS Code codicon (e.g., 'send', 'check', 'warning')"},size:{type:String,default:"1em",description:"The size of the icon (CSS font-size value)"},className:{type:String,default:"",description:"Additional CSS classes to apply to the icon"}}},a={render:i.a7,selfClosing:!0,attributes:{text:{type:String,required:!0,description:"The exact one-line text to display and copy"}}},s={render:i.tU,children:["tab"],attributes:{}},d={render:i.oz,children:["paragraph","tag","list","fence","heading"],attributes:{label:{type:String,required:!0,description:"The label shown on the tab button"}}},l={render:i.In,selfClosing:!0,attributes:{src:{type:String,required:!0},srcDark:{type:String,description:"Optional image source for dark mode. Falls back to src if not provided."},alt:{type:String,default:"icon"},size:{type:String,default:"1.2em"}}},c={render:i._V,selfClosing:!0,attributes:{src:{type:String,required:!0,description:"The image source URL"},alt:{type:String,required:!0,description:"Alternative text for the image"},width:{type:String,description:"Width of the image (e.g., '500px', '80%')"},height:{type:String,description:"Height of the image (e.g., '300px', 'auto')"},caption:{type:String,description:"Optional caption displayed below the image"}}},p={render:i.i_,children:["tag"],attributes:{columns:{type:String,description:"Preferred number of image columns on wide screens"},width:{type:String,description:"Preferred width of each gallery image"}}},u={render:i.kz,selfClosing:!0,attributes:{size:{type:String,default:"1.2em",description:"Size of the icon (CSS height value)"}}},h={render:i.n5,selfClosing:!0,attributes:{url:{type:String,required:!0,description:"The YouTube video URL"},title:{type:String,description:"Accessible title for the video iframe"},caption:{type:String,description:"Optional caption to display below the video"}}},g={render:i.Yu,selfClosing:!0,attributes:{url:{type:String,required:!0,description:"The YouTube video URL"},title:{type:String,description:"Accessible title for the video iframe"},caption:{type:String,description:"Optional caption to display below the video"}}},y={render:i.Cb,selfClosing:!0,attributes:{name:{type:String,required:!0,description:"Name of the diagram to render (must match a key in diagrams/index.ts)"},height:{type:String,default:"400px",description:"Height of the diagram container"}}},f={render:i.AR,children:["paragraph","tag","list"],attributes:{url:{type:String,description:"Optional URL to display in the address bar"},caption:{type:String,description:"Optional caption below the frame"}}},m={render:"br",selfClosing:!0}}},e=>{e.O(0,[8228,4720,636,6593,8792],()=>e(e.s=49974)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.