> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aireserve.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Serve Kimi K3

> Provision 8×B300, pin Kimi K3's native MXFP4 weights, and qualify an authenticated multimodal SGLang endpoint.

This playbook serves `moonshotai/Kimi-K3` with SGLang on one 8×B300 node.
That is the smallest topology whose unified low-latency and balanced paths are
marked verified by the SGLang maintainers.

> [!WARNING]
>
> **Vendor-verified · AI Reserve qualification pending.** SGLang's verified
> B300 result used revision `v0.5.18 @ 71de97b2`, but its public NVIDIA image
> reference is still floating. Resolve `lmsysorg/sglang:latest` to the digest
> you qualify and store that digest in the deployment record before production.

## Recipe contract

| Item | Pinned value |
| - | - |
| Artifact | `moonshotai/Kimi-K3` |
| Revision reviewed | `f831ab66814297da540d832a5235f8e904f29d06` |
| Weights | QAT MXFP4 weights / MXFP8 activations; about 1.561 TB downloaded and about 1.68 TB before runtime headroom |
| Architecture | 2.8T total / 104B active, 93-layer multimodal MoE |
| Context | 1,048,576 architectural maximum; this starting profile admits 65,536 |
| Primary engine | SGLang; B300 reference measured on `v0.5.18 @ 71de97b2` |
| Reference image | `lmsysorg/sglang:latest`; replace with the qualified digest |
| Hardware | 8×`B300_288GB` |
| Persistent storage | 2,000 GB minimum |
| Self-hosted modalities | Text and images; current open-serving path does not establish video support |
| License | Kimi K3 custom license; MaaS above its revenue threshold requires a separate Moonshot agreement |
| Last reviewed | 2026-10-14 |

Kimi K3 always reasons. It also requires the complete prior assistant message—
including `reasoning_content` and `tool_calls`—on every multi-turn or tool
follow-up. Dropping those fields changes the conversation contract.

## 0. Set up your shell

Every command on this page is copy-paste. Paste this block once per terminal
and replace only the API key; every later step reads these variables.

```bash theme={"dark"}
export AIRESERVE_API_KEY="aireserve_api_..."   # the only value you type: a key with Compute: Manage access
export API="https://api.aireserve.com"
export SGLANG_API_KEY="$(openssl rand -hex 32)"  # generated for you; it protects your model server (see below)
echo "SGLANG_API_KEY=$SGLANG_API_KEY"               # save it: every request to the endpoint needs it
```

> [!NOTE]
>
> **Two keys, two jobs.** `AIRESERVE_API_KEY` authenticates you to AI Reserve
> and creates the volume, quote, and instance. `SGLANG_API_KEY` is a password you
> invent for the SGLang server you are about to start: step 4 passes it as
> SGLang's `--api-key`, so the public HTTP port rejects anyone who does not
> send it. No vendor issues it and AI Reserve never sees it.

The Python and TypeScript tabs read the same three variables from the
environment. The shell tabs need `curl` and `jq`; the Python tabs need
`requests` (`python -m pip install requests`).

### Check stock first

A quote is free and creates nothing. Run one before creating storage, because
the volume in step 1 is placed next to this hardware and fails the same way
when none is in stock:

```bash theme={"dark"}
curl -sS -X POST "$API/v1/gpu/instances/quote" \
  -H "Authorization: Bearer $AIRESERVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"accelerator": "B300_288GB", "count": 8, "region": "united_states", "image": "lmsysorg/sglang:latest", "diskGb": 100}' \
  | jq '{availability, price, error}'
```

A response with `availability` and `price` means you can continue. An `error`
with `code: no_capacity` means this shape is not in stock in that region right
now: try another `region` here and in steps 1 and 2, or wait, and read
[`no_capacity` reasons](/gpu-infrastructure/operations#no_capacity-reasons).

## 1. Create the weights volume

**Available now.** The accelerator hint places the volume in a data center
where 8×B300 has stock today, so the instance in step 4 can mount it. If step 0
reported no stock, this call fails the same way. Storage continues billing
after the instance is terminated.

```bash curl theme={"dark"}
ACCEPTED=$(curl -sS -X POST "$API/v1/gpu/volumes" \
  -H "Authorization: Bearer $AIRESERVE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: kimi-k3-weights-v1" \
  -d '{
    "name": "kimi-k3-weights",
    "region": "united_states",
    "sizeGb": 2000,
    "acceleratorHint": "B300_288GB",
    "storageBillingAcknowledged": true
  }')
export VOLUME_ID=$(jq -r .resourceId <<<"$ACCEPTED")
export OPERATION_ID=$(jq -r .operationId <<<"$ACCEPTED")
jq -e .resourceId <<<"$ACCEPTED" >/dev/null \
  && echo "accepted: volume $VOLUME_ID (operation $OPERATION_ID)" \
  || { echo "The volume was not accepted:"; jq . <<<"$ACCEPTED"; }
```

```python Python theme={"dark"}
import os, requests, time

API = "https://api.aireserve.com"
HEADERS = {"Authorization": f"Bearer {os.environ['AIRESERVE_API_KEY']}"}

response = requests.post(
    f"{API}/v1/gpu/volumes",
    headers={**HEADERS, "Idempotency-Key": "kimi-k3-weights-v1"},
    json={
        "name": "kimi-k3-weights",
        "region": "united_states",
        "sizeGb": 2000,
        "acceleratorHint": "B300_288GB",
        "storageBillingAcknowledged": True,
    },
    timeout=60,
)
response.raise_for_status()
accepted = response.json()
volume_id = accepted["resourceId"]
operation_id = accepted["operationId"]
```

```typescript TypeScript theme={"dark"}
const API = "https://api.aireserve.com";
const auth = { Authorization: `Bearer ${process.env.AIRESERVE_API_KEY}` };

const response = await fetch(`${API}/v1/gpu/volumes`, {
  method: "POST",
  headers: {
    ...auth,
    "Content-Type": "application/json",
    "Idempotency-Key": "kimi-k3-weights-v1",
  },
  body: JSON.stringify({
    name: "kimi-k3-weights",
    region: "united_states",
    sizeGb: 2000,
    acceleratorHint: "B300_288GB",
    storageBillingAcknowledged: true,
  }),
});
if (!response.ok) throw new Error(await response.text());
const accepted = await response.json();
const volumeId = accepted.resourceId;
const operationId = accepted.operationId;
```

Wait for the operation to finish before you quote compute. Retrying the same
idempotency key never creates a second volume.

```bash curl theme={"dark"}
while :; do
  OPERATION=$(curl -sS "$API/v1/gpu/operations/$OPERATION_ID" \
    -H "Authorization: Bearer $AIRESERVE_API_KEY")
  STATUS=$(jq -r .status <<<"$OPERATION")
  echo "operation $OPERATION_ID: $STATUS"
  case "$STATUS" in
    succeeded) break ;;
    failed|cancelled)
      jq -r '.failure // empty | "whose: \(.actor)\nwhy:   \(.message)\nnext:  \(.next)"' <<<"$OPERATION"
      break ;;
  esac
  sleep 10
done
```

```python Python theme={"dark"}
def wait_for(operation_id):
    while True:
        operation = requests.get(f"{API}/v1/gpu/operations/{operation_id}", headers=HEADERS, timeout=60).json()
        print("operation", operation_id, operation.get("status"))
        if operation.get("status") == "succeeded":
            return operation
        if operation.get("status") in {"failed", "cancelled"}:
            failure = operation.get("failure") or {}
            raise RuntimeError(f"{failure.get('actor', 'unknown')}: {failure.get('message', operation.get('errorMessage'))} {failure.get('next', '')}")
        time.sleep(10)

wait_for(operation_id)
```

```typescript TypeScript theme={"dark"}
async function waitFor(operationId: string) {
  while (true) {
    const response = await fetch(`${API}/v1/gpu/operations/${operationId}`, { headers: auth });
    const operation = await response.json();
    console.log("operation", operationId, operation.status);
    if (operation.status === "succeeded") return operation;
    if (["failed", "cancelled"].includes(operation.status)) {
      const failure = operation.failure ?? {};
      throw new Error(`${failure.actor ?? "unknown"}: ${failure.message ?? operation.errorMessage} ${failure.next ?? ""}`);
    }
    await new Promise((resolve) => setTimeout(resolve, 10_000));
  }
}

await waitFor(operationId);
```

## 2. Quote 8×B300

**Available now.** A quote does not reserve scarce B300 capacity. Launch it
before its 120-second expiry.

```bash curl theme={"dark"}
QUOTE=$(curl -sS -X POST "$API/v1/gpu/instances/quote" \
  -H "Authorization: Bearer $AIRESERVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"accelerator\": \"B300_288GB\",
    \"count\": 8,
    \"region\": \"united_states\",
    \"image\": \"lmsysorg/sglang:latest\",
    \"diskGb\": 100,
    \"volumeId\": \"$VOLUME_ID\",
    \"volumeMountPath\": \"/models\"
  }")
export QUOTE_ID=$(jq -r .quoteId <<<"$QUOTE")
jq '{quoteId, expiresAt, price, availability, error}' <<<"$QUOTE"
```

```python Python theme={"dark"}
response = requests.post(
    f"{API}/v1/gpu/instances/quote",
    headers=HEADERS,
    json={
        "accelerator": "B300_288GB",
        "count": 8,
        "region": "united_states",
        "image": "lmsysorg/sglang:latest",
        "diskGb": 100,
        "volumeId": volume_id,
        "volumeMountPath": "/models",
    },
    timeout=60,
)
response.raise_for_status()
quote = response.json()
quote_id = quote["quoteId"]
print(quote["price"], quote["availability"], quote["expiresAt"])
```

```typescript TypeScript theme={"dark"}
const quoteResponse = await fetch(`${API}/v1/gpu/instances/quote`, {
  method: "POST",
  headers: { ...auth, "Content-Type": "application/json" },
  body: JSON.stringify({
    accelerator: "B300_288GB",
    count: 8,
    region: "united_states",
    image: "lmsysorg/sglang:latest",
    diskGb: 100,
    volumeId,
    volumeMountPath: "/models",
  }),
});
if (!quoteResponse.ok) throw new Error(await quoteResponse.text());
const quote = await quoteResponse.json();
const quoteId = quote.quoteId;
console.log(quote.price, quote.availability, quote.expiresAt);
```

## 3. Pin and download the model

**Manual today.** The serving process can download into `HF_HOME`, but a
separate preload makes startup and rollback predictable. The verification
command requires the current `hf` CLI from `huggingface_hub` 1.18 or later,
not the deprecated `huggingface-cli`:

```bash theme={"dark"}
hf download moonshotai/Kimi-K3 \
  --revision f831ab66814297da540d832a5235f8e904f29d06 \
  --local-dir /models/Kimi-K3

hf cache verify moonshotai/Kimi-K3 \
  --revision f831ab66814297da540d832a5235f8e904f29d06 \
  --local-dir /models/Kimi-K3 \
  --fail-on-missing-files
```

The canonical artifact is already quantized. Do not silently substitute the
NVIDIA NVFP4 or Ascend W4A8 conversions; each needs its own image, topology,
quality suite, and acceptance record.

## 4. Launch SGLang

**Available now, runtime qualification pending.** This is the conservative
65K B300 profile published by SGLang. It keeps the vision path enabled, uses
TP8, and avoids speculative decoding until target-only quality and latency are
known. The API key protects the public HTTP port.

```bash curl theme={"dark"}
LAUNCH=$(jq -n \
  --arg quoteId "$QUOTE_ID" \
  --arg apiKey "$SGLANG_API_KEY" \
  '{
    quoteId: $quoteId,
    name: "kimi-k3-sglang",
    env: {HF_HOME: "/models/hf"},
    ports: [{port: 30000, protocol: "http"}],
    publicPortsAcknowledged: true,
    dockerStartCmd: [
      "sglang", "serve",
      "--trust-remote-code",
      "--model-path", "moonshotai/Kimi-K3",
      "--revision", "f831ab66814297da540d832a5235f8e904f29d06",
      "--served-model-name", "kimi-k3",
      "--tp-size", "8",
      "--context-length", "65536",
      "--enable-symm-mem",
      "--mem-fraction-static", "0.82",
      "--mm-feature-transport", "cpu",
      "--reasoning-parser", "kimi_k3",
      "--tool-call-parser", "kimi_k3",
      "--api-key", $apiKey,
      "--host", "0.0.0.0", "--port", "30000"
    ]
  }' | curl -sS -X POST "$API/v1/gpu/instances" \
    -H "Authorization: Bearer $AIRESERVE_API_KEY" \
    -H "Content-Type: application/json" \
    -H "Idempotency-Key: kimi-k3-serve-v1" \
    --data-binary @-)
export INSTANCE_ID=$(jq -r .resourceId <<<"$LAUNCH")
export OPERATION_ID=$(jq -r .operationId <<<"$LAUNCH")
jq -e .resourceId <<<"$LAUNCH" >/dev/null \
  && echo "accepted: instance $INSTANCE_ID (operation $OPERATION_ID)" \
  || { echo "The launch was not accepted:"; jq . <<<"$LAUNCH"; }
```

```python Python theme={"dark"}
body = {
    "quoteId": quote_id,
    "name": "kimi-k3-sglang",
    "env": {"HF_HOME": "/models/hf"},
    "ports": [{"port": 30000, "protocol": "http"}],
    "publicPortsAcknowledged": True,
    "dockerStartCmd": [
        "sglang", "serve",
        "--trust-remote-code",
        "--model-path", "moonshotai/Kimi-K3",
        "--revision", "f831ab66814297da540d832a5235f8e904f29d06",
        "--served-model-name", "kimi-k3",
        "--tp-size", "8",
        "--context-length", "65536",
        "--enable-symm-mem",
        "--mem-fraction-static", "0.82",
        "--mm-feature-transport", "cpu",
        "--reasoning-parser", "kimi_k3",
        "--tool-call-parser", "kimi_k3",
        "--api-key", os.environ["SGLANG_API_KEY"],
        "--host", "0.0.0.0", "--port", "30000",
    ],
}
response = requests.post(
    f"{API}/v1/gpu/instances",
    headers={**HEADERS, "Idempotency-Key": "kimi-k3-serve-v1"},
    json=body,
    timeout=60,
)
response.raise_for_status()
launched = response.json()
instance_id = launched["resourceId"]
operation_id = launched["operationId"]
wait_for(operation_id)
```

```typescript TypeScript theme={"dark"}
const launchResponse = await fetch(`${API}/v1/gpu/instances`, {
  method: "POST",
  headers: {
    ...auth,
    "Content-Type": "application/json",
    "Idempotency-Key": "kimi-k3-serve-v1",
  },
  body: JSON.stringify({
    quoteId,
    name: "kimi-k3-sglang",
    env: { HF_HOME: "/models/hf" },
    ports: [{ port: 30000, protocol: "http" }],
    publicPortsAcknowledged: true,
    dockerStartCmd: [
      "sglang", "serve",
      "--trust-remote-code",
      "--model-path", "moonshotai/Kimi-K3",
      "--revision", "f831ab66814297da540d832a5235f8e904f29d06",
      "--served-model-name", "kimi-k3",
      "--tp-size", "8",
      "--context-length", "65536",
      "--enable-symm-mem",
      "--mem-fraction-static", "0.82",
      "--mm-feature-transport", "cpu",
      "--reasoning-parser", "kimi_k3",
      "--tool-call-parser", "kimi_k3",
      "--api-key", process.env.SGLANG_API_KEY!,
      "--host", "0.0.0.0", "--port", "30000",
    ],
  }),
});
if (!launchResponse.ok) throw new Error(await launchResponse.text());
const launched = await launchResponse.json();
const instanceId = launched.resourceId;
const operationId = launched.operationId;
await waitFor(operationId);
```

Wait for the launch operation the same way as in step 1 (`wait_for` and
`waitFor` are already defined there):

```bash theme={"dark"}
while :; do
  OPERATION=$(curl -sS "$API/v1/gpu/operations/$OPERATION_ID" \
    -H "Authorization: Bearer $AIRESERVE_API_KEY")
  STATUS=$(jq -r .status <<<"$OPERATION")
  echo "operation $OPERATION_ID: $STATUS"
  case "$STATUS" in
    succeeded) break ;;
    failed|cancelled)
      jq -r '.failure // empty | "whose: \(.actor)\nwhy:   \(.message)\nnext:  \(.next)"' <<<"$OPERATION"
      break ;;
  esac
  sleep 10
done
```

A running instance is not a ready model. SGLang still has to load about
1.56 TB of weights (downloading them first unless step 3 staged them) and
shard them across eight GPUs, which takes tens of minutes. Step 5 waits for
`/v1/models` before the first request. To watch progress:

```bash theme={"dark"}
curl -N "$API/v1/gpu/instances/$INSTANCE_ID/logs?tail=200" \
  -H "Authorization: Bearer $AIRESERVE_API_KEY"
```

From the logs, record the reported model load, static-memory allocation,
maximum token pool, and admitted-request cap. Do not raise
`--mem-fraction-static` or context until that evidence is captured.

## 5. Verify text, vision, and thinking history

Retrieve the port-30000 URL from the instance's `connections` response and set
it as `ENDPOINT`.

```bash curl theme={"dark"}
CONNECTIONS=$(curl -sS "$API/v1/gpu/instances/$INSTANCE_ID/connections" \
  -H "Authorization: Bearer $AIRESERVE_API_KEY")
export ENDPOINT=$(jq -er '.http[] | select(.port == 30000) | .url' <<<"$CONNECTIONS")
[ -n "$ENDPOINT" ] && echo "ENDPOINT=$ENDPOINT" || jq . <<<"$CONNECTIONS"
```

```python Python theme={"dark"}
response = requests.get(
    f"{API}/v1/gpu/instances/{instance_id}/connections",
    headers=HEADERS,
    timeout=60,
)
response.raise_for_status()
connection = next(item for item in response.json()["http"] if item["port"] == 30000)
endpoint = connection["url"]
```

```typescript TypeScript theme={"dark"}
const connectionResponse = await fetch(`${API}/v1/gpu/instances/${instanceId}/connections`, {
  headers: auth,
});
if (!connectionResponse.ok) throw new Error(await connectionResponse.text());
const connections = await connectionResponse.json();
const connection = connections.http.find((item: { port: number }) => item.port === 30000);
if (!connection) throw new Error("port 30000 is not available in instance connections");
const endpoint = connection.url;
```

Wait until the model is loaded. The first successful `/v1/models` is the
readiness signal; until then the port returns connection errors or 5xx:

```bash theme={"dark"}
until curl -fsS "$ENDPOINT/v1/models" -H "Authorization: Bearer $SGLANG_API_KEY" >/dev/null 2>&1; do
  echo "model still loading..."; sleep 30
done
```

```bash curl theme={"dark"}
curl -sS "$ENDPOINT/v1/models" \
  -H "Authorization: Bearer $SGLANG_API_KEY"

curl -sS "$ENDPOINT/v1/chat/completions" \
  -H "Authorization: Bearer $SGLANG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k3",
    "messages": [{"role": "user", "content": "What is 15% of 240?"}],
    "reasoning_effort": "high",
    "max_tokens": 4096
  }' | jq '.choices[0].message | {reasoning_content, content, tool_calls}'
```

```python Python theme={"dark"}
response = requests.post(
    f"{endpoint}/v1/chat/completions",
    headers={"Authorization": f"Bearer {os.environ['SGLANG_API_KEY']}"},
    json={
        "model": "kimi-k3",
        "messages": [{"role": "user", "content": "What is 15% of 240?"}],
        "reasoning_effort": "high",
        "max_tokens": 4096,
    },
    timeout=300,
)
response.raise_for_status()
assistant_message = response.json()["choices"][0]["message"]
print(assistant_message)
```

```typescript TypeScript theme={"dark"}
const response = await fetch(`${endpoint}/v1/chat/completions`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SGLANG_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "kimi-k3",
    messages: [{ role: "user", content: "What is 15% of 240?" }],
    reasoning_effort: "high",
    max_tokens: 4096,
  }),
});
if (!response.ok) throw new Error(await response.text());
const assistantMessage = (await response.json()).choices[0].message;
console.log(assistantMessage);
```

### Vision smoke test

`IMAGE_URL` is any image your server can fetch; a public sample is set here so
the test runs as written. Exercise the vision encoder separately from text:

```bash theme={"dark"}
export IMAGE_URL="https://upload.wikimedia.org/wikipedia/commons/3/3f/JPEG_example_flower.jpg"  # any public image works
```

```bash curl theme={"dark"}
curl -sS "$ENDPOINT/v1/chat/completions" \
  -H "Authorization: Bearer $SGLANG_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"model\": \"kimi-k3\",
    \"messages\": [{
      \"role\": \"user\",
      \"content\": [
        {\"type\": \"text\", \"text\": \"Describe the image in one sentence.\"},
        {\"type\": \"image_url\", \"image_url\": {\"url\": \"$IMAGE_URL\"}}
      ]
    }],
    \"reasoning_effort\": \"low\",
    \"max_tokens\": 1024
  }"
```

```python Python theme={"dark"}
response = requests.post(
    f"{endpoint}/v1/chat/completions",
    headers={"Authorization": f"Bearer {os.environ['SGLANG_API_KEY']}"},
    json={
        "model": "kimi-k3",
        "messages": [{
            "role": "user",
            "content": [
                {"type": "text", "text": "Describe the image in one sentence."},
                {"type": "image_url", "image_url": {"url": os.environ["IMAGE_URL"]}},
            ],
        }],
        "reasoning_effort": "low",
        "max_tokens": 1024,
    },
    timeout=300,
)
response.raise_for_status()
print(response.json()["choices"][0]["message"]["content"])
```

```typescript TypeScript theme={"dark"}
const visionResponse = await fetch(`${endpoint}/v1/chat/completions`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SGLANG_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "kimi-k3",
    messages: [{
      role: "user",
      content: [
        { type: "text", text: "Describe the image in one sentence." },
        { type: "image_url", image_url: { url: process.env.IMAGE_URL } },
      ],
    }],
    reasoning_effort: "low",
    max_tokens: 1024,
  }),
});
if (!visionResponse.ok) throw new Error(await visionResponse.text());
console.log((await visionResponse.json()).choices[0].message.content);
```

For the next turn, append `assistant_message` exactly as returned. Verify all
three reasoning levels, streaming, tool schemas, malformed-tool recovery, and a
real image request. Do not publish self-hosted video support: the current open
checkpoint metadata and serving processor establish text and image input only.

## 6. Qualify the operating point

SGLang's B300 figures used 8,192 input and 1,024 output tokens, 64 warm-up
requests, and cache flushes. Reproduce that baseline, then replace synthetic
traffic with your traces:

```bash theme={"dark"}
OPENAI_API_KEY="$SGLANG_API_KEY" python -m sglang.bench_serving \
  --backend sglang-oai \
  --base-url "$ENDPOINT" \
  --model kimi-k3 \
  --dataset-name random \
  --random-input-len 8192 \
  --random-output-len 1024 \
  --random-range-ratio 1.0 \
  --warmup-requests 64 \
  --flush-cache \
  --num-prompts 128
```

Measure text and image traffic separately. Sweep request length, image count,
concurrency, and arrival rate; report p50/p95/p99 TTFT, TPOT, queue time,
throughput, failures, HBM, the KDA state-pool admitted-request cap, KV
capacity, and cache hit rate.

Only after the target-only baseline passes should you test DSpark. Never set
`SGLANG_SIMULATE_ACC_LEN` in a production or accuracy run: upstream used it for
synthetic throughput projection, not measured acceptance. Compare DSpark and
target-only serving with identical prompts and retain tool/vision quality
tests.

> [!WARNING]
>
> A single instance is not a production service. AI Reserve raw compute does
> not yet manage replicas, a health-aware load balancer, draining, autoscaling,
> durable logs, or GPU metrics. Add those controls externally and retain a
> previously qualified image digest for rollback.

## 7. Clean up

```bash curl theme={"dark"}
curl -sS -X DELETE "$API/v1/gpu/instances/$INSTANCE_ID" \
  -H "Authorization: Bearer $AIRESERVE_API_KEY" \
  -H "Idempotency-Key: kimi-k3-terminate-v1"
curl -sS -X DELETE "$API/v1/gpu/volumes/$VOLUME_ID" \
  -H "Authorization: Bearer $AIRESERVE_API_KEY" \
  -H "Idempotency-Key: kimi-k3-delete-weights-v1"
```

```python Python theme={"dark"}
requests.delete(
    f"{API}/v1/gpu/instances/{instance_id}",
    headers={**HEADERS, "Idempotency-Key": "kimi-k3-terminate-v1"},
    timeout=60,
).raise_for_status()
requests.delete(
    f"{API}/v1/gpu/volumes/{volume_id}",
    headers={**HEADERS, "Idempotency-Key": "kimi-k3-delete-weights-v1"},
    timeout=60,
).raise_for_status()
```

```typescript TypeScript theme={"dark"}
for (const [path, key] of [
  [`/v1/gpu/instances/${instanceId}`, "kimi-k3-terminate-v1"],
  [`/v1/gpu/volumes/${volumeId}`, "kimi-k3-delete-weights-v1"],
] as const) {
  const response = await fetch(`${API}${path}`, {
    method: "DELETE",
    headers: { ...auth, "Idempotency-Key": key },
  });
  if (!response.ok) throw new Error(await response.text());
}
```

## Primary sources

* [Kimi K3 model card](https://huggingface.co/moonshotai/Kimi-K3)
* [Pinned model snapshot](https://huggingface.co/moonshotai/Kimi-K3/tree/f831ab66814297da540d832a5235f8e904f29d06)
* [SGLang Kimi K3 cookbook](https://docs.sglang.io/cookbook/autoregressive/Moonshotai/Kimi-K3)
* [vLLM Kimi K3 recipe](https://recipes.vllm.ai/moonshotai/Kimi-K3)
* [Kimi K3 API quickstart](https://platform.moonshot.ai/docs/guide/kimi-k3-quickstart)
* [Kimi K3 license](https://huggingface.co/moonshotai/Kimi-K3/blob/main/LICENSE)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.