Kimi K2.7 Code

Code-specialized Cloudflare Workers AI model for debugging, refactors, and end-to-end coding workflows.

Text

Kimi Code technical docs

Endpoint, auth header, parameters, prices, and tested request examples for Kimi K2.7 Code.

Endpoint

Endpoint and pricing

POST /responses Endpoint https://api.imole.app/v1 Base URL 3 API cauris 3 Agent cauris
Headers

Request headers

Authorization required

Bearer Imole API key.

Content-Type required

Use application/json for JSON requests.

Parameters

Request parameters

model required

Text model id.

input required

String input or Responses input array.

messages

Legacy chat-style array. The router converts it to Responses input.

instructions

System or developer instruction inserted ahead of the user task.

max_output_tokens

Optional provider output control. Imole does not require it or impose its own token ceiling.

reasoning

Optional reasoning controls when supported, including effort and Pro mode.

temperature

Sampling randomness when the model supports it.

top_p

Nucleus sampling control.

stream

Return server-sent events when supported.

true, false
tools

Tool definitions for tool-enabled Responses calls.

tool_choice

Tool selection policy.

auto, none, required
parallel_tool_calls

Allow multiple tool calls in one turn.

true, false
text.format

Structured text format controls for Responses.

response_format

Compatibility field for JSON-style output requests.

metadata

Optional request metadata.

Examples

Tested request examples

String input
curl -X POST "https://api.imole.app/v1/responses" \
  -H "Authorization: Bearer $IMOLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kimi-k2.7-code",
  "max_output_tokens": 64,
  "input": "Reply with exactly hello-from-imole.",
  "instructions": "Return only the exact requested text."
}'
Responses input array
curl -X POST "https://api.imole.app/v1/responses" \
  -H "Authorization: Bearer $IMOLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kimi-k2.7-code",
  "max_output_tokens": 64,
  "instructions": "Return only the exact requested text.",
  "input": [
    {
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "Reply with exactly responses-array-from-imole."
        }
      ]
    }
  ]
}'
Legacy messages array
curl -X POST "https://api.imole.app/v1/responses" \
  -H "Authorization: Bearer $IMOLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "kimi-k2.7-code",
  "max_output_tokens": 64,
  "messages": [
    {
      "role": "system",
      "content": "Return only the exact requested text."
    },
    {
      "role": "user",
      "content": "Reply with exactly legacy-messages-from-imole."
    }
  ]
}'