Skip to content
Giallo

Kimi API: models, prices and Moonshot integration

Kimi API: Moonshot endpoints, current models, tokens, caching and tools. Estimate costs and design a business integration you can control.

Reading time: 10 min

Kimi API and Moonshot connected to enterprise software with token and tool control

The Kimi APIs allow you to use Kimi models inside a software, without automating the chat interface. The backend sends a authenticated request to the platform, receives a response and decides how to use it: fill out a draft, extract fields, respond with sources or propose an action. The platform documents OpenAI and Anthropic compatible protocols. Official API Overview.

Compatibility simplifies the technical connection; it does not make interchangeable costs, parameters or responsibilities. In the public product you can choose a function from the interface. In an integration you have to design what happens when the model goes wrong, the service slows down, an answer arrives incomplete or the budget is consumed.

The information reported here is verified at 9 October 2026. To understand the family of products before linking, read What is Kimi AI. This page is about the consumer API service; chat subscriptions and quota coding have a different perimeter.

In summary

  • The API key belongs to the backend: the frontend must call your service, not expose the provider's credentials.
  • The compatibility of the protocol does not eliminate the specific parameters of the chosen model.
  • The cost includes input, output, cache and any tools: the price of the input alone is insufficient.
  • The model proposes content and calls to tools; the software applies permissions, controls and limits.
  • A useful pilot measures cost per completed practice, errors and revision work.

What is the correct Kimi API endpoint?

For the international OpenAI-compatible service, the base URL is https://api.moonshot.ai/v1; the platform documents Chat Completions on /chat/completions and Responses on /responses. The Anthropic Messages protocol uses the base https://api.moonshot.ai/anthropic. Authentication is done via Bearer key. Endpoints and Authentication.

The Moonshot name in the endpoint does not indicate that you need to use an old set of models. It is the address of the service: the model is chosen separately in the request. It is an important distinction when copying a configuration found online, because many guides continue to report historical identifiers.

Also Kimi Code is separated. The international URL base coding OpenAI-compatible is https://api.kimi.ai/coding/v1, with its own credentials and benefits. Do not replace the address in the business integration by thinking of automatically transferring membership shares. Official Code Configuration. The related product is explained in the guide to Kimi Code.

It then records protocol, base URL, model ID, and key origin in the project. If one of these items does not match the others, changing the prompt text does not solve the problem. For those who start from scratch, the guide to AI API clarifies the role of request, response and backend.

Which Kimi API models are available?

The current list includes kimi-k3, kimi-k2.7-code, kimi-k2.7-code-highspeed and kimi-k2.6. The documented context is 1,048,576 tokens for K3 and 262.144 tokens for the other models listed. They are API capabilities: they should not be automatically transferred to the chat or Code plan. Always check the official list of models.

The same source declares the APIs discontinued kimi-k2.5 and moonshot-v1 from 31 August 2026, the series kimi-k2 from 25 May 2026 and also the alias kimi-latest. A tutorial using these names may still be useful for a concept, but it is not a current configuration to bring into production. The availability of weights of a historical model is another issue. Available Models and Deprecations.

Don't always choose the bigger context. If the process is to classify a short request, sending the entire archive increases noise and treated material. If you have to compare documents, prepare the corpus and references. The ability to contain text does not guarantee that every step is understood or that a data is retrieved correctly.

How to make a request to Kimi K3 without obsolete parameters?

K3 API always active thinking. The camp reasoning_effort admits low, high and max, with default max. The guide reports fixed sampling parameters: avoid pasting generic options for temperatures and penalties from an integration of another model. Kimi K3 API Guide.

This example shows the minimum body of a request to Chat Completions. It is illustrative and has not been run with an API key or credit; the authentication configuration remains in the backend.

{
  "model": "kimi-k3",
  "reasoning_effort": "low",
  "messages": [
    {
      "role": "user",
      "content": "Classifica questa richiesta sintetica: vorrei il catalogo dei ricambi. Rispondi con categoria e motivo, senza inventare dati."
    }
  ]
}

The next step is not to freely show its response to the customer. First define a contract: allowed categories, mandatory fields, handling ambiguous requests. The guide documents structured output json_schema with strict mode; your software still needs to check if the values make sense for the process. A formally valid JSON can misclassify the content. Structured output K3.

In later conversations the guide requires you to keep the full assistant message, including reasoning_content and tool_calls, instead of just the final text. Avoid reconstructing a partial history if the workflow uses tools. Conversations and K3 calls. This behavior is also deepened in the page on Kimi K3.

How much do Kimi APIs cost?

The current price list is in USD per million tokens, excluding taxes. The following table separates cached input, non-cached input and output; it concerns inference, not chat subscription. Prices and availability should be double checked in the Official API Price list.

Model Input cache hit Input cache miss Output
K3 0.30 USD 3,00 USD 15.00 USD
K2.7 Code 0.19 USD 0.95 USD 4,00 USD
K2.7 Code HighSpeed 0.38 USD 1.90 USD 8,00 USD
K2.6 0.16 USD 0.95 USD 4,00 USD

For K3, cache writing has a distinct entry: 3 USD per million tokens with five-minute TTL or 6 USD with one-hour TTL. The documented default is five minutes; a hit renews the TTL without an additional write fee. In Chat Completions and Responses, cache reads, writes and the non-cached remainder are mutually exclusive parts of the total input: do not also charge the same tokens as a cache miss. Prices inference and cache accounting rules.

Here's a hypothetical calculation, without tools and without fees: a K3 request with 20,000 total input tokens, all accounted for as cache write with TTL five minutes, and 2,000 output tokens costs 0.06 + 0.03 = 0.09 USD. No other 20,000 cache miss tokens are added. With the same input written to TTL one hour, the account becomes 0.12 + 0.03 = 0.15 USD. Values are derived from official pricing and from distribution of input in cache guide, not from an observed bill.

A hypothetical request with the same 20,000 tokens entirely cached and 2,000 output would instead have inference equal to 0.006 + 0.03 = 0.036 USD, without new write fee for that hit. It does not mean that all future inputs will hit the cache: variable data, different prefixes and expiration change the result. Pricing and Cache Rules.

To reconcile consumption Chat Completions, read usage.prompt_tokens as total, then subtract cached_tokens and cache_write_tokens from its details to obtain the non-cached residue. Apply your own rate to each part and add the output. Usage fields and official accounting.

For the business budget, the cost of full practice counts. Add repeated attempts, agent steps, tools, and revision. The guide to AI API cost calculation offers a method; the one on the AI tokens explains why pages, words, and tokens are not equivalent.

How to use caches and tools without inflating the account?

Cache works best when stable context precedes variable data. A good structure puts first instructions, definitions and shared material; then it places the new request. Do not add a random timestamp to the start of each prompt if you want to reuse a prefix. The guide describes automatic caching and isolation by organization. Context caching.

Web search has a distinct cost. The list documents REST Basic /v1/tools/search at 0.002 USD per call, Pro /v1/tools/search_pro at 0.003 USD and fetch /v1/tools/fetch at 0.002 USD, excluding taxes; charging conditions depend on success with results or content. The legacy $web_search is scheduled to decommission on 20 October 2026: don't build a new flow on that method. WebSearch Pricing.

The K3 Guide also contains a warning about the up-to-date web search and its use in production workflows in the short term. The presence of an endpoint and a price list does not eliminate this document limit. Evaluate a separate, controlled search or wait for operational confirmations for your case. K3 Guide Notice.

When can the cache be convenient?

When you actually repeat the same prefix within its useful lifetime: for example, stable instructions and documentation for requests made close together. Compare reads, writes and expirations in the observed usage. If every case contains a different document or requests are far apart, the benefit may decrease. The decision must start from the pilot’s usage traces, not just the cache-hit price.

Two Italian integrations with a delimited result

Hypothetical scenario: distributor of components in Padua. The business management software receives sales enquiries in free text. A service reads only the necessary description and asks the model for the category, missing information and reasoning. It does not send the confidential price list or authorise an offer.

The backend checks that the category belongs to the catalogue of allowed categories. If the message contains incompatible requests or missing references, it opens a practice to complete. The operator sees original text and proposal side by side; sending to the customer is done with approval. The pilot measures reclassifications and review time, without promising savings before the test.

Hypothetical scenario: maintenance company in Parma. An app collects technical notes written after the intervention. The template proposes a summary and reports missing fields, using an approved internal vocabulary. The intervention codes come from management software: they are not invented by AI.

The system saves the summary as a draft and keeps the source text. The manager checks materials and activities before closing. A vague response or network error must not turn into a completed intervention. This boundary prevents a generation problem from becoming an irreversible operational change.

What happens with limitations, errors, and incomplete answers?

The platform connects tiers and limits to cumulative charging; to get started it documents a minimum charging of 1 USD. Competition, requests and tokens have separate quotas, and the search has its own limits. Don't design the stream by assuming that each account handles the same traffic. Recharge and Rate Limits.

In the case of HTTP 429, apply controlled backoff and retries, as indicated by the documentation on limits. A queue can absorb a spike; uncontrolled simultaneous attempts can worsen it. Also define when to stop retrying and pass the case to a person. API Limit Management.

Check the completeness of the response before using it. truncated output, absence of unknown fields or categories must produce a visible state, not a convenient value. It retains an internal practice identifier to avoid duplication when an operator repeats the action after a timeout.

The most expensive mistake is to let the model choose permissions and destinations. A tool call is a proposal: the backend must validate arguments, identity and authorization. If you want to build this path with visual nodes, the guide Kimi AI with n8n shows how to separate interpretation and writing.

What contract must the API have inside your software?

Define an internal interface that describes the work, rather than exposing every detail of the provider to the rest of the application. A business function as a “proposal category of the request” should return proposal, motivation and review status. The component that calls Kimi handles protocol, metering and errors; management software continues to know its own process.

This boundary allows the configuration of the model to be updated without changing the meaning of the practice. It is not necessary to build a universal system for all providers: just avoid that the commercial code depends on a free text that is difficult to validate. It also preserves the version of the instructions used, so an abnormal classification can be traced back to the behavior actually required.

For real-effect operations, add a separate constraint: no model response is equivalent to a user confirmation on its own. It is the application service that determines whether a proposal can be saved, sent or only shown.

How to decide if integration is ready?

Before release you need to be able to answer concrete questions: what data comes out of the company, how much does a completed practice cost, how do you recognize an error and who can authorize an update. Privacy and retention are not inferred from the presence of an API; check the product and contract in the guide Kimi AI Privacy.

Take only a workflow with defined inputs, validated outputs and a human path for exceptions into production. If you want to connect Kimi to an application or business management system with these boundaries already designed, Giallo develops the software needed for integration. The final criterion is a verifiable practice from start to finish.

Giallo Studio guides: methodology and sources

How we apply it in the company

Related resources

AI consulting services and process automation

FAQ

What are the Kimi APIs?

They are the Kimi platform's interfaces for calling models from software. They let you send requests from the backend and use responses within a process, with authentication and pay-as-you-go costs.

Does the chat subscription include API credit?

Do not assume so. Chat membership, the Code service and the API platform are separate products: check credit, keys and billing on the platform you will use.

Does OpenAI compatible mean identical to OpenAI?

No. You can reuse a compatible protocol or client, but models, parameters, and limits remain those of the provider. A generic configuration can send unsupported options.

How do I keep my Kimi API key safe?

Keep it in the credentials or secrets of the backend, with limited access. Do not place it in a prompt, visitor's browser or repository; also prepare a revocation procedure.

Does the cache make repeated requests free?

No. The price list distinguishes cache reads, uncached input, output and cache writes. Actual cost depends on the reused prefix and configured duration.

Can the APIs directly update the business management system?

The model may propose the use of a tool, but it is your software that executes it. Authorizations, argument validation and approval of operations must be implemented by the system.

Put it into practice

Let's turn this guide into your first live workflow.

Tell us what process you want to lighten: we evaluate feasibility, return and first operational step.