> ## 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 6 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.

> [!NOTE]
>
> Supports both **managed** (Lava's API keys) and **unmanaged** (bring your own credentials) mode.

## 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-k3.1-pro',
    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 |
| - | - | - |
| kimi-k3.1-pro-highspeed | \$4.00 | \$20.00 |
| kimi-k3 | \$3.00 | \$15.00 |
| kimi-k3.1-pro | \$2.00 | \$10.00 |
| kimi-k2.7-code-highspeed | \$1.90 | \$8.00 |
| kimi-k2.6 | \$0.95 | \$4.00 |
| kimi-k2.7-code | \$0.95 | \$4.00 |

## Next Steps

> [card] [All Providers](https://lava.so/docs/gateway/supported-providers.md)
>
> Browse all supported AI providers

> [card] [Forward Proxy](https://lava.so/docs/gateway/forward-proxy.md)
>
> Learn how to construct proxy URLs and authenticate requests


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.