Skip to Content
TensorPass

Kimi

Connect a Kimi account to AI Wallet with Kimi's device sign in, answering on Kimi's coding endpoint.

The Kimi account answers with the visitor's Kimi account, on Kimi's coding endpoint. The wallet lists it as Kimi under "With your plan", with the id kimi.

What the visitor needs

A Kimi account with a plan. The wallet shows the account as paid from the plan.

Sign in

  1. In the wallet, the visitor picks Kimi under "With your plan".
  2. The wallet asks Kimi for a device code at https://auth.kimi.com/api/oauth/device_authorization and shows the code in the side panel.
  3. It opens a window on Kimi's verification page, with the code filled in when Kimi gives such an address.
  4. The visitor signs in and approves the code.
  5. The wallet asks Kimi's token endpoint each time a page finishes loading in the window, when the window closes, and when the visitor presses "I approved it". Kimi answers authorization_pending or slow_down until the visitor approves.
  6. Kimi returns the tokens, and the account is connected.

The sign in calls carry the header X-Msh-Platform: aiconnect. The code lasts as long as Kimi says in expires_in, and ten minutes when Kimi gives no duration. The wallet renews the access token with the refresh token from one minute before it expires.

Models

The wallet has no model list for Kimi. The account answers with kimi-for-coding, and the side panel shows no model buttons for its sites.

Usage and limits

The wallet reads no usage header specific to Kimi. It reads x-ratelimit-remaining-tokens and x-ratelimit-limit-tokens on any answer that carries them, as it does for every account. Without them, the card keeps saying "Usage shows after the first answer", and Auto ranks the account among the accounts with no reading.

Calls

Answers come from https://api.kimi.com/coding/v1/chat/completions in the OpenAI chat completions protocol. All four request options reach Kimi.

Known issues

  • The sign in uses the device login of Kimi's own command line tool and its client.

On this page