Kimi K3 just topped a public frontend coding board over every closed model, and the natural next thought is "let me try it in my own agent." The natural next obstacle is that K3 is a 2.8-trillion-parameter model — the open weights are roughly 1.4 TB and serving them is a data-center project, not an afternoon. So skip that. The fast path is to rent K3 through an OpenAI-compatible endpoint and point the coding agent you already use at it. Here's the whole thing in about ten minutes.

1. Pick the endpoint (and mind the caching gotcha)#

Two hosts get you to the same model. They price the same and differ on the one thing a coding agent cares about most: caching.

Why the caching line matters: a coding agent re-sends the same system prompt and repository context on nearly every turn. Without caching you pay full input price for that stable prefix over and over. Start on OpenRouter to try K3 in five minutes; move to Moonshot direct the moment your daily bill starts to sting.

2. Wire it into your agent#

All three popular agents take an OpenAI-compatible endpoint. It's a base-URL + key + model-ID swap.

Cline / opencode — add a custom provider in settings:

{
  "provider": "openai-compatible",
  "baseURL": "https://openrouter.ai/api/v1",   // or https://api.moonshot.ai/v1
  "apiKey": "sk-...",
  "model": "moonshotai/kimi-k3"                 // "kimi-k3" on Moonshot direct
}

Claude Code — it reads the endpoint and token from the environment, so route it through an OpenAI-compatible gateway that presents an Anthropic-shaped endpoint, then set the model:

export ANTHROPIC_BASE_URL="https://your-gateway.example/v1"
export ANTHROPIC_AUTH_TOKEN="sk-..."
export ANTHROPIC_MODEL="kimi-k3"
claude

Restart the agent. The next request goes to K3.

3. Confirm it's actually K3 — then watch the meter#

Before you trust the wiring, run a 30-second smoke test: ask the model to state its name and version, or print the model field on the response, and check that your provider dashboard is billing the request against K3 rather than silently falling back to a default. Evaluating the wrong model for an afternoon is a classic own-goal.

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"model":"moonshotai/kimi-k3",
       "messages":[{"role":"user","content":"State your model name and version in one line."}]}' \
  | grep -o '"model":"[^"]*"'

Then keep an eye on the first day's token spend. K3's 1M-token context is real, but it's a ceiling to ration, not a default to fill — you pay input tokens on everything you send, every turn, and latency rises with context length. Let the agent select the files it needs instead of pasting the whole tree, and lean on caching (Moonshot direct) so the stable prefix isn't re-billed at full freight.

4. Don't make it your default until it's earned it#

Renting K3 for an hour tells you it works; it doesn't tell you it's better for you. The leaderboard put K3 on your shortlist — your own tasks decide the winner. Before you flip your default model, run a small private eval on real work from your repo: same prompts, K3 vs your incumbent, judged on whether the patch actually lands. We walk through building that harness in how to build a private eval to pick a coding model. If K3 wins on your tasks at a price you can live with, keep it. If not, you spent ten minutes and a few cents finding out — which is the whole point of renting before you buy.