Opening RouterHub
RouterHub

Kimi on RouterHub

Kimi K3.1 Pro API pricing and setup

Build apps with Kimi using the OpenAI-compatible Chat Completions API, one RouterHub API key, and prepaid credits. Compare published input, output, and cached input rates before choosing your model.

Kimi models and prices

See Models & pricing for current model IDs, rates, availability, and limits. These details can change; use that page before sending a request.

Input is the prompt you send; output is the response you receive. Cached input rates apply when the provider reports a cache hit. Prices come from RouterHub's current public catalogue; these are RouterHub rates. No separate subscription is required.

Get an API key

  1. Create a RouterHub account.
  2. Add prepaid credits.
  3. Create an API key and keep it in your local environment.
  4. Send a short Chat Completions request, then check Usage for its cost.

Send your first Kimi API request

Use the exact model ID kimi-k3.1-pro with https://routerhub.si/v1/chat/completions. Set ROUTERHUB_API_KEY in your local environment. This request uses prepaid credits.

cURL

curl --connect-timeout 30 --max-time 600 https://routerhub.si/v1/chat/completions \
  -H "Authorization: Bearer $ROUTERHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"kimi-k3.1-pro","messages":[{"role":"user","content":"Reply with OK."}]}'

Python

Install the OpenAI Python SDK with pip install openai.

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["ROUTERHUB_API_KEY"],
    base_url="https://routerhub.si/v1",
    timeout=600.0,
)
response = client.chat.completions.create(
    model="kimi-k3.1-pro",
    messages=[{"role": "user", "content": "Reply with OK."}],
)
print(response.choices[0].message.content)

Node.js

Install the OpenAI JavaScript SDK with npm install openai.

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.ROUTERHUB_API_KEY,
  baseURL: "https://routerhub.si/v1",
  timeout: 600000,
});
const response = await client.chat.completions.create({
  model: "kimi-k3.1-pro",
  messages: [{ role: "user", content: "Reply with OK." }],
});
console.log(response.choices[0].message.content);

Python SDK timeouts use seconds; JavaScript SDK timeouts use milliseconds. Both examples allow ten minutes per attempt. SDKs may retry automatically; check Usage and the request ID before manually rerunning a timeout.

Compare models or connect a tool

Compare all GPT, Claude, DeepSeek, GLM, and Grok prices · OpenCode setup · All setup guides

Current model IDs, protocols, and prices · API quickstart · OpenAPI reference · This setup guide