Skip to content

AI Configuration ​

Quizora's AI writes quiz questions, quiz descriptions, SEO text, and personalised result feedback. You choose where that AI comes from. OpenAI is one option, not a requirement:

  • Cloud AI with an API key: OpenAI, Anthropic Claude, Google Gemini, Groq, OpenRouter, DeepSeek, Mistral, or Azure OpenAI
  • Self-hosted and free: run open models (Llama, Qwen, Mistral, Gemma…) on your own server with Ollama or LM Studio. No API key, no per-request cost
  • Any OpenAI-compatible API: Together, Fireworks, xAI, Perplexity, vLLM, LocalAI…
  • Offline: no AI at all. Creators paste study notes and Quizora builds questions from them

Everything is set in Admin β†’ Settings β†’ AI. There's nothing to configure in .env.

New in v1.5.1

Before 1.5.1, Quizora only worked with OpenAI. Now it works with all the providers above, and the Test connection button checks a provider before you save it.


Choosing a provider ​

ProviderCostAPI keyGood for
OpenAIPay per useplatform.openai.comBest all-round quality (gpt-4o)
Anthropic ClaudePay per useconsole.anthropic.comCareful, well-written questions and explanations
Google GeminiFree tier, then pay per useaistudio.google.comLow cost, generous free tier
GroqFree tier (rate-limited)console.groq.comVery fast open models
OpenRouterPay per use, some free modelsopenrouter.aiOne key for hundreds of models
DeepSeekVery low costplatform.deepseek.comCheapest paid option
Mistral AIPay per use, free tierconsole.mistral.aiEU-hosted
Azure OpenAIYour Azure contractAzure portalCompanies already on Azure
OllamaFree (your server)NonePrivacy, no ongoing cost
LM StudioFree (your machine)NoneTrying local models from a desktop app
Custom OpenAI-compatibleDependsDependsAnything else that speaks the OpenAI API
OfflineFreeNoneNo AI at all; questions come from pasted text

Which one should I pick?

  • Best quality: OpenAI gpt-4o or Claude claude-sonnet-5-5.
  • Lowest cost: Gemini gemini-2.5-flash (free tier) or DeepSeek deepseek-chat.
  • Zero cost and private: Ollama with llama3.1 (8B) or, if your server has the memory, qwen2.5:14b.
  • No AI at all: Offline.

Setting up a cloud provider ​

  1. Create an account with the provider and copy an API key (links in the table above).
  2. Go to Admin β†’ Settings β†’ AI and pick the provider.
  3. Paste the key into API Key. The Model field fills in a suggested model; change it to any model the provider offers.
  4. Click Test connection. A green "Connected to …" message means it works.
  5. Click Save Settings.

The Base URL is pre-filled for every preset. Change it only if the provider gives you a different endpoint.

One key at a time

Quizora stores one API key. When you switch provider, paste that provider's key; the saved key is only ever sent to the selected provider. Self-hosted providers (Ollama, LM Studio) never receive it.

Azure OpenAI ​

Pick Azure OpenAI, then enter:

  • Base URL: https://YOUR-RESOURCE.openai.azure.com/openai/v1
  • API Key: the key from your Azure OpenAI resource
  • Deployment name: the name you gave your model deployment (e.g. gpt-4o)

Custom OpenAI-compatible API ​

Pick Custom OpenAI-compatible API and enter the provider's endpoint (usually ending in /v1), its key and a model name. Examples:

ServiceBase URL
Together AIhttps://api.together.xyz/v1
Fireworkshttps://api.fireworks.ai/inference/v1
xAI (Grok)https://api.x.ai/v1
Perplexityhttps://api.perplexity.ai
vLLM / LocalAIhttp://your-server:8000/v1

Free, self-hosted AI with Ollama ​

Ollama runs open models on your own server. There's no API key and no per-request bill.

1. Install Ollama on the Quizora server (or any machine Quizora can reach):

bash
curl -fsSL https://ollama.com/install.sh | sh

2. Download a model:

bash
ollama pull llama3.1

3. In Quizora, pick Ollama in Admin β†’ Settings β†’ AI. Leave Base URL blank if Ollama runs on the same server (http://localhost:11434/v1), or enter its address, e.g. http://192.168.1.20:11434/v1. Click Test connection, then Save Settings.

ModelRAM neededNotes
llama3.2 (3B)~4 GBFastest; fine for short quizzes
llama3.1 (8B)~8 GBRecommended starting point
qwen2.5:14b~16 GBNoticeably better questions
qwen2.5:32b~32 GBClose to cloud quality

Speed

On a CPU-only server, a 10-question quiz with an 8B model can take a minute or more. Raise Request timeout (default 120 s) if generations time out, ask for fewer questions at a time, or use a server with a GPU.

Ollama in Docker

If Quizora runs in Docker and Ollama on the host, use http://host.docker.internal:11434/v1 as the Base URL. To reach Ollama from another machine, start it with OLLAMA_HOST=0.0.0.0 ollama serve.

LM Studio ​

Install LM Studio, download a model, and start its local server (default port 1234). In Quizora pick LM Studio, enter the model identifier shown in LM Studio's server tab (e.g. qwen2.5-7b-instruct), and test the connection.


Offline mode (no AI) ​

Pick Offline and Quizora makes no AI calls at all: no key, no network, no cost.

Instead of a topic, creators paste study material: lecture notes, a textbook passage, an article. Quizora turns its sentences into questions:

TypeExample from "The Calvin cycle uses carbon dioxide to build glucose."
Fill in the blankThe ______ cycle uses carbon dioxide to build glucose. β†’ Calvin
Multiple choiceSame sentence, with key terms from elsewhere in the text as wrong options
True / FalseThe original sentence (True), or with one key term swapped (False)

Each usable sentence gives one question, so paste at least a few paragraphs. Up to 20,000 characters fit in the box. Quiz descriptions, SEO text and result feedback use built-in templates in this mode.

INFO

Offline mode can't invent facts, so it only asks about what's in the pasted text. Review the questions before publishing, as you would with any generated content.


What the AI is used for ​

FeatureWhereOffline mode
Generate questionsCreator β†’ AI Generator, and the AI panel in the quiz wizardBuilt from pasted text
Quiz descriptionCreator β†’ Quizzes β†’ Basic Info β†’ Generate with AITemplate
SEO description and keywordsCreator β†’ Quizzes β†’ SEOTemplate
Student result feedbackResult page (when the quiz has AI feedback on)Score-based summary
Creator quiz insightCreator β†’ Reports β†’ Generate AI insightFlags questions most learners miss
Cover imageCreator β†’ Quizzes β†’ Basic InfoAlways drawn locally; no AI needed

Credit system ​

Quizora includes a built-in AI credit system so you can control how much free generation each creator gets, and charge for generations beyond the free quota. It works the same with every provider, including Offline.

SituationWhat happens
Creator has free credits remainingGeneration is free β€” no charge
Free credits exhaustedDeducted from creator's wallet balance
Wallet is emptyGeneration is blocked until the creator tops up
The AI reply can't be turned into questionsThe credit is refunded automatically
SettingDescriptionDefault
Free Generations per New UserHow many AI prompts each new creator gets for free10
Charge per GenerationAmount deducted per prompt beyond the free quotaβ‚Ή5.00

These defaults apply to all creators. You can override them per subscription plan. For a free provider such as Ollama, you can set the charge to 0, or keep it as a revenue stream.

Per-plan AI quotas ​

When you create or edit a subscription plan (Admin β†’ Plans), you can set:

  • AI Free Generations β€” monthly free quota for this plan tier
  • AI Charge per Generation β€” custom per-prompt rate for this plan tier

Monitoring AI usage ​

Go to Admin β†’ AI Generation Logs to see:

  • Which creators are generating the most
  • Which provider and model handled each request (e.g. gpt-4o, ollama:llama3.1, offline)
  • Token usage per generation
  • Success/failure status and error messages

Troubleshooting ​

ProblemFix
Test connection: "Failed to connect"The Base URL is wrong or the server can't reach the provider. For Ollama, check it's running (ollama list) and reachable from the Quizora server.
401 / "invalid API key"The key belongs to a different provider, or has been revoked. Paste a fresh key for the selected provider.
404 / "model not found"The model name doesn't exist on that provider. Pick a suggestion from the Model field, or for Ollama run ollama pull <model>.
Generation times outRaise Request timeout, ask for fewer questions, or use a faster model. Also check your web server's own timeout (e.g. proxy_read_timeout in Nginx).
"The AI reply could not be turned into questions"Smaller models sometimes ignore the format. Try again, ask for fewer questions, or use a larger model. The credit is refunded.

Quizora v1.5.1 β€” AI-Powered Quiz Platform