{
  "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
}