# Kimi K3.1 Pro API

Moonshot AI's 1M-context model for long-horizon coding and agent work, with tools, images and structured outputs.

Model id: `moonshotai/kimi-k3.1-pro`. Page: https://openscale.so/models/kimi-k3.1-pro

## Price per 1M tokens (USD)

| Mode | Input | Cached input | Output |
| --- | --- | --- | --- |
| Standard | $0.30 | $0.20 | $9.00 |

That is 6x cheaper than the market price of $2.00 input and $10.00 output.

## Specs

- Context length: 1,048,576 tokens
- Max output: 943,718 tokens per request
- Rate limits: 100 requests and 10,000,000 tokens per minute per model on each account, shared by its API keys
- Text and image input, text output.
- Tool calling.
- Structured outputs with a JSON schema, and JSON mode.
- Reasoning you can turn on or off; the reasoning is returned as reasoning. Reasoning effort: low, medium, high.

## Versions

| Model id | Version | Released | Behavior |
| --- | --- | --- | --- |
| `moonshotai/kimi-k3.1-pro` | 1023 | 23 Oct 2026 | Moves to each new tested version |

## Quick start

### curl

```bash
curl https://api.openscale.so/v1/chat/completions \
  -H "Authorization: Bearer $OPENSCALE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "moonshotai/kimi-k3.1-pro",
    "messages": [{"role": "user", "content": "Explain what a token is in one sentence."}]
  }'
```

### OpenAI SDK (Python)

```python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.openscale.so/v1",
    api_key=os.environ["OPENSCALE_API_KEY"],
)

response = client.chat.completions.create(
    model="moonshotai/kimi-k3.1-pro",
    messages=[{"role": "user", "content": "Explain what a token is in one sentence."}],
)
print(response.choices[0].message.content)
```

### Anthropic SDK (Python)

```python
import os
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.openscale.so/anthropic",
    api_key=os.environ["OPENSCALE_API_KEY"],
)

message = client.messages.create(
    model="moonshotai/kimi-k3.1-pro",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Explain what a token is in one sentence."}],
)
print(next(block.text for block in message.content if block.type == "text"))
```

## Set up a coding agent

- [Claude Code](https://openscale.so/setup/claude-code.md)
- [Codex](https://openscale.so/setup/codex.md)
- [OpenCode](https://openscale.so/setup/opencode.md)
- [OpenClaw](https://openscale.so/setup/openclaw.md)
- [Cline](https://openscale.so/setup/cline.md)
- [GitHub Copilot](https://openscale.so/setup/copilot.md)
- [DeepSeek Harness](https://openscale.so/setup/deepseek-harness.md)
- [Hermes](https://openscale.so/setup/hermes.md)
- [Kilo Code](https://openscale.so/setup/kilo-code.md)
- [Pi](https://openscale.so/setup/pi.md)
- [Zed](https://openscale.so/setup/zed.md)
- [Factory Droid](https://openscale.so/setup/droid.md)

API reference: https://openscale.so/docs. Live model catalog: https://api.openscale.so/v1/models.

## FAQ

### How much does the Kimi K3.1 Pro API cost?

$0.30 per 1M input tokens, $0.20 per 1M cached input tokens and $9.00 per 1M output tokens. That is 6x cheaper than the market price of $2.00 input and $10.00 output. You pay only for the tokens you use, from prepaid credit.

### Is the Kimi K3.1 Pro API OpenAI compatible?

Yes. Point any OpenAI SDK at https://api.openscale.so/v1 and use the model id moonshotai/kimi-k3.1-pro, with Chat Completions or Responses. Anthropic SDKs work too, at https://api.openscale.so/anthropic.

### What is the context length of Kimi K3.1 Pro?

1,048,576 tokens in total, input and output together, with up to 943,718 tokens of output per request.

### Can I use Kimi K3.1 Pro in a coding agent?

Yes. OpenScale has a tested setup for 12 coding agents, including Claude Code, Codex, OpenCode, OpenClaw. One API key works for every agent.

### What are the rate limits for Kimi K3.1 Pro?

100 requests and 10,000,000 tokens per minute per model on each account, shared by its API keys. Need more? Email hello@openscale.so.

### How do I start?

Create an account, add credit and create an API key. New accounts get free credit to try it.
