Moonshot Setup

July 23, 2026 ยท View on GitHub

onWatch tracks your Moonshot (Kimi) open-platform API account balance. This is a balance-based provider (remaining credits), not a subscription quota - for the Kimi Code CLI subscription quotas, see Kimi Setup.

What it tracks

onWatch polls GET https://api.moonshot.ai/v1/users/me/balance and renders three balance cards:

CardFieldMeaning
Availableavailable_balanceTotal spendable balance
Vouchervoucher_balancePromotional / granted voucher credits
Cashcash_balancePaid cash balance

Trends show the balance drop rate over time so you can see how fast credits are being consumed.

Setup

  1. Create an API key in the Moonshot platform console.

  2. Provide it to onWatch via environment variable (or your .env file):

    MOONSHOT_API_KEY=sk-...
    
  3. Restart onWatch. The Moonshot tab appears automatically once the key is set.

Notes

  • The provider is opt-in: it only activates when MOONSHOT_API_KEY is set.
  • The API key is used only as a Bearer token against api.moonshot.ai and is never logged (redacted in debug output).