Skip to content

Providers / Deep Infra · All access methods for moonshotai/kimi-k2.7-code

Kimi K2.7 Code

deepinfra/moonshotai/Kimi-K2.7-Code API key models.dev2026-11-17 deprecated

Type chat · Released 2026-06-12

Input window
262,144 tokensdocumented
models.dev · 2026-11-17
Input and output together
Context window
262,144 tokens
Exposed by this provider
Maximum output
262,144 tokens
Per response; not a default
Cache lifetime, short
5 mindocumented
models.dev · 2026-11-17
Cache lifetime, long
1 hdocumented
models.dev · 2026-11-17

Limits

Input window

LimitValueSource
Input window
input_window: the most input one request can carry on this entry, in tokens as the provider counts them.
262,144 tokensdocumentedInput and output togethermodels.dev2026-11-17
Documented
The figure the source documents, and the field it is in.
262,144 tokenslimit.contextmodels.dev2026-11-17
Measured
What each limit evaluation that counts gives, one line per evaluation.
Not measured–

How the input window is worked out, and what it does not say

Documented

LimitValueSource
Context window
limit.context: what this provider accepts for the model, input and output together.
262,144 tokensmodels.dev
Largest input
limit.input: stated where the input limit is lower than the context window.
Unknown–
Maximum output
limit.output: the most one response can hold. A maximum, not what you get by default.
262,144 tokensmodels.dev

Measured tokens

DateMeasured throughContextInput acceptedInput refusedOutput limitRequested output acceptedEvidence
No limits were measured on this entry.

Price

Base chargeRate
Input$0.68 / 1M tokens
Output$3.40 / 1M tokens
Reasoning outputUnknown
Cache read$0.136 / 1M tokens
Cache writeUnknown

Conditional rates

ConditionChargeRateApplies to
Manual caching and cache lifetime 5 minCache write$0.85 / 1M tokensWhole request
Manual caching and cache lifetime 1 hCache write$1.36 / 1M tokensWhole request
Service tier priorityInput$1.02 / 1M tokens · × 1.5Whole request
Output$5.10 / 1M tokens · × 1.5
Cache read$0.204 / 1M tokens · × 1.5
Service tier flexInput$0.544 / 1M tokens · × 0.8Whole request
Output$2.72 / 1M tokens · × 0.8
Cache read$0.1088 / 1M tokens · × 0.8

Source: models.dev 2026-11-17

Other prices in the source, not shown above (0)

None

Request controls

ControlSupportRequest fieldAccepted valuesDefaultConditions
Service tierSupportedUnknown
flex
priority
UnknownNone recorded

Source: models.dev 2026-11-17

Prompt caching

Lifetimes

Every cache lifetime of this entry, by retention
LifetimeDocumented for, or measured throughTime since the prompt was cached · served from the cache, in percent, with hits/checks
At once2.5 min5 min7.5 min10 min15 min20 min25 min30 min40 min50 min1 h1 h 151 h 302 h4 h8 h12 h24 h
Short retention
Safe lifetime
5 mindocumentedmodels.dev2026-11-17
Documented
5 min
Measured
Not measured
Inside the documented lifetime
Not applicable
5 mindocumentedmodels.dev2026-11-17Manual explicit
As documented: 5m
Not applicable
Long retention
Safe lifetime
1 hdocumentedmodels.dev2026-11-17
Documented
1 h
Measured
Not measured
Inside the documented lifetime
Not applicable
1 hdocumentedmodels.dev2026-11-17Manual explicit
As documented: 1h
Not applicable

Checks served from the cache, in percent and as hits/checks, by time since the prompt was cached100 All67 Half or more33 Fewer0 None· Not checked at that ageMethodology

Cache modes

ModeSupportedMin. tokensBreakpointsTargets
Automatic implicit Supported Unknown Not applicable Not applicable
Manual explicit Supported 1,024 Unknown Unknown

Source: models.dev · Cache modes

Retention

ControlSupportRequest fieldAccepted valuesDefaultConditions
Cache retentionSupportedprompt_cache_options.ttl
Request body, top level
Short: 5m
prompt_cache_options.mode=explicit, prompt_cache_options.ttl=5m
Long: 1h
prompt_cache_options.mode=explicit, prompt_cache_options.ttl=1h
The field left outThe request also needs a prompt_cache_key.
Without ttl a request opens no retention window. It reuses a window that is open, or is cached best-effort.
Every request that sends ttl is charged a cache write, also when it only extends the window.

Source: docs.deepinfra.com/chat/prompt-cache-retention 2026-11-14

Provenance

ProvenanceValue
Sourcemodels.dev2026-11-17
Inherited fromNone
CorrectionsNone
EvidenceNone

Data

GET /api/v1/entries/deepinfra/moonshotai/Kimi-K2.7-Code

Show the full entry as published
{
  "id": "moonshotai/Kimi-K2.7-Code",
  "name": "Kimi K2.7 Code",
  "description": "Coding-focused Kimi model, stronger on long-horizon repo work with less overthinking",
  "type": "chat",
  "family": "kimi-k2",
  "canonical_id": "moonshotai/kimi-k2.7-code",
  "status": "deprecated",
  "release_date": "2026-06-12",
  "limit": {
    "context": 262144,
    "output": 262144
  },
  "capabilities": {
    "cache": {
      "implicit": true,
      "explicit": {
        "ttl": [
          "5m",
          "1h"
        ],
        "min_tokens": 1024
      }
    },
    "temperature": false,
    "top_k": false,
    "top_p": false,
    "structured_output": true,
    "prompt_cache_key": true,
    "system_updates": false,
    "effort_updates": false,
    "service_tier": [
      "flex",
      "priority"
    ],
    "tools": {
      "supported": true
    },
    "reasoning": {
      "supported": true,
      "toggle": true
    }
  },
  "cost": {
    "text": {
      "input": {
        "price": 0.68,
        "cache": {
          "read": 0.136,
          "explicit": {
            "write": {
              "5m": 0.85,
              "1h": 1.36
            }
          }
        }
      },
      "output": {
        "price": 3.4
      }
    },
    "multipliers": [
      {
        "when": {
          "service_tier": {
            "equals": "priority"
          }
        },
        "factor": 1.5
      },
      {
        "when": {
          "service_tier": {
            "equals": "flex"
          }
        },
        "factor": 0.8
      }
    ]
  },
  "modalities": {
    "input": [
      "text",
      "image/jpeg",
      "image/png",
      "image/gif",
      "image/webp",
      "image/bmp",
      "image/heic",
      "image/heif",
      "video/mp4",
      "video/mpeg",
      "video/mov",
      "video/avi",
      "video/x-flv",
      "video/mpg",
      "video/webm",
      "video/wmv",
      "video/3gpp"
    ],
    "output": [
      "text"
    ]
  },
  "api": {
    "chat-completions": {
      "base_url": "https://api.deepinfra.com/v1/openai",
      "sdk": {
        "aisdk": "@ai-sdk/deepinfra",
        "opencodeai": "@opencode/ai/providers/deepinfra"
      },
      "capabilities": {
        "tools": {
          "updates": []
        }
      },
      "compatibility": {
        "reasoning_field": "reasoning_content"
      }
    }
  },
  "open_weights": true,
  "knowledge": "2025-01",
  "last_updated": "2026-06-12",
  "providers_dev": {
    "origin": "upstream",
    "access": "api",
    "provenance": [],
    "inherited": null,
    "cache": {
      "documented": {
        "support": "supported",
        "modes": {
          "implicit": {
            "support": "supported",
            "min_tokens": null,
            "max_breakpoints": null,
            "targets": null
          },
          "explicit": {
            "support": "supported",
            "min_tokens": 1024,
            "max_breakpoints": null,
            "targets": null
          }
        }
      },
      "retention": {
        "support": "supported",
        "parameter": {
          "name": "prompt_cache_options.ttl",
          "location": "Request body, top level"
        },
        "accepted_values": [
          "5m",
          "1h"
        ],
        "default": null,
        "profiles": [
          {
            "profile": "short",
            "value": "5m"
          },
          {
            "profile": "long",
            "value": "1h"
          }
        ],
        "conditions": [
          "The request also needs a prompt_cache_key.",
          "Without ttl a request opens no retention window. It reuses a window that is open, or is cached best-effort.",
          "Every request that sends ttl is charged a cache write, also when it only extends the window."
        ],
        "evidence": [
          {
            "kind": "documented",
            "url": "https://docs.deepinfra.com/chat/prompt-cache-retention",
            "date": "2026-11-14",
            "note": "Request parameters: 'prompt_cache_options.ttl | \"5m\" | \"1h\" | Retention window. Sending it opens the window, or extends an open one. Omit it on reuse requests.' 'prompt_cache_options.mode | Currently \"explicit\".' 'prompt_cache_key [...] Required for retention'. Model support: 'moonshotai/Kimi-K2.7-Code | 5m, 1h'. 'On a model without retention support, prompt_cache_options is ignored and the request is billed as standard input.'"
          }
        ]
      },
      "lifetime": {
        "short": {
          "safe_s": 300,
          "basis": "documented",
          "source": "models.dev",
          "date": "2026-11-17",
          "documented_s": 300,
          "measured_s": null,
          "documented_status": null,
          "clients": 0,
          "evaluations": 0,
          "checks": 0,
          "hits": 0,
          "checks_inside": null,
          "hits_inside": null,
          "tested_from_s": null,
          "first_miss_s": null
        },
        "long": {
          "safe_s": 3600,
          "basis": "documented",
          "source": "models.dev",
          "date": "2026-11-17",
          "documented_s": 3600,
          "measured_s": null,
          "documented_status": null,
          "clients": 0,
          "evaluations": 0,
          "checks": 0,
          "hits": 0,
          "checks_inside": null,
          "hits_inside": null,
          "tested_from_s": null,
          "first_miss_s": null
        },
        "lifetimes": [
          {
            "retention_profile": "short",
            "basis": "documented",
            "source": "models.dev",
            "date": "2026-11-17",
            "lifetime_s": 300,
            "mode": "explicit",
            "documented_as": "5m",
            "client": null,
            "client_label": null,
            "parameter": null,
            "value": null,
            "evaluations": 0,
            "evaluation_ids": [],
            "checks": 0,
            "hits": 0,
            "tested_from_s": null,
            "first_miss_s": null,
            "results": null
          },
          {
            "retention_profile": "long",
            "basis": "documented",
            "source": "models.dev",
            "date": "2026-11-17",
            "lifetime_s": 3600,
            "mode": "explicit",
            "documented_as": "1h",
            "client": null,
            "client_label": null,
            "parameter": null,
            "value": null,
            "evaluations": 0,
            "evaluation_ids": [],
            "checks": 0,
            "hits": 0,
            "tested_from_s": null,
            "first_miss_s": null,
            "results": null
          }
        ]
      },
      "evaluations": []
    },
    "pricing": {
      "coverage": "partial",
      "billing": "per_use",
      "reference_ref": null,
      "rules": [
        {
          "id": "cost.text.input.price",
          "when": null,
          "meter": "text.input",
          "operation": "set",
          "amount": 0.68,
          "currency": "USD",
          "unit": {
            "name": "token",
            "quantity": 1000000
          },
          "applies_to": "all_usage",
          "source_path": "cost.text.input.price",
          "period": null,
          "resulting_rates": null
        },
        {
          "id": "cost.text.input.cache.read",
          "when": null,
          "meter": "text.cache_read",
          "operation": "set",
          "amount": 0.136,
          "currency": "USD",
          "unit": {
            "name": "token",
            "quantity": 1000000
          },
          "applies_to": "all_usage",
          "source_path": "cost.text.input.cache.read",
          "period": null,
          "resulting_rates": null
        },
        {
          "id": "cost.text.output.price",
          "when": null,
          "meter": "text.output",
          "operation": "set",
          "amount": 3.4,
          "currency": "USD",
          "unit": {
            "name": "token",
            "quantity": 1000000
          },
          "applies_to": "all_usage",
          "source_path": "cost.text.output.price",
          "period": null,
          "resulting_rates": null
        },
        {
          "id": "cost.text.input.cache.explicit.write.5m",
          "when": {
            "kind": "all",
            "conditions": [
              {
                "kind": "predicate",
                "field": "cache.mode",
                "op": "eq",
                "value": "explicit"
              },
              {
                "kind": "predicate",
                "field": "cache.retention_s",
                "op": "eq",
                "value": 300
              }
            ]
          },
          "meter": "text.cache_write",
          "operation": "set",
          "amount": 0.85,
          "currency": "USD",
          "unit": {
            "name": "token",
            "quantity": 1000000
          },
          "applies_to": "all_usage",
          "source_path": "cost.text.input.cache.explicit.write.5m",
          "period": null,
          "resulting_rates": null
        },
        {
          "id": "cost.text.input.cache.explicit.write.1h",
          "when": {
            "kind": "all",
            "conditions": [
              {
                "kind": "predicate",
                "field": "cache.mode",
                "op": "eq",
                "value": "explicit"
              },
              {
                "kind": "predicate",
                "field": "cache.retention_s",
                "op": "eq",
                "value": 3600
              }
            ]
          },
          "meter": "text.cache_write",
          "operation": "set",
          "amount": 1.36,
          "currency": "USD",
          "unit": {
            "name": "token",
            "quantity": 1000000
          },
          "applies_to": "all_usage",
          "source_path": "cost.text.input.cache.explicit.write.1h",
          "period": null,
          "resulting_rates": null
        },
        {
          "id": "cost.multipliers[0].factor",
          "when": {
            "kind": "predicate",
            "field": "request.service_tier",
            "op": "eq",
            "value": "priority"
          },
          "meter": "*",
          "operation": "multiply",
          "amount": 1.5,
          "currency": null,
          "unit": null,
          "applies_to": "all_usage",
          "source_path": "cost.multipliers[0].factor",
          "period": null,
          "resulting_rates": [
            {
              "meter": "text.input",
              "amount": 1.02,
              "currency": "USD",
              "unit": {
                "name": "token",
                "quantity": 1000000
              }
            },
            {
              "meter": "text.cache_read",
              "amount": 0.204,
              "currency": "USD",
              "unit": {
                "name": "token",
                "quantity": 1000000
              }
            },
            {
              "meter": "text.output",
              "amount": 5.1,
              "currency": "USD",
              "unit": {
                "name": "token",
                "quantity": 1000000
              }
            }
          ]
        },
        {
          "id": "cost.multipliers[1].factor",
          "when": {
            "kind": "predicate",
            "field": "request.service_tier",
            "op": "eq",
            "value": "flex"
          },
          "meter": "*",
          "operation": "multiply",
          "amount": 0.8,
          "currency": null,
          "unit": null,
          "applies_to": "all_usage",
          "source_path": "cost.multipliers[1].factor",
          "period": null,
          "resulting_rates": [
            {
              "meter": "text.input",
              "amount": 0.544,
              "currency": "USD",
              "unit": {
                "name": "token",
                "quantity": 1000000
              }
            },
            {
              "meter": "text.cache_read",
              "amount": 0.1088,
              "currency": "USD",
              "unit": {
                "name": "token",
                "quantity": 1000000
              }
            },
            {
              "meter": "text.output",
              "amount": 2.72,
              "currency": "USD",
              "unit": {
                "name": "token",
                "quantity": 1000000
              }
            }
          ]
        }
      ],
      "rule_order": "listed",
      "unparsed": [],
      "evidence": [
        {
          "kind": "documented",
          "url": "https://models.dev",
          "date": "2026-11-17",
          "note": "The cost models.dev records for this entry. Rules are in the order models.dev applies them: base prices, overrides in their order, then multipliers."
        }
      ]
    },
    "request_controls": {
      "coverage": "partial",
      "items": [
        {
          "id": "cache.retention",
          "support": "supported",
          "when": null,
          "bindings": [
            {
              "location": "body",
              "path": "/prompt_cache_options/ttl",
              "scope": "request"
            }
          ],
          "options": [
            {
              "value": "5m",
              "attributes": {
                "retention_s": 300,
                "profile": "short"
              },
              "settings": [
                {
                  "location": "body",
                  "path": "/prompt_cache_options/mode",
                  "scope": "request",
                  "value": "explicit"
                },
                {
                  "location": "body",
                  "path": "/prompt_cache_options/ttl",
                  "scope": "request",
                  "value": "5m"
                }
              ],
              "when": null
            },
            {
              "value": "1h",
              "attributes": {
                "retention_s": 3600,
                "profile": "long"
              },
              "settings": [
                {
                  "location": "body",
                  "path": "/prompt_cache_options/mode",
                  "scope": "request",
                  "value": "explicit"
                },
                {
                  "location": "body",
                  "path": "/prompt_cache_options/ttl",
                  "scope": "request",
                  "value": "1h"
                }
              ],
              "when": null
            }
          ],
          "default": {
            "value": null
          },
          "conditions": [
            "The request also needs a prompt_cache_key.",
            "Without ttl a request opens no retention window. It reuses a window that is open, or is cached best-effort.",
            "Every request that sends ttl is charged a cache write, also when it only extends the window."
          ],
          "evidence": [
            {
              "kind": "documented",
              "url": "https://docs.deepinfra.com/chat/prompt-cache-retention",
              "date": "2026-11-14",
              "note": "Request parameters: 'prompt_cache_options.ttl | \"5m\" | \"1h\" | Retention window. Sending it opens the window, or extends an open one. Omit it on reuse requests.' 'prompt_cache_options.mode | Currently \"explicit\".' 'prompt_cache_key [...] Required for retention'. Model support: 'moonshotai/Kimi-K2.7-Code | 5m, 1h'. 'On a model without retention support, prompt_cache_options is ignored and the request is billed as standard input.'"
            }
          ]
        },
        {
          "id": "service_tier",
          "support": "supported",
          "when": null,
          "bindings": null,
          "options": [
            {
              "value": "flex",
              "attributes": null,
              "settings": null,
              "when": null
            },
            {
              "value": "priority",
              "attributes": null,
              "settings": null,
              "when": null
            }
          ],
          "default": null,
          "conditions": [],
          "evidence": [
            {
              "kind": "documented",
              "url": "https://models.dev",
              "date": "2026-11-17",
              "note": "Imported capabilities; corrections are recorded in providers_dev.provenance."
            }
          ]
        }
      ]
    },
    "limits": {
      "measured": [],
      "from_measurement": [],
      "input_window": {
        "tokens": 262144,
        "basis": "documented",
        "bound": "limit",
        "scope": "window",
        "source": "models.dev",
        "date": "2026-11-17",
        "documented_tokens": 262144,
        "documented_field": "limit.context",
        "documented_source": "models.dev",
        "documented_date": "2026-11-17",
        "documented_status": null,
        "measured_tokens": null,
        "measured_bound": null,
        "measured_kind": null,
        "measured_refused": null,
        "measured_date": null,
        "clients": 0,
        "evaluations": 0,
        "measurements": []
      }
    },
    "evidence": [],
    "verified": null
  }
}