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

# Kimi K3.1 Pro

> Model ID, modalities, reasoning capabilities, and API usage for Kimi K3.1 Pro on CerasAI.

## Model ID

| Attribute | Value |
| - | - |
| Model ID | `moonshotai/Kimi-K3.1-Pro` |
| Maker | Moonshot AI |
| Modalities | Text, Vision (`image_url` / Anthropic `image`) |
| Context window | 1,048,576 tokens |
| Endpoints | `POST /v1/chat/completions`, `POST /v1/messages` |

Use `moonshotai/Kimi-K3.1-Pro` directly in all requests. Live per-million-token pricing and [rate limits](https://docs.cerasai.com/rate-limits.md) are published via [`GET /v1/models`](https://docs.cerasai.com/api-reference/models/list-available-models), [Models](https://console.cerasai.cloud/models), and [Limits](https://console.cerasai.cloud/limits).

## Capabilities

| Feature | Status |
| - | - |
| Streaming (SSE with final `usage`) | Supported |
| Vision (`image_url`) | Supported |
| Tool calling (`tools`, `tool_choice`) | Supported |
| Structured outputs (`json_object`, `json_schema`) | Supported |
| Reasoning (`reasoning_content`) | Supported |
| Anthropic Messages (`/v1/messages`) | Forwarded in the same protocol to the model's route |

## Reasoning behavior

`moonshotai/Kimi-K3.1-Pro` is Moonshot AI's frontier long-context reasoning and multimodal model, built for complex software engineering, agentic workflows, and deep document or image analysis. Reasoning tokens are returned in `message.reasoning_content` (or `delta.reasoning_content` while streaming) separately from final `content`.

`max_tokens` covers both reasoning tokens and final answer tokens. Provide ample output headroom on multi-step coding and architectural analysis tasks so the final `content` is not truncated (`finish_reason: "length"`).

## Quickstart

```python Python theme={"system"}
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["CERASAI_API_KEY"],
    base_url="https://api.cerasai.cloud/v1",
)

response = client.chat.completions.create(
    model="moonshotai/Kimi-K3.1-Pro",
    messages=[{"role": "user", "content": "Design a lock-free token bucket rate limiter in TypeScript."}],
    max_tokens=2048,
)

print(response.choices[0].message.reasoning_content)
print(response.choices[0].message.content)
```

```bash cURL theme={"system"}
curl https://api.cerasai.cloud/v1/chat/completions \
  -H "Authorization: Bearer $CERASAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "moonshotai/Kimi-K3.1-Pro",
    "messages": [{"role": "user", "content": "Design a lock-free token bucket rate limiter in TypeScript."}],
    "max_tokens": 2048
  }'
```

```python Vision theme={"system"}
response = client.chat.completions.create(
    model="moonshotai/Kimi-K3.1-Pro",
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "Review this architecture diagram and list potential bottlenecks."},
                {"type": "image_url", "image_url": {"url": "https://example.com/architecture.png"}},
            ],
        }
    ],
    max_tokens=1024,
)
print(response.choices[0].message.content)
```

## Supported parameters

CerasAI forwards OpenAI-compatible Chat Completions parameters natively without modifying your request payload:

* `messages`, `max_tokens`, `max_completion_tokens`
* `temperature` (`0`–`2`), `top_p`, `stop`, `seed`, `n`, `logprobs`, `top_logprobs`, `presence_penalty`, `frequency_penalty`
* `stream`, `stream_options`
* `tools`, `tool_choice` (`auto`, `required`, `none`, or named function)
* `response_format` (`text`, `json_object`, `json_schema`)
* `reasoning_effort`

See [Errors](https://docs.cerasai.com/errors.md) for HTTP status codes and retry behavior.


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