Use kimi-k3.1-pro API for text generation: Q&A, coding, documents and agent workflows. Try it online and view pricing and Chat Completions examples.
Provider: Moonshot AI
Category: text generation
Endpoint: /v1/chat/completions
Status: Available
Cost: --
API access
Endpoint
POST /v1/chat/completions
Base URL
https://api.hiapi.ai
OpenAI Chat Completions compatible. Use one HiAPI key across all available models.
Input price
4,505.6 Credits
/ 1M tokens
Output price
23,567.2 Credits
/ 1M tokens
Context
1.05M
context window
Max output
131.1K
output tokens
Try kimi-k3.1-pro
Ask a question to stream the answer and inspect token usage, latency, and estimated cost.
kimi-k3.1-pro API Quickstart
Call kimi-k3.1-pro with the OpenAI-compatible Chat Completions format. Copy a ready-to-use cURL, Python, or Node.js example below.
/v1/chat/completionscurl -X POST "https://api.hiapi.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kimi-k3.1-pro",
"stream": false,
"messages": [
{
"role": "user",
"content": "A cat walking on the beach at sunset"
}
],
"reasoning_effort": "max"
}'Tip: Replace YOUR_API_KEY with your actual API key from the API Keys page.
Compatible with the OpenAI Chat Completions format. Set the base URL, API key, and model name to get started.
kimi-k3.1-pro API Pricing
Billing follows the input, output, and cache token categories actually reported in usage. All prices below are shown per 1 million tokens.
- Input tokens
- 4,505.6 Credits/ 1M tokens
- Output tokens
- 23,567.2 Credits/ 1M tokens
Prompts and context sent to the model
Responses and reasoning generated by the model
- Cache read
- 450.8 Credits/ 1M tokens
kimi-k3.1-pro Model Specifications
These specifications reflect the current public HiAPI text request contract. Undisclosed capabilities are not inferred by the page.
- Streaming
- Supported
- Tool calling
- Supported
- Structured JSON
- Supported
- Reasoning
- Supported
- Input modalities
- text
- Output modalities
- text
- Reasoning efforts
- low · high · max
- Max output
- 131.1K
About kimi-k3.1-pro
Use kimi-k3.1-pro API for text generation: Q&A, coding, documents and agent workflows. Try it online and view pricing and Chat Completions examples.
HiAPI exposes this model through /v1/chat/completions. Test prompts and parameters in the Playground, then use the same HiAPI API key in your server application.
- Provider
- Moonshot AI
- Endpoint
- /v1/chat/completions
- Context window
- 1.05M
- Released
- 2026-10-23
How to Use kimi-k3.1-pro
The Playground and API share the same model ID, so three steps take a prompt into production.
Step 1
Validate online
Test the system prompt, output length, and model-supported reasoning options in the Playground.
Step 2
Manage API keys
View an existing key or create another after signing in; one key works across all available models.
Step 3
Integrate your server
Send requests to /v1/chat/completions and track cost with the usage object.
Frequently asked questions
Should I use Kimi K3.1 Pro or Kimi K3?
K3.1 Pro is post-trained from K3 for coding, agent tool workflows, and long documents, and it is called the same way: the same /v1/chat/completions endpoint, always-on reasoning, and low/high/max efforts. Start new projects on kimi-k3.1-pro. To migrate from K3, change model to kimi-k3.1-pro, then compare quality and usage on your own tasks. The two models have different rates; see the model pricing.
How do I choose between low, high, and max?
Try low for routine extraction, rewriting, and short answers; high for multi-step analysis; and max for hard reasoning or whole-project coding. reasoning_effort defaults to max and accepts only these three values; there is no medium or none. Higher efforts usually spend more reasoning tokens and take longer, so choose by answer quality and usage.
Why can't I change temperature or turn reasoning off?
Reasoning is always on for K3.1 Pro, and temperature=1 and top_p=0.95 are fixed. Omit thinking, temperature, and top_p; a request with any other temperature or top_p value returns HTTP 400 and is not billed. To reduce cost, lower reasoning_effort to low first. When migrating from another model, remove these sampling parameters.
Why are output tokens high when the answer is short?
Reasoning is billed as output, so the visible answer length does not reflect total output. usage.completion_tokens already includes reasoning tokens; completion_tokens_details.reasoning_tokens is a breakdown, so do not add it twice. max_tokens also counts reasoning, and a very small value can cut the response off before the answer appears.
What do I need for multi-turn conversations and tool calls?
Send back the complete assistant message returned by the API, including content, reasoning_content, and tool_calls; keeping only the final text loses context. tool_calls are proposals that your application executes. Append a role=tool result whose tool_call_id matches the original call, then request the next turn. tool_choice accepts auto, none, and required; naming a specific function is not supported because reasoning is always on.
What is the difference between JSON mode and strict JSON Schema?
response_format.type=json_object returns JSON, but your application still validates the fields. To constrain fields and types, use response_format.type=json_schema with json_schema.schema and strict=true. Parse choices[0].message.content; do not include reasoning_content.
Does it accept images, video, or the Responses API?
The official K3.1 Pro understands images and video, but this HiAPI integration currently exposes text input and text output through Chat Completions only. Do not copy the official image_url, video_url, or Responses examples. Any future input types will appear in this page's capabilities and Playground controls.
How is context caching billed?
Repeated request prefixes are cached automatically with no extra parameter. Cached tokens appear in usage.prompt_tokens_details.cached_tokens and are billed at the cache-read rate; the rest of the input is billed as regular input. Cache hits are not guaranteed; see the model pricing for each rate.