Moonshot
fast-agent provides a native Moonshot Chat Completions route for Kimi K3.1 Pro and K3.
Setup
Create an API key in the Kimi platform and set:
Run the native alias:
Equivalent model strings are:
The previous kimik3 alias and moonshot.kimi-k3 route remain unchanged.
K3.1 Pro access requires a successful Moonshot top-up (minimum $1).
The unversioned kimi and kimithink aliases now select K3.1 Pro through
HF/Together. Versioned aliases (kimik3, kimi27code, kimi26, etc.) retain
their original models; K3 is marked legacy in the picker.
Hugging Face Inference Providers
Kimi K3.1 Pro is available through Together on Hugging Face Inference Providers.
Set HF_TOKEN and use:
The HF route suffix is together, not togetherai. The model picker also
includes Kimi K3.1 Pro (together). This route supports image input, but
fast-agent does not advertise video input through HF.
The previous Kimi K3 routes remain available:
Both routes accept K3's top-level reasoning_effort values (low, high, and
max), return reasoning separately in reasoning_content, and support image
input. Their HF deployments do not provide usable video input.
Configuration
The built-in endpoint and model are:
moonshot:
api_key: "${MOONSHOT_API_KEY}"
base_url: "https://api.moonshot.ai/v1"
default_model: "kimi-k3.1-pro"
Only api_key is required. base_url, default_model, and default_headers
can be overridden for a compatible gateway.
Model limits and parameters
Kimi K3.1 Pro and K3 have a 1,048,576-token context window shared by input and
output. The API defaults max_completion_tokens to 131,072 when omitted and
allows it up to 1,048,576, provided the prompt plus requested completion still
fits the context window.
K3 fixes its sampling configuration. Moonshot documents top_p=0.95, n=1,
presence_penalty=0, and frequency_penalty=0 as non-modifiable, and does not
allow temperature to be modified. Native presets therefore do not add
sampling parameters. If reusable request defaults provide fixed or unsupported
sampling fields, the Moonshot adapter warns and omits them.
Reasoning
Kimi K3.1 Pro and K3 always reason. The supported reasoning efforts are:
max is the default. K3 does not support disabling reasoning.
fast-agent go --model "kimik3?reasoning=low" --message "Solve this problem."
fast-agent go --model "kimik3?reasoning=high" --message "Solve this problem."
fast-agent go --model "kimik3?reasoning=max" --message "Solve this problem."
Moonshot returns hidden reasoning separately in reasoning_content; fast-agent
keeps it verbatim in the reasoning channel rather than merging it into visible
assistant content, and replays it with assistant tool calls on subsequent turns.
During onboarding on July 29, 2026, two identical modular-arithmetic probes per effort returned these reasoning-token counts:
| Effort | Runs | Median |
|---|---|---|
low |
141, 134 | 137.5 |
high |
299, 279 | 289 |
max |
347, 392 | 369.5 |
This confirms that effort changes reasoning volume for that task; it is not a fixed token budget or a guarantee for every prompt.
Multi-turn conversations
Moonshot requires the complete assistant message from each response in later
requests. This includes reasoning_content and, when present, tool_calls.
fast-agent replays all required assistant fields in conversation history and
never copies hidden reasoning into visible content.
Structured output
K3 supports strict json_schema responses:
fast-agent go --model kimik3 \
--json-schema ./result.schema.json \
--message "Return the requested result."
The native model profile therefore uses structured_tool_policy:
no_tools: structured generation is available, but regular tools are suppressed
for that structured turn.
Image and video input
K3 supports image and video understanding. fast-agent advertises and has tested Moonshot's
documented image MIME types (JPEG, PNG, GIF, WebP, BMP, HEIC, and
HEIF) and video MIME types (MP4, MPEG, MOV, AVI, FLV, MPG,
WebM, WMV, and 3GPP). SVG and PDF are not advertised as native K3 media
inputs.
Usage and caching
Moonshot automatically caches reusable prompt prefixes. Usage can report
cached_tokens at the top level and in prompt_tokens_details.cached_tokens.
The integration relies on provider-reported usage and does not configure or
claim a fixed cache TTL.
K3.1 Pro PTC and structured output
PTC is enabled by default on both K3.1 Pro routes (local POSIX execution);
disable it with ?ptc=off, --no-ptc, or ptc.enabled: false.
The default reasoning effort remains max; the default output budget is
131,072 tokens. Both routes passed the live examples/ptc/ orders/batching
and image-return cases.
Both routes also passed live typed structured() and structured_schema()
tests with nested objects, enums, arrays, integers, and tools attached.
Structured turns suppress tools. The HF/Together route uses Together's legacy
schema-bearing json_object envelope to avoid the HF router's incompatible
translation of modern json_schema requests; it still sends the complete
schema. Treat this as schema-guided output with local validation, not a guarantee
of provider-enforced constrained decoding.
K3.1 Pro pricing
As verified on November 5, 2026, Moonshot direct and HF via Together both list $2.00 input, $0.20 cached input, and $10.00 output per million tokens. Moonshot cache writes cost $2.00 (5m TTL) or $4.00 (1h TTL) per million tokens; the price-calculator plugin assumes 5m when usage does not identify the TTL. Together charges no cache-write fee: uncached tokens cost the ordinary input rate. Its caching is automatic, typically lasts about an hour on a best-effort basis, and exposes no selectable expiry or TTL tiers. See Together prompt caching.
These prices are maintained in the card-packs price-calculator plugin, not in the model capability database. See Moonshot pricing and Together pricing.
Official documentation
- Kimi API overview
- Kimi K3.1 Pro
- Kimi K3
- Models
- Model parameter reference
- Chat Completions
- Reasoning effort
- Multi-turn conversations
- Tool calls
- Vision input
- OpenAPI specification
See Models Reference for the generated capability row.