Search

Search HiAPI models, tools, and resources.

Back to blog
Tutorial

kimi-k3.1-pro-highspeed API: curl, Python and the Fast-Tier Decision

hiapikimi-k3.1-pro-highspeedapi-guidechat-completionshiapi

What you'll build

kimi-k3.1-pro-highspeed is the faster, higher-priced variant of kimi-k3.1-pro on hiapi. Both are called through POST /v1/chat/completions (not the async /v1/tasks queue used for image and video). This page gives you one working curl request, the Python equivalent, JSON mode and a tool call on this exact model id, and then answers the real question: is the speed worth the price? The numbers below come from paired requests run against the live API on 2026-10-30.

For the full parameter walkthrough (streaming, reasoning budgets, multi-turn rules) see the kimi-k3.1-pro API guide; this page does not repeat it. Earlier-generation readers can start from the kimi-k3 tutorial.

Prerequisites: an hiapi API key from the dashboard, sent as Authorization: Bearer sk-<your-key>.

Confirm the model id

GET /v1/models lists the id with a dot in 3.1 and no other suffix:

kimi-k3.1-pro-highspeed

The model page states a 1M-token context and up to 131,072 output tokens. Reasoning is always on, reasoning_effort accepts low, high or max (default max).

Minimal working request (curl)

curl https://api.hiapi.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-<your-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k3.1-pro-highspeed",
    "reasoning_effort": "low",
    "max_tokens": 2000,
    "response_format": {"type": "json_object"},
    "messages": [{"role": "user", "content": "Return a JSON object with keys city and population_millions for Tokyo. JSON only."}]
  }'

Actual response (HTTP 200, 4.9 s wall time):

{
  "model": "kimi-k3.1-pro-highspeed",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "{\"city\":\"Tokyo\",\"population_millions\":37.4}",
      "reasoning_content": "Kimi needs to respond with JSON only, ... Return {\"city\":\"Tokyo\",\"population_millions\":37.4}."
    },
    "finish_reason": "stop"
  }],
  "usage": {"prompt_tokens": 151, "completion_tokens": 100, "total_tokens": 251,
            "completion_tokens_details": {"reasoning_tokens": 70}}
}

content is clean JSON; the reasoning arrives separately in reasoning_content. 70 of the 100 completion tokens were reasoning, and they are billed as output.

Python equivalent

import json
import requests

resp = requests.post(
    "https://api.hiapi.ai/v1/chat/completions",
    headers={"Authorization": "Bearer sk-<your-key>"},
    json={
        "model": "kimi-k3.1-pro-highspeed",
        "reasoning_effort": "low",
        "max_tokens": 2000,
        "response_format": {"type": "json_object"},
        "messages": [{
            "role": "user",
            "content": "Return a JSON object with keys city and population_millions for Tokyo. JSON only.",
        }],
    },
    timeout=180,
)
resp.raise_for_status()
choice = resp.json()["choices"][0]
if choice["finish_reason"] == "length" and not choice["message"]["content"]:
    raise RuntimeError("reasoning used the whole max_tokens budget; raise max_tokens")
print(json.loads(choice["message"]["content"]))

Tool call on this endpoint

curl https://api.hiapi.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-<your-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k3.1-pro-highspeed",
    "reasoning_effort": "low",
    "max_tokens": 2000,
    "tool_choice": "auto",
    "tools": [{"type": "function", "function": {
      "name": "get_weather",
      "description": "Get current weather for a city",
      "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}}],
    "messages": [{"role": "user", "content": "What'"'"'s the weather in Osaka right now?"}]
  }'

Actual result: finish_reason: "tool_calls" with tool_calls[0].function.name = "get_weather" and arguments = "{\"city\":\"Osaka\"}" (HTTP 200, 4.5 s). When you send the tool result back, include the complete assistant message, including reasoning_content and tool_calls, as the model page instructs.

Highspeed vs standard: what we measured

Same prompt (the JSON-mode request above), reasoning_effort: "low", run against both ids from the same machine:

Runkimi-k3.1-pro-highspeedkimi-k3.1-pro
14.9 s11.5 s
24.5 s6.6 s
35.5 s7.8 s
45.1 s7.3 s

Highspeed stayed within 4.5–5.5 s; the standard tier ranged 6.6–11.5 s (median about 7.5 s). Streaming a short prompt told the same story with more noise: time to first byte was 3.4 s, 4.1 s and 3.0 s on highspeed versus 6.3 s and 15.9 s on the standard tier. Treat the numbers as a small sample from one network path, not a benchmark: completion length also varies from run to run (76–129 tokens on highspeed, 78–95 on standard) and affects wall time.

Price, from /api/pricing: highspeed input and output rates are exactly 2.0× those of kimi-k3.1-pro, while the cached-input rate is identical (1.0×). Current dollar rates are on the pricing page.

How to read that:

  • Latency-bound, user-facing calls (interactive agent turns, a chat box, a tool-call loop where each hop waits on the model): about 1.4–1.5× faster in our runs for 2× the token price. Reasonable when a human is waiting.
  • Batch, offline or background work: the standard tier delivers the same output at half the token price; use kimi-k3.1-pro (see its guide).
  • Long, cache-heavy prompts: cached input costs the same on both tiers, so the premium applies mostly to uncached input and to output (including reasoning tokens).
  • We did not compare answer quality between the tiers and make no claim either way; both returned the identical JSON for this prompt.

Notes from the test runs

  • temperature is rejected. Sending "temperature": 0.2 returned HTTP 400: {"error":{"code":"invalid_parameter","message":"temperature: is outside allowed values","type":"invalid_request_error"}}. Omit temperature and top_p (the model page says they are fixed at 1 and 0.95).
  • Reasoning counts toward max_tokens. Even at low effort, 70% of the tokens in the first request were reasoning. Keep max_tokens generous and handle finish_reason: "length" with empty content.
  • Switching tiers only requires changing the model string; the request body above worked unchanged on both ids.

FAQ

What is the model id for the fast tier? kimi-k3.1-pro-highspeed, with a dot in 3.1, as listed by GET /v1/models.

Does it support JSON mode and tool calls? Yes. Both requests above succeeded on this id (response_format: {"type":"json_object"} and tools with tool_choice: "auto").

How much more does it cost than kimi-k3.1-pro? Input and output token rates are 2.0× the standard tier; cached input is the same. See pricing for current dollar amounts.

Can I set temperature? No. The API returns a 400 invalid_parameter error; omit temperature and top_p.

Generate it with HiAPI

Choose a model, enter your prompt, and see the result.

HiAPI Blog

Related articles

HiAPI

Generate it with HiAPI

Start generating