# Using Claude in Kilo Code Kilo Code is an agentic coding extension in the Cline/Roo lineage with pluggable providers. Point it at AI Prime Tech and its plan-and-edit loops run on Claude — with the freedom to switch to another model the gateway serves when a task calls for it. ## Choosing a provider In Kilo's settings, pick the API Provider. For the gateway's OpenAI-compatible surface, choose OpenAI Compatible, set the Base URL with /v1, paste your key, and type the model id. For native Anthropic, choose Anthropic and tick Use custom base URL with the host root. Anthropic, Claude Code, and OpenAI-Compatible are separate provider flows in Kilo — match the one to your gateway's wire format. ## Model id and context settings In OpenAI Compatible mode the Model ID is free-text and unvalidated, so a typo silently 404s as 'model not found' — enter exactly what the gateway exposes. Under Model Configuration, set Context Window and Max Output Tokens yourself or Kilo may mis-budget and truncate. Because AI Prime Tech is multi-model, that free-text id is also how you point Kilo at a different model without changing providers. ## Tool calling for agentic edits Kilo's edits, command runs, and MCP depend on the model and gateway supporting tool calls. Enable the Computer Use / function-calling capability in OpenAI Compatible mode if the gateway forwards tool calls, and Image Support only if it passes vision through. These capabilities aren't auto-detected for a custom gateway, so set them to match the underlying model. ## Sustained throughput Agentic plan-and-edit loops carry full-file context and a tool call per step, so token throughput stays high through a coding session — the same pattern as Cline and Roo. A gateway gives you one billing surface for all that throughput plus the option to drop to a cheaper model for routine edits. ## Example ``` # Kilo Code -> Settings -> API Provider # OpenAI Compatible: # Base URL: https://aiprimetech.io/v1 # API Key: # Model ID: claude-sonnet-4-5 # Model Config -> set Context Window + Max Output ``` ## FAQ ### How do I use Claude in Kilo Code? Settings → API Provider → OpenAI Compatible (Base URL {SITE}/v1, free-text Model ID) or Anthropic (host root + Use custom base URL). Paste your gateway key. ### Why does Kilo say 'model not found'? The Model ID in OpenAI Compatible mode is free-text and unvalidated — a typo 404s. Enter the exact id the gateway serves. ### Can Kilo reach non-Claude models? Yes — through AI Prime Tech's multi-model gateway, the free-text model id can point at GPT or Gemini too. ### Do I need to set the context window? Yes, in OpenAI Compatible mode set Context Window and Max Output Tokens manually or Kilo may truncate. --- Source: https://aiprimetech.io/learn/use-claude-api-with-kilo-code/ Provider: AI Prime Tech — independent Anthropic-compatible API gateway (not affiliated with Anthropic).