Moonshot()

Kimi models direct from Moonshot, with your own API key. Costs go direct to the vendor at their rates — no markup, nothing on your Axon balance.

export default defineProfile({
    providers: [Moonshot()],
})

Serves moonshotai/*.

Credentials

Set the environment variable, or pass key on the declaration:

MOONSHOT_API_KEY=...
providers: [Moonshot({ key: process.env.MY_OWN_VAR })]

You can also store this key in your Axon account vault through the cloud client:

await cloud.user.vault.connections.get("moonshot").connect({ key: apiKey })

A fresh host signed into the same account can use the connection. Profiles without an explicit providers list discover active account connections automatically; an explicit list continues to restrict which providers that machine uses.

Explicit keys and environment variables take precedence over the account vault. A custom url requires an explicit credential. Provider SDKs ship with Axon.

Options

Moonshot(options?: ProviderOptions)
OptionDefaultDescription
keyMOONSHOT_API_KEYYour own credential, passed directly
urlhttps://api.moonshot.ai/v1Endpoint override
slotsunboundedCeiling on concurrent calls a fanned-out role may spend here

Model ids

Bare Kimi slugs:

export default defineAgent({ model: "moonshot:kimi-k3" })

An OpenAI-compatible route

Moonshot publishes no first-party adapter, so this reaches its OpenAI-compatible endpoint at https://api.moonshot.ai/v1. It works because Moonshot exposes a chat-completions surface, and it will keep working as long as they do.

url overrides the endpoint — for a regional deployment or a proxy:

providers: [Moonshot({ url: "https://api.moonshot.cn/v1" })]