Unlock exclusive introductory pricing for the newly launched Gemini 3.5 Flash.
M

Kimi-K2

Wejście:$0.48/M
Wyjście:$1.92/M
Wydano:Oct 1, 2025

- **kimi-k2-250905**: wersja 0905 serii Kimi K2 firmy Moonshot AI, obsługująca ultradługi kontekst (do 256k tokenów, frontend i wywołania narzędzi). - 🧠 Ulepszone wywoływanie narzędzi: 100% dokładność, płynna integracja, odpowiednie do złożonych zadań i optymalizacji integracji. - ⚡️ Wyższa wydajność: TPS do 60-100 (standardowe API), do 600-100 w trybie Turbo, zapewnia szybszą odpowiedź i ulepszone możliwości wnioskowania, data odcięcia wiedzy do połowy 2025 r.

Nowy
Użycie komercyjne

Technical Specifications of kimi-k2

ItemDetails
Model IDkimi-k2
ProviderMoonshot AI
Version referencedkimi-k2-250905
Context windowUp to 256k tokens
Tool callingSupported
PerformanceStandard API TPS up to 60–100
Turbo performanceTurbo mode TPS up to 600–100
Knowledge cutoffUp to mid-2025
Best forUltra-long context tasks, complex tool workflows, integration optimization

What is kimi-k2?

kimi-k2 is CometAPI’s platform identifier for Moonshot AI’s Kimi K2 series 0905 version. It is designed for ultra-long-context workloads, with support for up to 256k tokens as well as frontend and Tool calls. The model is positioned for users who need strong performance on complex tasks, especially scenarios that benefit from reliable tool orchestration, long-document handling, and fast inference.

On CometAPI, kimi-k2 can be used as the model ID when sending compatible chat completion requests through the unified API, making it easier to integrate Moonshot AI capabilities into existing applications without changing provider-specific infrastructure.

Main features of kimi-k2

  • Ultra-long context: Supports contexts up to 256k tokens, making it suitable for long documents, extended conversations, large codebases, and multi-step task execution.
  • Enhanced Tool Calling: Built for strong tool-use performance with 100% accuracy claims, enabling seamless integration for complex workflows, external function execution, and automation-heavy applications.
  • Efficient performance: Delivers TPS up to 60–100 through the standard API, helping reduce latency for production use cases that require responsive outputs.
  • Turbo mode acceleration: Offers Turbo mode throughput up to 600–100, improving response speed for high-demand or large-scale inference scenarios.
  • Integration-friendly design: Supports frontend and Tool calls, making it easier to embed into apps, agent systems, and operational pipelines.
  • Stronger inference capability: Optimized to provide improved reasoning and task execution quality for sophisticated business and developer workflows.
  • Recent knowledge coverage: Includes a knowledge cutoff up to mid-2025, which helps on tasks requiring relatively recent background knowledge compared with older-generation models.

How to access and integrate kimi-k2

Step 1: Sign Up for API Key

To use kimi-k2, first create an account on CometAPI and generate your API key from the dashboard. After you have your key, store it securely and use it in the Authorization header for all API requests.

Step 2: Send Requests to kimi-k2 API

Send requests to CometAPI’s compatible chat completions endpoint and specify kimi-k2 as the model name.

curl --request POST \
  --url https://api.cometapi.com/v1/chat/completions \
  --header "Authorization: Bearer YOUR_COMETAPI_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "kimi-k2",
    "messages": [
      {
        "role": "user",
        "content": "Summarize the following document and identify key action items."
      }
    ]
  }'
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_COMETAPI_KEY",
    base_url="https://api.cometapi.com/v1"
)

response = client.chat.completions.create(
    model="kimi-k2",
    messages=[
        {
            "role": "user",
            "content": "Summarize the following document and identify key action items."
        }
    ]
)

print(response.choices[0].message.content)

Step 3: Retrieve and Verify Results

After receiving the response, parse the returned content from the API response object and validate that the output matches your task requirements. For production integrations, you should also verify structured fields, check tool outputs when applicable, and add retries, logging, and guardrails to improve reliability.

Cennik dla Kimi-K2

Poznaj konkurencyjne ceny dla Kimi-K2, zaprojektowane tak, aby pasowały do różnych budżetów i potrzeb użytkowania. Nasze elastyczne plany zapewniają, że płacisz tylko za to, czego używasz, co ułatwia skalowanie w miarę wzrostu Twoich wymagań. Odkryj, jak Kimi-K2 może ulepszyć Twoje projekty przy jednoczesnym utrzymaniu kosztów na rozsądnym poziomie.

ModelComet Price (USD / M Tokens)Official Price (USD / M Tokens)Discount
kimi-k2.5
Wejście:$0.48/M
Wyjście:$2.4/M
Wejście:$0.6/M
Wyjście:$3/M
-20%
kimi-k2.6
Wejście:$0.76/M
Wyjście:$3.19998/M
Wejście:$0.95/M
Wyjście:$3.999975/M
-20%
kimi-k2.7-code
Wejście:$0.76/M
Wyjście:$3.19998/M
Wejście:$0.95/M
Wyjście:$3.999975/M
-20%

Przykładowy kod i API dla Kimi-K2

Uzyskaj dostęp do kompleksowego przykładowego kodu i zasobów API dla Kimi-K2, aby usprawnić proces integracji. Nasza szczegółowa dokumentacja zapewnia wskazówki krok po kroku, pomagając wykorzystać pełny potencjał Kimi-K2 w Twoich projektach.

#!/bin/bash
# Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here

curl "https://api.cometapi.com/v1/chat/completions" \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k2-0905-preview",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello!"}
    ]
  }'

cURL Code Example

#!/bin/bash
# Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here

curl "https://api.cometapi.com/v1/chat/completions" \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k2-0905-preview",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello!"}
    ]
  }'

Python Code Example

from openai import OpenAI
import os

# Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"
BASE_URL = "https://api.cometapi.com/v1"

client = OpenAI(base_url=BASE_URL, api_key=COMETAPI_KEY)

completion = client.chat.completions.create(
    model="kimi-k2-0905-preview",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"},
    ],
)

print(completion.choices[0].message.content)

JavaScript Code Example

import OpenAI from "openai";

// Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
const COMETAPI_KEY = process.env.COMETAPI_KEY || "<YOUR_COMETAPI_KEY>";
const BASE_URL = "https://api.cometapi.com/v1";

const client = new OpenAI({
  apiKey: COMETAPI_KEY,
  baseURL: BASE_URL,
});

async function main() {
  const completion = await client.chat.completions.create({
    model: "kimi-k2-0905-preview",
    messages: [
      { role: "system", content: "You are a helpful assistant." },
      { role: "user", content: "Hello!" },
    ],
  });

  console.log(completion.choices[0].message.content);
}

main();

Wersje modelu Kimi-K2

Powody, dla których Kimi-K2 posiada wiele migawek, mogą obejmować takie czynniki jak: różnice w wynikach po aktualizacjach wymagające starszych migawek dla zachowania spójności, zapewnienie programistom okresu przejściowego na adaptację i migrację, oraz różne migawki odpowiadające globalnym lub regionalnym punktom końcowym w celu optymalizacji doświadczenia użytkownika. Aby poznać szczegółowe różnice między wersjami, zapoznaj się z oficjalną dokumentacją.

Version
kimi-k2.5
kimi-k2.6
kimi-k2.7-code