{"openapi":"3.1.0","info":{"title":"Moonshot AI (BYOK) API","version":"0.1.0","description":"Moonshot AI (BYOK) lets an AI assistant read your own Moonshot AI data through the Moonshot AI API with a key you supply (Moonshot API key). Read-only: 6 tools (get_balance, list_models, list_files, get_file, list_batches, get_batch). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is only ever sent to api.moonshot.ai. Unofficial...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-moonshot.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-moonshot/docs"},"termsOfService":"https://connectorbay.com/byok-moonshot/terms"},"servers":[{"url":"https://byok-moonshot.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-moonshot/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_balance":{"post":{"operationId":"get_balance","summary":"Show the account balance in US dollars: available balance (cash plus vouchers), voucher balance and cash balance. A nega","description":"Show the account balance in US dollars: available balance (cash plus vouchers), voucher balance and cash balance. A negative cash balance means money is owed. Keys from the .ai platform do not work on the other Kimi platforms. Use for \"How much Moonshot API credit do I have left\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_balanceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_models":{"post":{"operationId":"list_models","summary":"List the models the key can use, with context length and flags for image input, video input and reasoning support. Use f","description":"List the models the key can use, with context length and flags for image input, video input and reasoning support. Use for \"Which Kimi models are available and how long is their context\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_modelsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_files":{"post":{"operationId":"list_files","summary":"List the files uploaded to the account with name, size, purpose and processing status. File contents are not returned. U","description":"List the files uploaded to the account with name, size, purpose and processing status. File contents are not returned. Use for \"Which files have I uploaded to Moonshot\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_filesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_file":{"post":{"operationId":"get_file","summary":"Get metadata of one uploaded file: name, size, upload time, purpose and processing status. The file content is not retur","description":"Get metadata of one uploaded file: name, size, upload time, purpose and processing status. The file content is not returned. Use for \"What is the status of Moonshot file file_abc123\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"file_id":{"description":"File id from list_files.","maxLength":200,"title":"File Id","type":"string"}},"required":["file_id"],"title":"get_fileArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_batches":{"post":{"operationId":"list_batches","summary":"List batch jobs with status, input and output file ids, timestamps (Unix seconds) and request counts. Newest first; when","description":"List batch jobs with status, input and output file ids, timestamps (Unix seconds) and request counts. Newest first; when has_more is true pass the last id as after. Use for \"Which batch jobs have I run on Moonshot and did they finish\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Batches per page (default 20).","title":"Limit"},"after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Batch id of the last item of the previous page, to get the next page.","title":"After"}},"title":"list_batchesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_batch":{"post":{"operationId":"get_batch","summary":"Get one batch job: status, input and output file ids, timestamps (Unix seconds) and completed, failed and total request ","description":"Get one batch job: status, input and output file ids, timestamps (Unix seconds) and completed, failed and total request counts. Use for \"How far along is Moonshot batch batch_abc123\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"batch_id":{"description":"Batch id from list_batches.","maxLength":200,"title":"Batch Id","type":"string"}},"required":["batch_id"],"title":"get_batchArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}