Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt

Use this file to discover all available pages before exploring further.

Model ID
moonshotai/Kimi-K2.6

API Usage

You can interact with the Kimi-K2.6 model through a RESTful API using an OpenAI-compatible interface. Kimi-K2.6 supports both Thinking mode and Instant mode.

API Examples

Generate a Chat Completion

Use the chat completion endpoint to generate responses from the K2.6 model.

Shell

curl --request POST \
  --url https://api.gmi-serving.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer *************' \
  --data '{
    "model": "moonshotai/Kimi-K2.6",
    "messages": [
      {"role": "system", "content": "You are a helpful and capable AI coding assistant."},
      {"role": "user", "content": "Explain the concept of quantum entanglement in simple terms."}
    ],
    "temperature": 1.0,
    "top_p": 0.95,
    "max_tokens": 800
  }'

Function Call Example

curl --request POST \
  --url https://api.gmi-serving.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer *************' \
  --data '{
    "model": "moonshotai/Kimi-K2.6",
    "temperature": 1.0,
    "top_p": 0.95,
    "max_tokens": 1000,
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "get_stock_price",
          "description": "Retrieve the current stock price for a given company.",
          "parameters": {
            "type": "object",
            "properties": {
              "symbol": {
                "type": "string",
                "description": "Ticker symbol of the company, e.g. AAPL or TSLA."
              }
            },
            "required": ["symbol"]
          }
        }
      }
    ],
    "messages": [
      {
        "role": "user",
        "content": "What is the current price of Apple stock?"
      }
    ]
  }'