# Kimi Code CLI


    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:

      - Kimi starts against the AxForge provider rather than Moonshot — it names the provider it is using.
- A prompt gets an answer rather than a provider error.

      - 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 see | What it means | Fix |  |

        | It still calls Moonshot | the config file was not read, or another provider is still the default | check the path above, and that AxForge is the selected provider |  |

        | `401` | the key | the key in the TOML is an AxForge key, not a Moonshot one |  |

        | `404` | the base URL is missing `/v1` | it 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.

      &larr; Cline
      LiteLLM &rarr;



Source: https://axforge.ai/docs/connect/kimi/
