Skip to main content

Enable Kimi (Moonshot AI) for AI grading

QuizMachine can grade free-text answers with either the newer Kimi Code API or the legacy Moonshot Platform API. This guide explains how to get a key, choose an endpoint, and enter the settings.

The AI only suggests a score and rationale; an admin always reviews it before applying the score. Your API key is encrypted and never shown again after saving.
Kimi has two API-key generations, and each key works only with its own endpoint. QuizMachine detects the generation from the key prefix and chooses the matching default when the endpoint field is blank.

Step 1 — Create an account and API key

Pick whichever generation you have (or want) a key for:

Step 2 — Endpoint and model

Both generations use an OpenAI-compatible chat-completion endpoint. QuizMachine chooses the matching default from the key prefix when the endpoint is blank:

Key prefixDefault endpointDefault model
sk-kimi-… https://api.kimi.com/coding/v1/chat/completions kimi-for-coding
sk-… (legacy) https://api.moonshot.cn/v1/chat/completions kimi-k3

Some Kimi models, including kimi-k3, accept only one sampling temperature. QuizMachine detects those and sends the value they require, so there is nothing for you to configure.

Other Kimi Code models are documented at kimi.com/code/docs. The catalog includes k3 and kimi-for-coding-highspeed; legacy Moonshot alternatives include moonshot-v1-32k and moonshot-v1-128k.

The model QuizMachine sends is fixed per endpoint. To use a different model, enter its matching endpoint explicitly; QuizMachine selects the default model from the effective endpoint host.

Diagram Upload questions

For Diagram Upload questions, QuizMachine uses Moonshot's vision-capable model and sends the uploaded image, any author reference diagram, the question text, and the model answer for visual grading. moonshot-v1-8k-vision-preview

The Moonshot vision path has not been verified with a live account and Kimi Code keys are not documented as vision-capable. Kimi Code diagram uploads therefore return manual review without sending an unsupported request. Use a legacy Moonshot key or another provider, and test with a real Diagram Upload question.

If diagram grading returns low-confidence text-only results, verify that your API key has access to the vision model.

Step 3 — Enter the settings in QuizMachine

  1. Open your quiz, go to the Configure tab, and find AI evaluation for free-text questions.
  2. Set AI provider to Kimi (Moonshot).
  3. Leave API endpoint URL blank to use the default matching your key's prefix, or paste a custom endpoint (e.g. to pin a specific generation regardless of key prefix).
  4. Paste your API key into API key.
  5. Click Test configuration to verify connectivity — a green message confirms the key works.
  6. Click Save AI settings.

On a free-text question, enable Grade this question with AI and provide a model answer. Submitted answers are graded automatically and queued for admin review.

Troubleshooting

Reference: Kimi Code documentation and legacy Moonshot Platform documentation.

Back to all Help pages