> ## Documentation Index
> Fetch the complete documentation index at: https://visionagents.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Kimi AI

[Kimi AI](https://platform.moonshot.ai/) by Moonshot AI provides advanced multimodal reasoning models with up to 256K context windows. Use Kimi K2.5 and other models through the OpenAI-compatible Chat Completions API with Vision Agents.

<Info>
  Vision Agents requires a [Stream](https://getstream.io/try-for-free/) account
  for real-time transport. Get your Kimi API key from the [Moonshot
  Platform](https://platform.moonshot.ai/).
</Info>

## Installation

```sh theme={null}
uv add "vision-agents[openai]"
```

## Quick Start

```python theme={null}
from vision_agents.core import Agent, User
from vision_agents.plugins import openai, getstream, deepgram, elevenlabs

agent = Agent(
    edge=getstream.Edge(),
    agent_user=User(name="Assistant", id="agent"),
    instructions="You are a helpful assistant.",
    llm=openai.ChatCompletionsLLM(
        model="kimi-k2.5-preview",
        base_url="https://api.moonshot.ai/v1",
        api_key="your_moonshot_api_key",  # or set MOONSHOT_API_KEY env var
    ),
    stt=deepgram.STT(),
    tts=elevenlabs.TTS(),
)
```

<Warning>
  Set `MOONSHOT_API_KEY` in your environment or pass `api_key` directly.
</Warning>

## Parameters

| Name       | Type  | Default                        | Description                                      |
| ---------- | ----- | ------------------------------ | ------------------------------------------------ |
| `model`    | `str` | —                              | Model identifier (see available models below)    |
| `api_key`  | `str` | `None`                         | API key (defaults to `MOONSHOT_API_KEY` env var) |
| `base_url` | `str` | `"https://api.moonshot.ai/v1"` | Kimi API endpoint                                |

## Available Models

| Model                  | Context | Description                                       |
| ---------------------- | ------- | ------------------------------------------------- |
| `kimi-k2.5-preview`    | 256K    | Latest multimodal model with vision and reasoning |
| `kimi-k2-0711-preview` | 128K    | 1T parameter MoE model with strong reasoning      |
| `moonshot-v1-8k`       | 8K      | Fast responses for shorter contexts               |
| `moonshot-v1-32k`      | 32K     | Balanced performance and context                  |
| `moonshot-v1-128k`     | 128K    | Extended context for long documents               |

<Tip>
  Moonshot recommends `temperature=0.6` for balanced accuracy, or
  `temperature=1.0` for more creative responses.
</Tip>

## Function Calling

Kimi K2.5 supports function calling with automatic tool invocation:

```python theme={null}
@agent.llm.register_function(description="Get weather for a location")
async def get_weather(location: str) -> str:
    return f"The weather in {location} is sunny and 72°F"
```

See the [Function Calling guide](/guides/mcp-tool-calling) for details.

## Next Steps

<CardGroup cols={2}>
  <Card title="Build a Voice Agent" icon="microphone" href="/introduction/voice-agents">
    Get started with voice
  </Card>

  <Card title="Build a Video Agent" icon="video" href="/introduction/video-agents">
    Add video processing
  </Card>
</CardGroup>
