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

# Moonshot

> Moonshot AI offers the Kimi model family with exceptional long-context capabilities (up to 1M token context window).

Moonshot offers 11 models through Lava's AI Gateway, supporting Chat Completions. Authentication uses `Authorization: Bearer`. See the [Moonshot API docs](https://docs.moonshot.ai) for provider-specific parameters.

<Info>Supports both **managed** (Lava's API keys) and **unmanaged** (bring your own credentials) mode.</Info>

## Quick Start

```typescript theme={null}
const response = await fetch('https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.moonshot.ai%2Fv1%2Fchat%2Fcompletions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${forwardToken}`,
  },
  body: JSON.stringify({
    model: 'kimi-k2-0905-preview',
    messages: [{ role: "user", content: "Hello!" }],
  }),
});
```

## Chat Completions

**Target URL:** `https://api.moonshot.ai/v1/chat/completions`

|                  |                                          |
| ---------------- | ---------------------------------------- |
| **Content Type** | `application/json`                       |
| **Streaming**    | Yes (set `stream: true` in request body) |

| Model                           | Input / 1M tokens | Output / 1M tokens |
| ------------------------------- | ----------------- | ------------------ |
| moonshot-v1-128k                | \$2.00            | \$5.00             |
| moonshot-v1-128k-vision-preview | \$2.00            | \$5.00             |
| kimi-k2-turbo-preview           | \$1.15            | \$8.00             |
| kimi-k2-thinking-turbo          | \$1.15            | \$8.00             |
| moonshot-v1-32k                 | \$1.00            | \$3.00             |
| moonshot-v1-32k-vision-preview  | \$1.00            | \$3.00             |
| kimi-k2-0905-preview            | \$0.60            | \$2.50             |
| kimi-k2-0711-preview            | \$0.60            | \$2.50             |
| kimi-k2-thinking                | \$0.60            | \$2.50             |
| moonshot-v1-8k                  | \$0.20            | \$2.00             |
| moonshot-v1-8k-vision-preview   | \$0.20            | \$2.00             |

## Next Steps

<CardGroup cols={2}>
  <Card title="All Providers" icon="grid" href="/gateway/supported-providers">
    Browse all supported AI providers
  </Card>

  <Card title="Forward Proxy" icon="route" href="/gateway/forward-proxy">
    Learn how to construct proxy URLs and authenticate requests
  </Card>
</CardGroup>
