Skip to main content

Enable OpenRouter for AI grading

QuizMachine uses OpenRouter's OpenAI-compatible Chat Completions API to access a model selected by its exact catalog slug.

Keys are encrypted at rest. Fallback may send an answer to another selected provider and can incur charges.

Set up an API key

  1. Create an account and add enough credits for the selected model in OpenRouter.
  2. Create an inference API key, optionally with an expiry and spending limit. A Management API key cannot call chat completions.
  3. Choose a model your account, workspace, privacy policy, and guardrails allow; copy its exact slug, then use Test configuration before saving. Browse supported models.

Endpoint and model

Default endpoint: https://openrouter.ai/api/v1/chat/completions. Default model: openai/gpt-4.1-mini. Model IDs use exact author/slug values from the live catalog. Prices, availability, capabilities, and upstream providers can change, so verify them before production use.

Privacy and routing

Question, answer, model answer, and rubric data pass through OpenRouter to the selected or routed upstream provider. Review both OpenRouter's settings and every eligible provider's retention and training policy before sending personal or confidential data.

OpenRouter privacy and provider data controls.

Rotation and troubleshooting

Create and test a replacement key before revoking the old one. HTTP 401 usually indicates an invalid key or missing resource permission; HTTP 429 indicates a quota or rate limit.

HTTP 401 usually means an invalid, disabled, expired, or wrong key type. HTTP 402 indicates insufficient credits or a spending limit. HTTP 403 can indicate model, workspace, privacy, or guardrail restrictions. HTTP 429 indicates a model or account rate limit.

Free models have restrictive shared rate limits and are generally unsuitable for production grading. Confirm pricing and set key or workspace budgets before enabling a paid model.

This integration supports text/code grading and question review. QuizMachine does not send Diagram Upload questions through OpenRouter because the configured model and routed endpoint may not support images. The question is offered to the next provider in priority order and reaches manual review only after no configured provider has graded it.

Reference: OpenRouter quickstart; OpenRouter privacy and provider data controls.

Back to all Help pages