Developer API
Getting started
The Revision Genie API gives your product our curriculum structure, our specification references, and our subject genies. This page takes you from nothing to a working call.
Five minutes to your first call
- Join the programme. Sign in to Revision Genie, open /developers and fill in the short registration form: who you are, what you are building, and your agreement to the developer terms. The platform opens straight away.
- Mint a key. On the platform, create a key, name it after where it will live, and tick the scopes it needs. The secret is shown once and never again, because we store only its hash. Copy it somewhere safe before you close the dialog.
- Top up once. Your first top-up, of any amount we offer, unlocks the curriculum data endpoints on your account permanently. It is also the balance the paid endpoints spend from. Until then those four endpoints answer
402 topup_required. - Call the API. Send the key as a bearer token.
curl "https://www.revisiongenie.com/api/v1/subjects?qualification=GCSE&examBoard=AQA" \
-H "Authorization: Bearer rgk_live_YOUR_KEY_HERE"That returns every AQA GCSE subject we hold, each with an id. Those ids are what the rest of the API takes: feed one to /subjects/{id}/tree for its topics and subtopics, and a subtopic id to /subtopics/{id}/spec-points for the specification references it maps to.
The billing model, in three sentences
The curriculum data endpoints are included once you have topped up, and cost nothing per call after that: your balance is not touched however many times you read them, and it reaching zero does not stop you. The endpoints that run a model, or that search on your behalf, come out of that prepaid balance: currently 1p for alignment calls, 4p for genie messages, 4p for chat messages and 8p for question sets. You top the balance up in pounds, a top-up adds to what you have rather than resetting it, and a call that fails through a fault on our side is not charged.
The full price list and the three ways to top up are on Billing and pricing.
What you can call
GET /api/v1/subjectslist subjectsGET /api/v1/subjects/{subjectId}/treeget a subject treeGET /api/v1/searchsearch the catalogueGET /api/v1/subtopics/{subtopicId}/spec-pointsget specification referencesPOST /api/v1/alignalign text to subtopics (1p)POST /api/v1/genies/{shortName}/chatchat with a subject genie (4p)POST /api/v1/chatchat without naming a genie (4p)POST /api/v1/questions/generategenerate exam-style questions (8p)GET /api/v1/accountread your account (free)
Conventions
- Base URL
https://www.revisiongenie.com/api/v1. Everything is JSON, and everything is versioned under/v1. - Authentication is
Authorization: Bearer rgk_live_...on every request. There are no cookies and no sessions. - Errors are always
{ "error": "code", "message": "..." }. Branch onerror; the message is for a person. - Browsers can call these endpoints. Every response carries CORS headers and answers a preflight. Even so, keys belong on a server you control, never in a page or an app a user can read.
- Responses are
private, no-store. They are answers to your key, so nothing shared may cache them. - You may hold up to 5 live keys at once. Revoke one to mint another.
A first genie call
The chat endpoint is stateless: you send the whole conversation each time and we store none of it. It streams NDJSON by default, so pass stream: false while you are getting started.
curl -X POST "https://www.revisiongenie.com/api/v1/genies/biology/chat" \
-H "Authorization: Bearer rgk_live_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"messages": [{ "role": "user", "content": "Why do plants need magnesium?" }],
"stream": false
}'Before you ship this one
The chat endpoint costs 4p a message, runs our safeguarding detection on every turn, and requires a visible "Powered by Revision Genie" on any surface it powers. Read the genie chat reference before you put it in front of users.
Where to go next
- Authentication for keys, scopes and what you are responsible for.
- Errors and rate limits for every code you can receive and what is never charged.
- Legal for the developer terms, including attribution and what the API will never return.