Kimi K2.6 API 點用:Moonshot endpoint、model ID 同快速調用範例
官方 Kimi/Moonshot API 兼容 OpenAI;SDK 用 做 base url,直接 HTTP chat 則用 /chat/completions。[13] Kimi K2.6 的 model ID 建議先在你自己的 Moonshot 戶口用 GET /models 讀取,不好靠產品名估或抄文件示例。[17] AIMLAPI、OpenRouter 等第三方 gateway 有自己的 model ID;那些 ID 只應在相應 gateway 使用,不應直接搬到官方 Moonshot endpoint。[1][5]
Cách dùng Kimi K2.6 qua API Moonshot: endpoint đúng và model IDLuồng nên dùng: cấu hình endpoint Moonshot, gọi /models để xác minh model ID, rồi gửi request chat.
AI 提示
Create a landscape editorial hero image for this Studio Global article: Cách dùng Kimi K2.6 qua API Moonshot: endpoint đúng và model ID. Article summary: Dùng Kimi K2.6 qua API Moonshot bằng OpenAI SDK với base url https://api.moonshot.ai/v1, rồi gọi /chat/completions; điểm cần kiểm chứng là model ID, nên gọi /models trong tài khoản thay vì đoán.. Topic tags: ai, kimi, moonshot ai, llm, api. Reference image context from search candidates: Reference image 1: visual subject "# Moonshot AI (Kimi K2.6). ## Step 1: Create a Moonshot API account. Go to and create a new Moonshot API account. ## Step 2: Set up Moonshot API account. To use the model via API," source context "Moonshot AI (Kimi K2.6)" Reference image 2: visual subject "Connect and use Kimi K2.6 from Moonshot AI with API Key - Featured image. # How to use Kimi K2.6 from Moonshot AI with API Key on TypingMind. Learn how to access and
openai.com
如果你想由 Moonshot 官方 Kimi API 用 Kimi K2.6,先記住一件事:最易中伏的通常唔係 URL,而係 model 填錯。Kimi Open Platform 表示,它的 HTTP API 兼容 OpenAI,可以直接用 OpenAI SDK;用 SDK 時要把 base_url 設為 https://api.moonshot.ai/v1,如果直接打 HTTP,chat 的完整 endpoint 是 https://api.moonshot.ai/v1/chat/completions。[13]
真正要小心的是 model ID。Kimi 的 List Models 頁面寫明 Kimi K2.6 已發布,但文件中的 sample response 仍然用 id = kimi-k2.5 做示例。最穩陣做法,是在你自己的 Moonshot 戶口先打
部分中介服務會為 Kimi K2.6 設定自己的 model ID。AIMLAPI 的文件使用 https://api.aimlapi.com/v1/chat/completions,model 寫作 moonshot/kimi-k2-6。[1] OpenRouter 的 API 頁面則顯示 model 為 moonshotai/kimi-k2.6。[5]
這些 ID 只應該在你經相應 gateway 調用時使用。當你打的是官方 https://api.moonshot.ai/v1/chat/completions,低風險做法仍然是先
官方 Kimi/Moonshot API 兼容 OpenAI;SDK 用 https://api.moonshot.ai/v1 做 base url,直接 HTTP chat 則用 /chat/completions。[13]
Kimi K2.6 的 model ID 建議先在你自己的 Moonshot 戶口用 GET /models 讀取,不好靠產品名估或抄文件示例。[17]
AIMLAPI、OpenRouter 等第三方 gateway 有自己的 model ID;那些 ID 只應在相應 gateway 使用,不應直接搬到官方 Moonshot endpoint。[1][5]
人們還問
「Kimi K2.6 API 點用:Moonshot endpoint、model ID 同快速調用範例」的簡短答案是什麼?
官方 Kimi/Moonshot API 兼容 OpenAI;SDK 用 https://api.moonshot.ai/v1 做 base url,直接 HTTP chat 則用 /chat/completions。[13]
首先要驗證的關鍵點是什麼?
官方 Kimi/Moonshot API 兼容 OpenAI;SDK 用 https://api.moonshot.ai/v1 做 base url,直接 HTTP chat 則用 /chat/completions。[13] Kimi K2.6 的 model ID 建議先在你自己的 Moonshot 戶口用 GET /models 讀取,不好靠產品名估或抄文件示例。[17]
接下來在實務上我該做什麼?
AIMLAPI、OpenRouter 等第三方 gateway 有自己的 model ID;那些 ID 只應在相應 gateway 使用,不應直接搬到官方 Moonshot endpoint。[1][5]
接下來我應該探索哪個相關主題?
繼續“Claude Security 公測版:Anthropic 點樣用 AI 幫企業掃 code 漏洞”以獲得另一個角度和額外的引用。
Tìm kiếm và kiểm chứng thông tin: Cách dùng Kimi K2.6 qua API như thế nào?
Studio Global AI19 來源
引用的答案
Có thể dùng Kimi K2.6 qua API theo cách gần giống OpenAI API, nhưng từ bằng chứng hiện có, phần chắc chắn nhất là cách kết nối vào nền tảng Kimi/Moonshot và các endpoint chính; còn ví dụ payload đầy đủ riêng cho đúng model ID của Kimi K2.6 thì bằng chứng hiện tại chưa hiển thị rõ. [3][7][8]
Cách dùng qua API chính thức của Kimi/Moonshot
Kimi Open Platform cung cấp HTTP API tương thích OpenAI, nên có thể dùng trực tiếp OpenAI SDK. [3]
Khi dùng SDK, cần đặt base_url là https://api.moonshot.ai/v1. [3]
Nếu gọi HTTP trực tiếp, endpoint gốc cũng là https://api.moonshot.ai/v1. [3]
API chat có tài liệu “Basic Information”, cho thấy cách gọi theo kiểu chat.completions.create(...) với model và messages, tức cùng kiểu request body như OpenAI Chat Completions. [4]
Gọi API chat theo chuẩn OpenAI-compatible, truyền model và messages. [3][4]
Nếu chưa chắc model ID chính xác của Kimi K2.6, gọi endpoint /models để kiểm tra danh sách model khả dụng trước. [8]
Mẫu gọi API tối thiểu
Ví dụ theo đúng hướng dẫn tổng quan của Kimi là dùng OpenAI SDK với base_url của Moonshot. [3]
python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_KIMI_API_KEY",
base_url="https://api.moonshot.ai/v1"
)
resp = client.chat.completions.create(
model="KIMI_K2_6_MODEL_ID",
messages=[
{"role": "user", "content": "Xin chào, hãy tự giới thiệu."}
]
)
print(resp)
Phần model="KIMI_K2_6_MODEL_ID" ở trên chỉ là chỗ điền model ID thực tế; trong bằng chứng hiện có, tôi không thấy snippet nào hiển thị trực tiếp tên model ID chính xác của Kimi K2.6 trong request mẫu. [7][8]
Nếu cần kiểm tra khả năng truy cập và billing trước, có thể gọi endpoint balance bằng Bearer token. [5]
Nếu dùng bên trung gian thay vì API chính thức
Có tài liệu bên thứ ba từ AIMLAPI cho model kimi-k2-6, và ví dụ của họ gọi
Điều này cho thấy Kimi K2.6 cũng có thể được truy cập qua nhà cung cấp trung gian, nhưng đây không phải endpoint chính thức của Kimi/Moonshot. [1][3]
Điều đã kiểm chứng được và điều chưa chắc
Đã kiểm chứng được rằng Kimi API là OpenAI-compatible và dùng base URL https://api.moonshot.ai/v1. [3]
Đã kiểm chứng được rằng có tài liệu riêng cho Kimi K2.6 và tài liệu model list xác nhận Kimi K2.6 đã phát hành. [7][8]
Đã kiểm chứng được rằng nền tảng có các endpoint cho chat, list models, balance, và batch. [4][5][6][8]
Chưa kiểm chứng được từ bằng chứng hiện có tên model ID chính xác cần điền khi gọi Kimi K2.6 trong request body. Insufficient evidence. [7][8]
Nếu bạn muốn, tôi có thể viết tiếp cho bạn một mẫu hoàn chỉnh bằng curl, Python, hoặc JavaScript theo đúng kiểu OpenAI-compatible, với chỗ nào chưa xác minh được tôi sẽ đánh dấu rõ.
import requests import requests import json for getting a structured output with indentation import json for getting a structured output with indentation response = requests.post( response = requests.post( " " headers={ headers={ Insert your AIML API Key in...
Moonshot AI (Kimi K2.6). Step 1: Create a Moonshot API account. Go to and create a new Moonshot API account. Step 2: Set up Moonshot API account. To use the model via API, you’ll need to add balance to your account. Step 3: Get your Moonshot API key. Be sur...
MoonshotAI: Kimi K2.6. moonshotai/kimi-k2.6. Kimi K2.6 is Moonshot AI's next-generation multimodal model, designed for long-horizon coding, coding-driven UI/UX generation, and multi-agent orchestration. It handles complex end-to-end coding tasks across Pyth...
Using the API. API Reference. Batch API. API Overview. Kimi Open Platform provides OpenAI-compatible HTTP APIs. You can use the OpenAI SDK directly. When using SDKs, set base url to When calling HTTP endpoints directly, use the full path such as OpenAI Co...
create( model = "kimi-k2.5", model = "kimi-k2.5", messages = [ messages = [ {"role": "system", "content": "You are Kimi, an AI assistant provided by Moonshot AI. {{ "id": "cmpl-04ea926191a14749b7f2c7a48a68abc6", "id": "cmpl-04ea926191a14749b7f2c7a48a68abc6"...
Kimi API Platform home pagelight logodark logo. Using the API. API Reference. Batch API. curl --request GET \ curl --request GET \ --url \ --url \ --header 'Authorization: Bearer ' --header 'Authorization: Bearer '. {{ "code": 123, "code": 123, "data": { "d...
🎉 Kimi K2.6 has been released with improved long-context coding stability. Top-up bonus event in progress 🔗. Kimi API Platform home pagelight logodark logo. Using the API. Capabilities. API Reference. Files. Batch API. curl --request GET \ --url \ --heade...
Kimi K2.6 API 點用:Moonshot endpoint、model ID 同快速調用範例
官方 Kimi/Moonshot API 兼容 OpenAI;SDK 用 做 base url,直接 HTTP chat 則用 /chat/completions。[13] Kimi K2.6 的 model ID 建議先在你自己的 Moonshot 戶口用 GET /models 讀取,不好靠產品名估或抄文件示例。[17] AIMLAPI、OpenRouter 等第三方 gateway 有自己的 model ID;那些 ID 只應在相應 gateway 使用,不應直接搬到官方 Moonshot endpoint。[1][5]
Cách dùng Kimi K2.6 qua API Moonshot: endpoint đúng và model IDLuồng nên dùng: cấu hình endpoint Moonshot, gọi /models để xác minh model ID, rồi gửi request chat.
AI 提示
Create a landscape editorial hero image for this Studio Global article: Cách dùng Kimi K2.6 qua API Moonshot: endpoint đúng và model ID. Article summary: Dùng Kimi K2.6 qua API Moonshot bằng OpenAI SDK với base url https://api.moonshot.ai/v1, rồi gọi /chat/completions; điểm cần kiểm chứng là model ID, nên gọi /models trong tài khoản thay vì đoán.. Topic tags: ai, kimi, moonshot ai, llm, api. Reference image context from search candidates: Reference image 1: visual subject "# Moonshot AI (Kimi K2.6). ## Step 1: Create a Moonshot API account. Go to and create a new Moonshot API account. ## Step 2: Set up Moonshot API account. To use the model via API," source context "Moonshot AI (Kimi K2.6)" Reference image 2: visual subject "Connect and use Kimi K2.6 from Moonshot AI with API Key - Featured image. # How to use Kimi K2.6 from Moonshot AI with API Key on TypingMind. Learn how to access and
openai.com
如果你想由 Moonshot 官方 Kimi API 用 Kimi K2.6,先記住一件事:最易中伏的通常唔係 URL,而係 model 填錯。Kimi Open Platform 表示,它的 HTTP API 兼容 OpenAI,可以直接用 OpenAI SDK;用 SDK 時要把 base_url 設為 https://api.moonshot.ai/v1,如果直接打 HTTP,chat 的完整 endpoint 是 https://api.moonshot.ai/v1/chat/completions。[13]
真正要小心的是 model ID。Kimi 的 List Models 頁面寫明 Kimi K2.6 已發布,但文件中的 sample response 仍然用 id = kimi-k2.5 做示例。最穩陣做法,是在你自己的 Moonshot 戶口先打
部分中介服務會為 Kimi K2.6 設定自己的 model ID。AIMLAPI 的文件使用 https://api.aimlapi.com/v1/chat/completions,model 寫作 moonshot/kimi-k2-6。[1] OpenRouter 的 API 頁面則顯示 model 為 moonshotai/kimi-k2.6。[5]
這些 ID 只應該在你經相應 gateway 調用時使用。當你打的是官方 https://api.moonshot.ai/v1/chat/completions,低風險做法仍然是先
官方 Kimi/Moonshot API 兼容 OpenAI;SDK 用 https://api.moonshot.ai/v1 做 base url,直接 HTTP chat 則用 /chat/completions。[13]
Kimi K2.6 的 model ID 建議先在你自己的 Moonshot 戶口用 GET /models 讀取,不好靠產品名估或抄文件示例。[17]
AIMLAPI、OpenRouter 等第三方 gateway 有自己的 model ID;那些 ID 只應在相應 gateway 使用,不應直接搬到官方 Moonshot endpoint。[1][5]
人們還問
「Kimi K2.6 API 點用:Moonshot endpoint、model ID 同快速調用範例」的簡短答案是什麼?
官方 Kimi/Moonshot API 兼容 OpenAI;SDK 用 https://api.moonshot.ai/v1 做 base url,直接 HTTP chat 則用 /chat/completions。[13]
首先要驗證的關鍵點是什麼?
官方 Kimi/Moonshot API 兼容 OpenAI;SDK 用 https://api.moonshot.ai/v1 做 base url,直接 HTTP chat 則用 /chat/completions。[13] Kimi K2.6 的 model ID 建議先在你自己的 Moonshot 戶口用 GET /models 讀取,不好靠產品名估或抄文件示例。[17]
接下來在實務上我該做什麼?
AIMLAPI、OpenRouter 等第三方 gateway 有自己的 model ID;那些 ID 只應在相應 gateway 使用,不應直接搬到官方 Moonshot endpoint。[1][5]
接下來我應該探索哪個相關主題?
繼續“Claude Security 公測版:Anthropic 點樣用 AI 幫企業掃 code 漏洞”以獲得另一個角度和額外的引用。
Tìm kiếm và kiểm chứng thông tin: Cách dùng Kimi K2.6 qua API như thế nào?
Studio Global AI19 來源
引用的答案
Có thể dùng Kimi K2.6 qua API theo cách gần giống OpenAI API, nhưng từ bằng chứng hiện có, phần chắc chắn nhất là cách kết nối vào nền tảng Kimi/Moonshot và các endpoint chính; còn ví dụ payload đầy đủ riêng cho đúng model ID của Kimi K2.6 thì bằng chứng hiện tại chưa hiển thị rõ. [3][7][8]
Cách dùng qua API chính thức của Kimi/Moonshot
Kimi Open Platform cung cấp HTTP API tương thích OpenAI, nên có thể dùng trực tiếp OpenAI SDK. [3]
Khi dùng SDK, cần đặt base_url là https://api.moonshot.ai/v1. [3]
Nếu gọi HTTP trực tiếp, endpoint gốc cũng là https://api.moonshot.ai/v1. [3]
API chat có tài liệu “Basic Information”, cho thấy cách gọi theo kiểu chat.completions.create(...) với model và messages, tức cùng kiểu request body như OpenAI Chat Completions. [4]
Gọi API chat theo chuẩn OpenAI-compatible, truyền model và messages. [3][4]
Nếu chưa chắc model ID chính xác của Kimi K2.6, gọi endpoint /models để kiểm tra danh sách model khả dụng trước. [8]
Mẫu gọi API tối thiểu
Ví dụ theo đúng hướng dẫn tổng quan của Kimi là dùng OpenAI SDK với base_url của Moonshot. [3]
python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_KIMI_API_KEY",
base_url="https://api.moonshot.ai/v1"
)
resp = client.chat.completions.create(
model="KIMI_K2_6_MODEL_ID",
messages=[
{"role": "user", "content": "Xin chào, hãy tự giới thiệu."}
]
)
print(resp)
Phần model="KIMI_K2_6_MODEL_ID" ở trên chỉ là chỗ điền model ID thực tế; trong bằng chứng hiện có, tôi không thấy snippet nào hiển thị trực tiếp tên model ID chính xác của Kimi K2.6 trong request mẫu. [7][8]
Nếu cần kiểm tra khả năng truy cập và billing trước, có thể gọi endpoint balance bằng Bearer token. [5]
Nếu dùng bên trung gian thay vì API chính thức
Có tài liệu bên thứ ba từ AIMLAPI cho model kimi-k2-6, và ví dụ của họ gọi
Điều này cho thấy Kimi K2.6 cũng có thể được truy cập qua nhà cung cấp trung gian, nhưng đây không phải endpoint chính thức của Kimi/Moonshot. [1][3]
Điều đã kiểm chứng được và điều chưa chắc
Đã kiểm chứng được rằng Kimi API là OpenAI-compatible và dùng base URL https://api.moonshot.ai/v1. [3]
Đã kiểm chứng được rằng có tài liệu riêng cho Kimi K2.6 và tài liệu model list xác nhận Kimi K2.6 đã phát hành. [7][8]
Đã kiểm chứng được rằng nền tảng có các endpoint cho chat, list models, balance, và batch. [4][5][6][8]
Chưa kiểm chứng được từ bằng chứng hiện có tên model ID chính xác cần điền khi gọi Kimi K2.6 trong request body. Insufficient evidence. [7][8]
Nếu bạn muốn, tôi có thể viết tiếp cho bạn một mẫu hoàn chỉnh bằng curl, Python, hoặc JavaScript theo đúng kiểu OpenAI-compatible, với chỗ nào chưa xác minh được tôi sẽ đánh dấu rõ.
import requests import requests import json for getting a structured output with indentation import json for getting a structured output with indentation response = requests.post( response = requests.post( " " headers={ headers={ Insert your AIML API Key in...
Moonshot AI (Kimi K2.6). Step 1: Create a Moonshot API account. Go to and create a new Moonshot API account. Step 2: Set up Moonshot API account. To use the model via API, you’ll need to add balance to your account. Step 3: Get your Moonshot API key. Be sur...
MoonshotAI: Kimi K2.6. moonshotai/kimi-k2.6. Kimi K2.6 is Moonshot AI's next-generation multimodal model, designed for long-horizon coding, coding-driven UI/UX generation, and multi-agent orchestration. It handles complex end-to-end coding tasks across Pyth...
Using the API. API Reference. Batch API. API Overview. Kimi Open Platform provides OpenAI-compatible HTTP APIs. You can use the OpenAI SDK directly. When using SDKs, set base url to When calling HTTP endpoints directly, use the full path such as OpenAI Co...
create( model = "kimi-k2.5", model = "kimi-k2.5", messages = [ messages = [ {"role": "system", "content": "You are Kimi, an AI assistant provided by Moonshot AI. {{ "id": "cmpl-04ea926191a14749b7f2c7a48a68abc6", "id": "cmpl-04ea926191a14749b7f2c7a48a68abc6"...
Kimi API Platform home pagelight logodark logo. Using the API. API Reference. Batch API. curl --request GET \ curl --request GET \ --url \ --url \ --header 'Authorization: Bearer ' --header 'Authorization: Bearer '. {{ "code": 123, "code": 123, "data": { "d...
🎉 Kimi K2.6 has been released with improved long-context coding stability. Top-up bonus event in progress 🔗. Kimi API Platform home pagelight logodark logo. Using the API. Capabilities. API Reference. Files. Batch API. curl --request GET \ --url \ --heade...