---
title: "Kimi K3: the complete developer guide"
description: "Kimi K3 is presented as Moonshot AI’s 2.8-trillion-parameter open-weights model for long-horizon coding, end-to-end knowledge work, and deep reasoning, served through Together AI’s OpenAI-compatible API. Its architecture combines Kimi Delta Attention (KDA), Attention Residuals, and Stable LatentMoE, which activates 16 of 896 experts per token—roughly 2%—and supports a 1M-token context. The implementation guide shows Python calls for configurable reasoning effort, reasoning-free instant mode, streaming, multi-image vision, strict JSON-schema output, and function tools, while noting automatic prefix caching. It also covers production-oriented details such as generous max_tokens for reasoning-heavy structured output, a 100 MB request-body limit for vision, tool-call history handling, and deployment from US infrastructure."
---

# Kimi K3: the complete developer guide

[Together AI](https://yomu.fyi/company/together-ai) · Aug 1, 2026

**Type:** Tutorial

## Summary

Kimi K3 is presented as Moonshot AI’s 2.8-trillion-parameter open-weights model for long-horizon coding, end-to-end knowledge work, and deep reasoning, served through Together AI’s OpenAI-compatible API. Its architecture combines Kimi Delta Attention (KDA), Attention Residuals, and Stable LatentMoE, which activates 16 of 896 experts per token—roughly 2%—and supports a 1M-token context. The implementation guide shows Python calls for configurable reasoning effort, reasoning-free instant mode, streaming, multi-image vision, strict JSON-schema output, and function tools, while noting automatic prefix caching. It also covers production-oriented details such as generous max\_tokens for reasoning-heavy structured output, a 100 MB request-body limit for vision, tool-call history handling, and deployment from US infrastructure.

## Context

A developer guide to running Moonshot AI’s Kimi K3 on Together AI, covering its architecture, API usage, reasoning controls, multimodal inputs, structured outputs, tools, context length, and operational details.

## Approach / What changed

Install the Together Python SDK, instantiate the client with TOGETHER\_API\_KEY, and call model moonshotai/Kimi-K3 through the OpenAI-compatible chat completions API. The guide demonstrates configurable reasoning effort, disabled-reasoning mode, streaming deltas, URL or base64 images, JSON Schema responses, and the standard function-tool loop with assistant and tool messages.

## Takeaways

- K3 activates 16 of 896 Stable LatentMoE experts per token, roughly 2% of the expert pool, while Kimi Delta Attention and Attention Residuals support scaling to a 1M-token context.
- Together’s API exposes low, high, and max reasoning\_effort levels, with max as the default; reasoning can also be disabled through reasoning={“enabled”: False}.
- For structured output, the full thinking trace is generated before the first schema-constrained token, so an overly small max\_tokens value can truncate the JSON rather than the reasoning.

## FAQ

### Why can a small max\_tokens value break structured JSON output?

K3 spends the entire thinking trace before emitting the first schema-constrained token. If max\_tokens is too tight, the final JSON can be truncated even though the reasoning has already consumed the budget.

### What limits apply when sending images to Kimi K3?

There is no limit on the number of images, but the whole request body must remain under 100 MB. The recommended maximum image resolution is 4096x2160, because higher resolutions increase processing time and token use without improving understanding.

### How should tool calls be handled across multiple turns?

When K3 returns tool\_calls, append the complete assistant message to the history, then add one tool message with the matching tool\_call\_id for each call before calling the model again. Use tool\_choice="required" to force a call on the first turn, then switch back to "auto"; changing tool\_choice does not invalidate the prefix cache.

**Tags:** [API](https://yomu.fyi/topic/api), [LLMs](https://yomu.fyi/topic/llm), [Mixture of Experts](https://yomu.fyi/topic/mixture-of-experts), [Open Source](https://yomu.fyi/topic/open-source)

- Source: [Together AI](https://www.together.ai/blog/kimi-k3-guide)
- Source URL: https://www.together.ai/blog/kimi-k3-guide
- Ingested by Yomu: 2026-09-19T10:13:44.720Z

[Read original post](https://www.together.ai/blog/kimi-k3-guide)
