Docs / Connect

Connect → Kimi Code CLI

Use AxForge with Kimi Code CLI

Kimi Code CLI is Moonshot's terminal coding agent. Although it ships pointed at Moonshot, its provider model lets you target any OpenAI-compatible endpoint — so it runs on AxForge.

Get Kimi Code CLI

Kimi Code CLI is Moonshot's own tool — install it from their instructions, which stay current with their releases. Everything below applies once kimi runs and you can reach its config file.

~/.kimi-code/config.toml

[providers."axforge"]
type     = "openai"                       # OpenAI-compatible wire protocol
api_key  = "your-axforge-key"
base_url = "https://api.axforge.ai/v1"

[models."axforge-chat"]
provider         = "axforge"
model            = "chat"                    # or qwen3.8-27b-nvfp4
max_context_size = 262144
capabilities     = ["tool_use"]

Credentials live in the TOML only. Kimi Code CLI does not read the API key from shell environment variables — put api_key in the config file as above.

Notes

The provider type selects the wire protocol; "openai" is the one to use for AxForge. Model names come from Models & pricing, or GET /v1/models.

Check that it worked

Two things, and the second is the one that proves it end to end:

  1. Kimi starts against the AxForge provider rather than Moonshot — it names the provider it is using.
  2. A prompt gets an answer rather than a provider error.
  3. The call appears in the console at Billing & usage within a minute or two. Nothing else confirms that your key reached our API — a reply alone could be a cache or another provider.

When it does not work

What you seeWhat it meansFix
It still calls Moonshotthe config file was not read, or another provider is still the defaultcheck the path above, and that AxForge is the selected provider
401the keythe key in the TOML is an AxForge key, not a Moonshot one
404the base URL is missing /v1it must end /v1

Run the self-test first when you are unsure — it says in one click whether the problem is your key, your quota or us, so you know whether the tool is worth debugging at all.

Anything unclear on this page?

Ask on the forum — the answer helps the next person too.

Ask about this page
© 2026 AxForge · EU-hosted AI infrastructure Docs Models For AI axforge.ai Pricing Trust Acceptable use Community guidelines