Start Free Products PYQ Papers Blog About API Profile Login
For Developers

Examzo API

Integrate faculty-validated CBSE questions into your LMS, website, or app. REST API with JSON responses — token-based access for Pro and School subscribers.

Quick Start

Three steps to your first API call.

1

Subscribe to Pro or School

API access is included with Pro (≥₹99/mo) and School (≥₹3,000/mo) plans.

2

Get Your API Key

Visit your Profile page after subscribing. Your key will be available in the API section.

3

Make Your First Request

Send a POST request with your key in the Authorization header. Get JSON back.

Authentication

All API requests require an API key. Include it as a Bearer token in the Authorization header.

# Every request must include: Authorization: Bearer examzo_api_xxxxxxxxxxxxxxxx

API keys are available to Pro and School subscribers. Each key is unique to your account. Do not share it or commit it to version control. If your key is compromised, regenerate it from your Profile page.

Token Limits

API usage is metered in tokens — the combined input + output tokens processed by the AI model per request. Tokens reset on the 1st of each month.

TierPriceAPI Tokens / MonthRough Paper Equivalent
Free₹0No API access
Pro₹99/mo500,000~100 papers
School≥₹3,000/mo10,000,000~2,000 papers

How tokens are counted: ~5,000 tokens per full paper generation, ~500 tokens per individual question fetch. Each API response includes X-RateLimit-Remaining and X-RateLimit-Reset headers so you can track your usage.

API Endpoints

Base URL: https://examzo-mcp.onrender.com

Generate Questions

POST /generate

Generate questions from a natural language prompt. Describe what you need — subject, class, chapter, question type, difficulty, count — in plain English.

Request body:

{ "query": "10 MCQs from Trigonometry for class 10 CBSE" }

Response (200):

{ "success": true, "meta": { "subject": "Mathematics", "class": 10, "board": "CBSE", "count": 10 }, "questions": [ { "question_id": "q_abc123", "question_type": "MCQ", "content": { "question_text": "If sin A = 3/5, then cos A = ?", "options": { "A": "4/5", "B": "3/4", "C": "5/3", "D": "1" }, "topic": "Trigonometry" }, "difficulty": "Moderate", "marks": 1 } ] }

Download Paper (PDF)

POST /paper?preview=false

Generate and download a formatted PDF paper. Use ?preview=true for a JSON preview, or ?preview=false (default) for the binary PDF.

Request body:

{ "query": "10 MCQs from Trigonometry for class 10 CBSE" }

Response: Binary PDF (Content-Type: application/pdf) when preview=false. JSON with question preview when preview=true.

Browse Questions

POST /fetch_questions

Fetch questions by filters. All parameters except subject are optional — omit them to browse broadly.

Request body:

{ "subject": "Mathematics", "topic": "Trigonometry", "difficulty": "Moderate", "question_type": "MCQ" }

Response (200):

{ "questions": [ ... ], "total": 45 }

Available filters: subject (required), topic, difficulty (Easy / Moderate / Hard), question_type (MCQ / Short Answer / Long Answer / Case Study), class (6–12).

Generate PDF from Selected Questions

POST /paper-from-selected

Generate a PDF from a specific set of question IDs. Useful after browsing questions via /fetch_questions and letting users hand-pick questions.

Request body:

{ "question_ids": ["q_abc123", "q_def456", "q_ghi789"] }

Response: Binary PDF (Content-Type: application/pdf).

List Available Subjects

GET /subjects

Get the list of available subjects and their metadata. No request body required.

Response (200):

{ "subjects": [ { "name": "Mathematics", "classes": [6,7,8,9,10,11,12] }, { "name": "Science", "classes": [6,7,8,9,10] }, ... ] }

Code Examples

Copy-paste ready. Replace YOUR_API_KEY with your actual key.

cURL

# Generate 10 Mathematics MCQs for class 10 curl -X POST https://examzo-mcp.onrender.com/generate \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query": "10 MCQs from Trigonometry for class 10 CBSE"}'

JavaScript (fetch)

const response = await fetch('https://examzo-mcp.onrender.com/generate', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ query: '10 MCQs from Trigonometry for class 10 CBSE' }) }); const data = await response.json(); console.log(`Generated ${data.meta.count} questions`); console.log(data.questions);

Python (requests)

import requests response = requests.post( "https://examzo-mcp.onrender.com/generate", headers={ "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, json={ "query": "10 MCQs from Trigonometry for class 10 CBSE" } ) data = response.json() print(f"Generated {data['meta']['count']} questions") for q in data["questions"]: print(f" - {q['content']['question_text']}")

FAQ

How do I get an API key?
Subscribe to a Pro or School plan. Once your subscription is active, visit your Profile page — your API key will be displayed in the API section.
What format are questions returned in?
All responses are JSON. Each question includes a unique question_id, question_type (MCQ, Short Answer, Long Answer, Case Study), content (question text + options for MCQs), difficulty, and marks.
How are tokens calculated?
Tokens are the combined input + output tokens processed by the AI model per API request. A typical paper generation uses ~5,000 tokens. Browsing individual questions uses ~500 tokens per fetch. Your remaining token balance is returned in the X-RateLimit-Remaining response header.
What happens when I hit my token limit?
API requests return HTTP 429 (Too Many Requests) with a message indicating your limit has been reached. Token limits reset on the 1st of each month. You can upgrade to a higher tier anytime for more tokens.
Can I use the API in my commercial product?
Yes. The School tier is designed for commercial and institutional use — LMS integrations, white-label apps, coaching platforms. The Pro tier is intended for individual teacher use. See our pricing page for details.
Is there a test environment?
There is no separate sandbox. You can test against the production API — your first few calls consume minimal tokens. Pro subscribers get 500,000 tokens/month, which is generous for development and testing.

Ready to Build?

Get API access with a Pro or School subscription.

View Plans