Moonshot AI website screenshot

Moonshot AI

Moonshot AI is a Chinese foundation model company best known for Kimi, an LLM with industry-leading long-context capabilities. The Moonshot platform exposes OpenAI-compatible chat completion, files, batch, models, balance, and token-estimation APIs.

1 APIs 0 Features
AILLMInferenceLong ContextKimi

APIs

Moonshot AI Platform API

OpenAI-compatible inference API for Kimi K2.6, K2.5, K2, and Moonshot V1 models. Supports chat completions (incl. partial mode and tool use), models listing, file upload and con...

Collections

Pricing Plans

Rate Limits

Moonshot Ai Rate Limits

5 limits

RATE LIMITS

FinOps

Event Specifications

Moonshot AI Chat Completions Streaming API

AsyncAPI 2.6 description of the Moonshot AI streaming chat completions surface. Moonshot's `/v1/chat/completions` endpoint is OpenAI-compatible and, when invoked with `stream: t...

ASYNCAPI

Resources

👥
GitHubOrganization
GitHubOrganization
🔗
LinkedIn
LinkedIn
🔗
Website
Website
🔗
Documentation
Documentation
🔗
Plans
Plans
🔗
RateLimits
RateLimits
🔗
FinOps
FinOps

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: Moonshot AI API
  version: 1.0.0
items:
- info:
    name: Models
    type: folder
  items:
  - info:
      name: List Models
      type: http
    http:
      method: GET
      url: https://api.moonshot.ai/v1/models
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: List all currently available models.
- info:
    name: Billing
    type: folder
  items:
  - info:
      name: Check Balance
      type: http
    http:
      method: GET
      url: https://api.moonshot.ai/v1/users/me/balance
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: REST API to check your available, voucher, and cash balances on Kimi OpenPlatform.
- info:
    name: Files
    type: folder
  items:
  - info:
      name: List Files
      type: http
    http:
      method: GET
      url: https://api.moonshot.ai/v1/files
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Lists all files uploaded by the current user.
  - info:
      name: Upload File
      type: http
    http:
      method: POST
      url: https://api.moonshot.ai/v1/files
      body:
        type: multipart-form
        data:
        - name: file
          type: text
          value: ''
        - name: purpose
          type: text
          value: ''
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Uploads a file for extraction, image understanding, or video understanding.
  - info:
      name: Get File Information
      type: http
    http:
      method: GET
      url: https://api.moonshot.ai/v1/files/:file_id
      params:
      - name: file_id
        value: ''
        type: path
        description: The file identifier
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Retrieves metadata for a specific uploaded file.
  - info:
      name: Delete File
      type: http
    http:
      method: DELETE
      url: https://api.moonshot.ai/v1/files/:file_id
      params:
      - name: file_id
        value: ''
        type: path
        description: The file identifier
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Deletes a previously uploaded file.
  - info:
      name: Get File Content
      type: http
    http:
      method: GET
      url: https://api.moonshot.ai/v1/files/:file_id/content
      params:
      - name: file_id
        value: ''
        type: path
        description: The file identifier
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Retrieves extracted text content for files uploaded with purpose `file-extract`.
- info:
    name: Chat
    type: folder
  items:
  - info:
      name: Create Chat Completion
      type: http
    http:
      method: POST
      url: https://api.moonshot.ai/v1/chat/completions
      body:
        type: json
        data: '{}'
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Creates a completion for the chat message. Supports standard chat, Partial Mode, and Tool Use (Function Calling).
- info:
    name: Utilities
    type: folder
  items:
  - info:
      name: Estimate Token Count
      type: http
    http:
      method: POST
      url: https://api.moonshot.ai/v1/tokenizers/estimate-token-count
      body:
        type: json
        data: '{}'
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Estimates the number of tokens that would be used for a given set of messages and model. The input structure is
      almost identical to that of chat completion.
- info:
    name: Batch
    type: folder
  items:
  - info:
      name: List Batches
      type: http
    http:
      method: GET
      url: https://api.moonshot.ai/v1/batches
      params:
      - name: after
        value: ''
        type: query
        description: Pagination cursor, pass the ID of the last batch from the previous page
      - name: limit
        value: ''
        type: query
        description: Number of results per page, default 20
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: List batch tasks for your organization.
  - info:
      name: Create Batch
      type: http
    http:
      method: POST
      url: https://api.moonshot.ai/v1/batches
      body:
        type: json
        data: '{}'
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Create a batch task. You need to first upload a JSONL file with purpose="batch" via the Files API, then use the
      returned file_id to create the task.
  - info:
      name: Retrieve Batch
      type: http
    http:
      method: GET
      url: https://api.moonshot.ai/v1/batches/:batch_id
      params:
      - name: batch_id
        value: ''
        type: path
        description: The ID of the batch task
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Retrieve the status and details of a specific batch task.
  - info:
      name: Cancel Batch
      type: http
    http:
      method: POST
      url: https://api.moonshot.ai/v1/batches/:batch_id/cancel
      params:
      - name: batch_id
        value: ''
        type: path
        description: The ID of the batch task
      auth:
        type: bearer
        token: '{{bearerToken}}'
    docs: Cancel an in-progress batch task. The status will change to cancelling and then to cancelled. Only tasks in validating,
      in_progress, or finalizing status can be cancelled.
bundled: true