Skip to main content

Enable OpenAI for AI grading

QuizMachine can use OpenAI's Chat Completions API to suggest grades for free-text and code answers, and to review question wording. An administrator still reviews every suggested score before applying it.

Your API key is stored encrypted and is never displayed after saving. Each grading or review request is chargeable by OpenAI; when fallback is enabled, QuizMachine may send a failed request to the next configured provider.

Step 1 — Create an API key

  1. Sign in to the OpenAI API key page.
  2. Create a project API key for QuizMachine and copy it immediately.
  3. Ensure the project has billing, permissions, and model access for the model you intend to use.

Step 2 — Choose endpoint and model

Leave the endpoint blank to use the documented default:

SettingValue
Endpointhttps://api.openai.com/v1/chat/completions
Default modelgpt-4.1-mini

You can enter another Chat Completions-compatible model available to your API project. Verify availability in OpenAI's model list before saving. Codex and gpt-3.5-turbo are model selections, not separate providers; use them only when the project lists them and they support this API contract.

This OpenAI integration supports free-text and code grading plus question review. Diagram Upload falls back to manual review only after no configured provider has graded it; a declined diagram is offered to the next provider in priority order.

Step 3 — Add it in QuizMachine

  1. Open the quiz Configure tab, or your personal AI settings page.
  2. Choose OpenAI for a fallback priority.
  3. Enter the model, optional endpoint, and API key.
  4. Use Test configuration, then save the fallback profiles.

Troubleshooting

Rotate or remove a key

Create a replacement key in OpenAI first, update and test the affected QuizMachine profile, then revoke the old key in OpenAI. Disable or remove the profile in QuizMachine when it should no longer receive answer data.

Reference: OpenAI Chat Completions API reference.

Back to all Help pages