models

MoonshotAI: Kimi K3 (batch)

Markdown · JSON

MoonshotAI: Kimi K3 (batch)

Kimi K3 is Moonshot AI’s native multimodal reasoning model for long coding tasks and knowledge work. It reads text, images and video, produces text, and supports tool-driven workflows with a 1,048,576-token context and preserved thinking history across steps.

About the model

This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.

Kimi K3 is Moonshot AI’s open-weight multimodal agentic model for long-horizon coding, knowledge work and reasoning. It combines text with native visual understanding of images and video and produces a textual answer or tool request. The manufacturer highlights extended engineering sessions, large repositories and tasks that use screenshots or visual feedback alongside code. A useful brief defines the desired artifact, the evidence to use and the condition that marks the work complete.

Architecture and long context

The model card describes a sparse Mixture of Experts with 2.8 trillion total parameters and 104 billion activated parameters. Its Stable LatentMoE design selects 16 of 896 experts per token, using Kimi Delta Attention and Attention Residuals together with gated attention. The exact context length is 1,048,576 tokens. This is room for a substantial task context, not a reason to discard source boundaries or the space needed for the result.

The published native artifact uses quantization-aware training with MXFP4 weights and MXFP8 activations. That is the manufacturer’s release format, distinct from a separately supplied quantized edition or a claim about how a particular route serves the model. Open weights and a large parameter count do not turn the active-parameter figure into the total storage or hardware requirement.

Prepare a substantial coding task

Provide the relevant repository material, the existing behavior, the requested change and the compatibility constraints. Identify the files or interface that the result must affect, the checks that determine success and any supplied error or input that exposes the problem. A useful result can be a focused code change with an explanation and evidence from the checks that actually ran, rather than a description of actions that were never performed.

For a visual development task, include a screenshot or a clear view of the intended result with the relevant code and a specific discrepancy. The maker describes workflows spanning frontend work, games and CAD that use visual feedback. Ask for the change that connects the code to the observed result, and retain the reference so the delivered artifact can be checked against it.

Images, video and knowledge-work preparation

The producer’s quickstart uses typed content objects for visual messages; content is an array, not a serialized representation of that array. Its image workflow uses encoded image data or a supported file reference rather than a public image address. The video example uploads a video file and supplies the resulting reference with a question about its content. Give a legible source and specify the observation, interval or relationship that matters. The producer’s vision workflow accepts JPEG, PNG, GIF, WebP, BMP, HEIC and HEIF images, and MP4, MPEG, MOV, AVI, FLV, MPG, WebM, WMV and 3GPP video. Animated GIF or WebP can be decoded as video. Supply SVG source as text. The maker recommends images up to 4096 × 2160 and video up to 1920 × 1080; these are resolution recommendations, not rejection thresholds. Keep the request body within the documented 100M size bound and upload large or repeatedly used media as files.

For document-heavy research, label the sources and state the questions the final report should answer. For a video explanation, identify the events or sequence to analyze rather than requesting unrestricted commentary. K3 uses visual content as evidence for reasoning and returns text or tool requests. An application can pass those requests to media tools to create separate image or video artifacts.

Thinking is always enabled

K3’s producer interface always has thinking enabled. The top-level reasoning_effort setting accepts low, high and max, with max as the default. These choices are model-specific; a non-thinking setting or an effort value from another family should not be assumed. The maker’s migration guidance distinguishes K3 from K2.x by using reasoning_effort rather than carrying over the older thinking configuration.

The producer documents separate reasoning_content and final-answer content in streamed results. For a multi-turn conversation or tool workflow, it requires the complete returned assistant message to be passed back unchanged, including reasoning_content and tool_calls. Retaining only the visible final answer loses information that the model’s preserved-thinking workflow expects on the next step.

Structured final answers and partial continuation

The quickstart documents strict JSON-schema output for the final message content. Define the fields and their meanings around the artifact the application needs, and parse that final content rather than combining it with the reasoning field. A structured result can represent extracted information from supplied material or a defined report format; the schema constrains its shape, while the source evidence determines whether its values are correct.

Partial mode can continue a supplied text prefix. The producer’s example places a partial assistant message at the end of the history and combines that prefix with the returned continuation for display. Use this when the required artifact has a meaningful fixed beginning, keeping the prefix distinct from the generated remainder.

Tools and continuity of their results

K3 supports custom function tools. The producer’s example requires a tool on the first turn, preserves the complete assistant message, executes each returned call and appends a matching tool result before requesting the final answer. A proposed call is not evidence that the operation succeeded; the actual returned result becomes the evidence for the next step.

Its dynamic-loading workflow introduces a complete tool definition at a specific point in message history. The definition needs its name, purpose and parameters, and it must remain in subsequent history because the server does not retain that declaration independently. Keep tool capabilities, supplied arguments and real observations associated so a long task can continue from the work already completed.

Output controls and repeated context

The producer documents a default completion allowance of 131,072 tokens, configurable up to 1,048,576 within the model’s overall context constraints. Its current K3 API fixes temperature at 1.0, top_p at 0.95, one result, and zero presence and frequency penalties, directing callers to omit those sampling controls. These are the exact producer profile’s settings, not a transferable list of adjustable controls.

Context caching is automatic for eligible repeated prefixes, with documented 5-minute and 1-hour TTL choices and 5 minutes as the default. Partial cache blocks remain misses. Keep reusable context stable and check actual usage rather than asserting a cache hit from repeated text alone. For the final artifact, retain the supplied sources, actual tool evidence and required output structure, and check that a long answer or engineering result meets the stated completion criteria.

Ailoot Ultra · Batch POST /v1/batches moonshotai/kimi-k3:batch

moonshotai/kimi-k3:batch

MoonshotAI /moonshotai/kimi-k3:batch

Overview

Kimi K3 is Moonshot AI’s native multimodal reasoning model for long coding tasks and knowledge work. It reads text, images and video, produces text, and supports tool-driven workflows with a 1,048,576-token context and preserved thinking history across steps.

Accepted inputs
Text
Results
Text

Available in Ailoot · inputs & methods

Ailoot Ultra · Batch POST /v1/batches
Input types
text
Output types
text
Output format
inline results[].response.body JSON
FieldTypeRequirementValues & limitsDefault
FieldendpointTypestringRequirementRequiredValues & limits
/v1/chat/completions
Default—
FieldmodelTypestringRequirementRequiredValues & limits
moonshotai/kimi-k3:batch
Default—
FieldrequestsTypebatch_item[]RequirementRequiredValues & limits
Minimum items: 1
Default—
Fieldrequests[].custom_idTypestringRequirementRequiredValues & limitsDefault—
Fieldrequests[].body.messagesTypemessage[]RequirementRequiredValues & limitsDefault—
Fieldcompletion_windowTypestringRequirementOptionalValues & limits
24h
Default—
FieldproviderTypeobject|nullRequirementOptionalValues & limitsDefault—
Fieldrequests[].body.modelTypestringRequirementOptionalValues & limits
moonshotai/kimi-k3:batch, moonshotai/kimi-k3
Default—
Fieldprovider.onlyTypestring[]RequirementOptionalValues & limits
deepinfra/bf16
Default—
Fieldprovider.allow_fallbacksTypeboolean|nullRequirementOptionalValues & limits
false, null
Default—
Method parameters and lifecycle
ParameterContract
Parametercontent_typeContractapplication/json
ParameterrequiredContractendpoint, model, requests
Parametermaterial_typesContracttext
ParameterrepresentationContractinline requests[]; each item has custom_id and body
Parameterrequest_endpoint_profileContract/v1/chat/completions
Parameterfile_materialContractCaller may read actual UTF-8 JSONL locally into requests[]. No upload purpose, input_file_id or file reference is used. Missing/empty customer material stops preparation before POST.
Parameterserialization_orderContractendpoint, model, provider (if supplied), completion_window (if supplied), requests last
Parameteroptional_controlsContractprovider.only, provider.allow_fallbacks, completion_window
Parameterschema_scopeContractText Chat Completions bodies in the documented inline Batch envelope.

Lifecycle: asynchronous

GET /v1/batches/{operation_id} · actual original create response.id; same user/key/group

Pricing

Tariff references do not add request options. Supported parameters are listed for the selected method.

Fast mode
Not specified When fast mode is selected
Flex mode
Not specified When flex mode is selected
Maximum reasoning effort
Not specified When maximum reasoning effort uses the default adjustment
Explicit cache pricing
Not enabled When explicit cache is requested

Ailoot rates

Prices by configuration

Match each charge to the conditions shown. Use one rate for each set of alternative configurations.

ConfigurationRate scheduleContext tokens, more thanContext tokens, up to and includingCharge
ConfigurationBase token ratesRate scheduleBase rateContext tokens, more than—Context tokens, up to and includingNo upper boundCharge
Input · Input tokens $0.00456 / 1K tokens
Output · Output tokens $0.0228 / 1K tokens
Input · Cache read $0.000456 / 1K tokens
Input · Cache write — / 1K tokens
Input · Cache write, 1 hour — / 1K tokens
ConfigurationRequest-length tier 1Rate schedule—Context tokens, more than0Context tokens, up to and includingNo upper boundCharge
Input · Input tokens $0.00456 / 1K tokens
Output · Output tokens $0.0228 / 1K tokens
Input · Cache read $0.000456 / 1K tokens
Input · Cache write — / 1K tokens
Input · Cache write, 1 hour — / 1K tokens

Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. How reservation and settlement work →

Example requests

Ailoot Ultra · Batch

curl · retained fixturePython HTTP · actual customer JSONLPython · save every completed result
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
python3 - <<'PY_REQUEST'
import json
from pathlib import Path
body=json.loads('{"endpoint":"/v1/chat/completions","model":"moonshotai/kimi-k3:batch","requests":[{"custom_id":"req-0001","body":{"messages":[{"role":"user","content":"Hello!"}],"max_tokens":16}}]}')
Path("batch-request.json").write_text(json.dumps(body,ensure_ascii=False),encoding="utf-8")
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/batches \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @batch-request.json -D batch-response-headers.txt -o batch-create-response.json
import json, os
from pathlib import Path
from urllib.request import Request, urlopen

def prepare_requests(customer_path):
    path = Path(customer_path)
    if not path.is_file(): raise ValueError("Customer JSONL file is missing")
    items = [json.loads(line) for line in path.read_text(encoding="utf-8").splitlines() if line.strip()]
    if not items: raise ValueError("Customer JSONL contains no requests")
    ids = set()
    for item in items:
        if set(item) != {"custom_id", "body"}: raise ValueError("Each item needs custom_id and body")
        cid = item["custom_id"]
        if not isinstance(cid, str) or not cid.strip() or cid in ids: raise ValueError("custom_id must be nonempty and unique")
        ids.add(cid)
        if not isinstance(item["body"], dict) or not item["body"].get("messages"): raise ValueError("Supply actual text messages")
        supplied_model = item["body"].get("model")
        if supplied_model is not None and supplied_model not in ['moonshotai/kimi-k3:batch', 'moonshotai/kimi-k3']: raise ValueError("body.model must be an exact documented caller or wire ID")
    return {"endpoint":"/v1/chat/completions", "model":"moonshotai/kimi-k3:batch", "requests":items}

if __name__ == "__main__":
    material = os.environ.get("AILOOT_BATCH_REQUESTS_JSONL", "")
    if not material: raise SystemExit("Set AILOOT_BATCH_REQUESTS_JSONL to your actual customer file")
    body = prepare_requests(material)
    key = os.environ.get("AILOOT_API_KEY", "")
    if not key: raise SystemExit("Set AILOOT_API_KEY")
    request = Request("https://api.ailoot.ai/v1/batches", data=json.dumps(body, ensure_ascii=False).encode("utf-8"), headers={"Authorization":"Bearer " + key, "Content-Type":"application/json"}, method="POST")
    with urlopen(request) as response:
        raw = response.read()
        Path("batch-create-response.json").write_bytes(raw)
        print(raw.decode("utf-8"))
import json
from pathlib import Path
raw = Path("batch-status-response.json").read_bytes()
response = json.loads(raw)
if response.get("status") != "completed":
    raise SystemExit("Keep the original operation; read its status without resubmitting")
results = response.get("results")
if not isinstance(results, list) or not results:
    raise SystemExit("Preserve the original response; completed results are missing")
Path("batch-results.jsonl").write_text("".join(json.dumps(item, ensure_ascii=False) + "\n" for item in results), encoding="utf-8")
# Preserve batch-status-response.json with aggregate usage and every result/error.

Receive and save results

Ailoot Ultra · Batch

inline results[].response.body JSON

  • GET /v1/batches/{operation_id}
Check job status
curl · original operation status
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
BATCH_OPERATION_ID="$(python3 - <<'PY_ID'
import json
from pathlib import Path
from urllib.parse import quote
response = json.loads(Path("batch-create-response.json").read_text(encoding="utf-8"))
operation = response.get("id")
if not isinstance(operation, str) or not operation: raise SystemExit("No actual original operation ID; preserve the response and do not resubmit")
print(quote(operation, safe=""))
PY_ID
)"
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/batches/$BATCH_OPERATION_ID" \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o batch-status-response.json
Keep all completed results

Keep every complete returned response, file and content part.

Preserve the full original status JSON, every result/custom_id and complete response or error body. Save completed results[] as JSONL without filtering.

If the original response needs checking

Preserve the original operation ID. 503 result_pending_check has X-Should-Retry:false; never resubmit an unknown original batch.

Response fields
FieldType
Fieldresults[].custom_idTypestring
Fieldresults[].response.body.choices[].message.contentTypestring|null
Fieldresults[].errorTypeobject|null
FieldusageTypeobject|null
FieldidTypestring
FieldmodelTypestring
FieldendpointTypestring
FieldstatusTypestring
Fieldrequest_countsTypeobject
Fieldresults[].idTypestring
Fieldresults[].response.status_codeTypeinteger
Fieldresults[].response.request_idTypestring
Errors and next steps
ResponseConditionNext step
Response400 · invalid_request_errorConditionInvalid documented inline envelope, duplicate keys, item identity, or configured model capabilities conflict.Next stepCorrect the indicated fields before any new submission.
Response401 · authentication_errorConditionInvalid API key.Next stepUse the authorized Ailoot key.
Response403 · permission_errorConditionBatch group unavailable.Next stepCheck key/group entitlement.
Response422 · invalid_request_errorConditionBatch uses balance billing; subscription creation is rejected.Next stepUse the authorized balance-billed group.
Response422 · price_unavailableConditionBatch input cannot be quoted.Next stepPreserve response; use documented family input.
Response402 · billing_errorConditionBatch reserve unavailable.Next stepResolve admission before a new request.
Response503 · price_unavailableConditionBatch method price/native rates unavailable.Next stepPreserve response; do not substitute prices.
Response503 · api_errorConditionExact supplier route unavailable.Next stepPreserve response for route repair.
Response503 · result_pending_checkConditionOriginal result requires checking; X-Should-Retry:false.Next stepKeep original operation_id/id and read its status; never repeat original POST.
Response404 · not_foundConditionBatch status operation absent or owned by another identity.Next stepUse exact original id and same user/key/group.

Aliases

Model aliases

Ailoot Ultra moonshotai/kimi-k3:batch

Method path aliases

Use the method paths shown above.

Related caller IDs

moonshotai/kimi-k3:batch

FAQ · MoonshotAI: Kimi K3 (batch)
What inputs and results are available?

POST /v1/batches · moonshotai/kimi-k3:batch: text → text

Which fields does the request use?

POST /v1/batches · moonshotai/kimi-k3:batch: endpoint, model, requests, completion_window, provider

What limits apply?

POST /v1/batches · moonshotai/kimi-k3:batch: requests.min_items: 1

More details

Connect Ailoot to Claude Code, OpenCode, Hermes or your own app.

The company and its project portfolio

The company and its project portfolio: millions of customers; monthly sales in the billions.

Buy tokens at a discount.

Subscription discounts for regular use. Promo codes offer up to 50% off token purchases.

Subscription
Choose a discounted plan for your regular requests.
Promo code: up to 50% off
Enter your code at checkout. The price updates to reflect the current promotion.
Spending in your history
The model, tokens and amount are recorded for each request.

Choose a subscription · View model prices

Connect the API to a product you sell.

Use Ailoot in SaaS, apps and bots under its official service offer and licence agreement. Request a reseller licence for resale.

Commercial application
Add text, image, video and audio generation to paid features in your service.
Reseller licence
Send a description of your project and how you provide access. Request written terms for use and resale.
Documents on the website
The service offer, licence agreement and data processing policy are available before you connect.

Request a reseller licence · Service offer and licence agreement