Kimi API

Kimi is Moonshot AI's model family, and its API uses the OpenAI format: Moonshot's own quickstart calls Kimi K3.1 Pro with the OpenAI SDK [1]. Straitly serves 4 Kimi models at https://api.straitly.ai/v1, on one key that calls all 117 of its models [6]. Change the base URL and key; keep your code.

Updated

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.straitly.ai/v1",
    api_key=os.environ["STRAITLY_API_KEY"],
)
reply = client.chat.completions.create(
    model="kimi-k3.1-pro",
    messages=[{"role": "user",
               "content": "Hello"}],
)

Which Kimi model should I use, and what does it cost?

ModelContextTool callsReleasedPrice
Kimi K3.1 Prokimi-k3.1-pro1.05MNot listed yetOctober 2026Live price
Kimi K3moonshotai/kimi-k31.05MYesJuly 2026Live price
Kimi K2.7 Codemoonshotai/kimi-k2.7-code262KYesJune 2026Live price
Kimi K2.6moonshotai/kimi-k2.6262KYesApril 2026Live price

Newest first. Kimi K3.1 Pro is Moonshot's newest model [3]. Rows and context windows are from the catalog [5]; release months from [3][4][5]. Tool calls are the catalog's value for each model [5]. Not listed yet means the catalog has not confirmed that detail yet. Moonshot's own prices are on its pricing page [2].

Is the Kimi API OpenAI-compatible?

Yes. Moonshot's quickstart uses the OpenAI Python SDK with its own base URL [1]. Straitly takes the same requests at https://api.straitly.ai/v1 with the model id kimi-k3.1-pro.

  • Kimi K3.1 Pro and Kimi K3 take up to 1,048,576 tokens of context. [5]
  • Kimi K2.7 Code and Kimi K2.6 take up to 262,144 tokens of context. [5]
  • The same key calls all 117 models on /models, so moving from Kimi to another lab is a change to the model string. [6]
  • Zero data retention is on by default for every account and key: prompts and completions are never written to disk or logs and never used for training. [7]

Setup for coding tools and SDKs is on integrations; the main endpoints are on the endpoints page.

Questions people ask about the Kimi API

Ask a question
  • The Kimi API is Moonshot AI's API for its Kimi models. It uses the OpenAI chat completions format, so the OpenAI SDK works with it. The newest model is Kimi K3.1 Pro. Straitly serves 4 Kimi models on one OpenAI-compatible key.
  • Kimi models are billed per million input and output tokens, and each model has its own price. Moonshot publishes its prices on its pricing page. Straitly shows the live price for each Kimi model on its own page (linked in the table above) and on /pricing.
  • Yes. Moonshot's own quickstart calls Kimi K3.1 Pro with the OpenAI Python SDK. Through Straitly, set base_url to https://api.straitly.ai/v1, use a Straitly API key and the model id kimi-k3.1-pro.
  • Kimi prices differ by provider and change often. The LLM API price index compares live prices per million tokens, and each Kimi model page shows Straitly's live price next to Moonshot's list price where Moonshot still lists the model.
  • No. Zero data retention is on by default for every account and key. Prompts and completions are never written to disk or logs and never used for training. Only billing metadata (timestamp, model, key, token counts, latency, status, charge) is kept. See data retention.

Sources

Last updated 21 November 2026. Model facts change. If something here is out of date, tell us at straitly.ai/contact.

  1. [1]Kimi K3.1 Pro quickstartMoonshot AI, checked 21 November 2026
  2. [2]Kimi API model pricingMoonshot AI, checked 21 November 2026
  3. [3]Kimi K3.1 Pro has launchedMoonshot AI forum, checked 21 November 2026
  4. [4]Kimi (AI): model versionsWikipedia, checked 21 November 2026
  5. [5]Straitly model catalogStraitly, read 25 November 2026
  6. [6]Straitly modelsStraitly, read 25 November 2026
  7. [7]Data retentionStraitly docs, checked 21 November 2026
How this page was checked

The Kimi rows are every Kimi model in Straitly's catalog on 25 November 2026. Moonshot's quickstart, pricing page and launch post were read on 21 November 2026. Release months come from the launch post, the public version list and the catalog.

Call Kimi K3.1 Pro on Straitly.

One OpenAI-compatible key for every Kimi model and the rest of the 117.