LiveAdded 26 Oct 2026Moonshot AI

Kimi K3.1 Pro API

Moonshot's 3T-class open-weight flagship with a 1M context window, built for coding, 3D and financial agents.

Model spec

Input
$2.00per 1M tokens
Output
$10.00per 1M tokens
Cached input
$0.20per 1M tokens
Context
1.05M

Model ID

OpenAI-compatible · api.companyfabric.com/v1

Overview

About Kimi K3.1 Pro

Moonshot's 3T-class open-weight flagship with a 1M context window, built for coding, 3D and financial agents. Every model on CompanyFabric shares the same API key, billing balance, and rate-limit envelope, one integration covers the entire library.

Facts

At a glance

Availability

Live

Added 26 Oct 2026

Pricing

$2.00 in · $10.00 out

Per 1M tokens, metered exactly per call

Context window

1.05M tokens

Commercial use

See license

Commercial output use permitted per Moonshot terms.

Variants

All endpoints

Prompt library

Example runs

Refactor this 300-line route handler into service + validation layers.

// services/orders.ts…

This exact run cost $0.007

Quickstart

How to use the Kimi K3.1 Pro API

  1. 1

    Create a free CompanyFabric account, starter credits are included, no card required.

  2. 2

    Copy your API key from the dashboard. One key covers every model in the library.

  3. 3

    Point any OpenAI SDK at api.companyfabric.com/v1 and set model to "moonshotai/kimi-k3.1-pro".

  4. 4

    Read the exact metered cost of the call from the response, the same number shown in the playground.

Use cases

What teams build with it

Coding agents

Agentic edit loops, repo comprehension, and tool-driven refactors.

coding agenttool use

Autocomplete & FIM

Editor completions and fill-in-the-middle at latency and prices built for every keystroke.

autocompletefim

Bulk code generation

Test scaffolding, migrations, and boilerplate at commodity cost, reviewed by a frontier model.

codegentests

Get better output

Prompting tips

  • Give the failing test or error output verbatim, it beats describing the bug.
  • Constrain the diff: name the files in scope and forbid drive-by refactors.
  • Ask for the plan before the patch on multi-file changes.

Exact, metered, prepaid

Kimi K3.1 Pro pricing

Kimi K3.1 Pro pricing is per token: $2 / M input · $10 / M output · $0.2 / M cached input. Output tokens cost 5× input tokens, so long generations, not long prompts, are what actually drive most bills. A typical call with a 2k-token prompt and a 1k-token answer costs about $0.0140.

Every call is metered exactly and attributed to your key, the dashboard, the API usage response, and your invoice all read from the same ledger row. Cap any key's monthly spend with a budget cap, and bring your own provider key (BYOK) at 0% platform fee if you already have a direct contract.

EndpointTypePrice
Kimi K3Chat$3 / M input · $15 / M output
Kimi K3.1 ProChat$2 / M input · $10 / M output · $0.2 / M cached input
Kimi K3.1 Pro HighspeedChat$4 / M input · $20 / M output · $0.2 / M cached input
Kimi K2.6Chat$0.95 / M input · $4 / M output

Starter credits

Use Kimi K3.1 Pro free

Your CompanyFabric starter credits cover your first Kimi K3.1 Pro calls at no cost, create a free account, no card required, and the credits apply to Kimi K3.1 Pro and every other model on the key. When they run out, prepaid credits or BYOK (0% fee) take over with no plan to pick.

All ways to use AI models free →

Production-grade

Code samples

import OpenAI from "openai"

const client = new OpenAI({
  baseURL: "https://api.companyfabric.com/v1",
  apiKey: process.env.COMPANYFABRIC_API_KEY,
})

const res = await client.chat.completions.create({
  model: "moonshotai/kimi-k3.1-pro",
  max_tokens: 1024,
  temperature: 0.7,
  messages: [{ role: "user", content: "Say hello from the fabric." }],
})

console.log(res.choices[0].message.content)

Playground

Try it in the browser

Playground$2 in / $10 out per 1M tokens

Comparisons

Kimi K3.1 Pro vs the alternatives

Kimi K3.1 Pro vs Kimi K3

Kimi K3.1 Pro and Kimi K3 compete for the same code workloads. Both run behind the same CompanyFabric key at exact metered prices, A/B them on your real prompts and let the outputs decide, then switch with a one-line change.

Full comparison: Kimi K3.1 Pro vs Kimi K3 →

Kimi K3.1 Pro vs Claude Sonnet 4.5

Kimi K3.1 Pro and Claude Sonnet 4.5 compete for the same code workloads. Both run behind the same CompanyFabric key at exact metered prices, A/B them on your real prompts and let the outputs decide, then switch with a one-line change.

Full comparison: Kimi K3.1 Pro vs Claude Sonnet 4.5 →

Compare

Kimi K3.1 Pro head to head

FAQ

Frequently asked questions

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

$2 / M input · $10 / M output · $0.2 / M cached input. Every call is metered exactly and shown before you run it.

How do I get a Kimi K3.1 Pro API key?

Create a CompanyFabric account, and one key unlocks Kimi K3.1 Pro and every other model in the library. Free starter credits are included, no subscription, no card required to try it.

Why use Kimi K3.1 Pro on CompanyFabric instead of going direct?

One key, one prepaid balance, and one rate-limit envelope across the whole library, at pricing at parity with or below the direct API. Model switching is a one-line change, and BYOK routing is 0% fee.

Is the API OpenAI-compatible?

Yes, point any OpenAI SDK at api.companyfabric.com/v1 and set model to "moonshotai/kimi-k3.1-pro".

Can I use the output commercially?

Commercial output use permitted per Moonshot terms.

How does billing work?

Prepaid credits via card, or BYOK with your own provider keys at 0% platform fee. No subscription required; balances never expire.

Provider

About Moonshot AI

Moonshot AI publishes the kimi family. Also in this family: Kimi K3, Kimi K3.1 Pro Highspeed, Kimi K2.6. License: Commercial output use permitted per Moonshot terms.

One key. Every model. Exact prices.

Run Kimi K3.1 Pro with free starter credits. Free starter credits included, no subscription required.