Question Generator API

Lorem ipsum dolor sit amet consectetur. Egestas auctor urna risus metus. Vitae sit tortor velit ultricies. Risus eget sapien id urna.

Documentation

Credits

$10

Roughly 100 API requests.

Each API request generates 5-10 questions. Only successful generations are counted.

Number of questions


1,000


Documentation

Integrate our question generator API into your application. Each API request generates 5-10 questions. Only successful generations are counted.

opx-website.gettingKey

opx-website.gettingKeyDesc

opx-website.apiEndpoint

https://server.opexams.com

opx-website.authentication

opx-website.authenticationDesc

"api-key": "YOUR-API-KEY"

POST /questions-generator

opx-website.postQuestionsGeneratorDesc

opx-website.name

opx-website.value

opx-website.required

opx-website.desc

type

string

true

opx-website.typeDesc

context

string

if type is `contextBased`

opx-website.contextDesc

topic

string

if type is `topicBased`

opx-website.topicDesc

questionType

string

true

opx-website.questionTypeDesc

difficulty

string

false

opx-website.difficultyDesc

requestId

string

true

opx-website.requestIdDesc

opx-website.testReq

opx-website.testReqDesc

opx-website.response

opx-website.responseDesc

{ "data": [ { "id": "pDgnjdMzOt9", "question": "Who founded University College London?", "answer": "Jeremy Bentham", "options": ["Charles Darwin", "Jeremy Bentham", "Isaac Newton", "William Shakespeare", "Albert Einstein"] }, { "id": "GZG49mXC3Jy", "question": "In what year was UCL established?", "answer": "1826", "options": ["1826", "1939", "1865", "1790", "1901"] }, { "id": "r0SclR9bOYf", "question": "What is the motto of UCL?", "answer": "Scientia et Labore", "options": ["Lux et Veritas", "In Hoc Signo Vinces", "Sapere Aude", "Scientia et Labore", "Deo Juvante"] }, { "id": "Tjadx7EYWKL", "question": "Which famous philosopher taught at UCL?", "answer": "Karl Marx", "options": ["Socrates", "Aristotle", "Plato", "Friedrich Nietzsche", "Karl Marx"] }, { "id": "Z9TxfwpFzvN", "question": "Who is the current Provost of UCL?", "answer": "David Price", "options": ["Richard Horton", "David Price", "Jeremy Farrar", "Patrick Vallance", "Mark Walport"] }, { "id": "q-DdK8od76m", "question": "Which UCL constituent college specializes in medical sciences?", "answer": "UCL Faculty of Medical Sciences", "options": ["UCL School of Slavonic and East European Studies", "UCL Institute of Education", "UCL Faculty of Laws", "UCL Faculty of Engineering Science", "UCL Faculty of Medical Sciences"] }, { "id": "0eUI1bSZpaE", "question": "What is the name of UCL's student union?", "answer": "UCLSU", "options": ["UCL Union", "UCLU", "UCLSU", "UCL Student Life", "UCL Campus Life"] }, { "id": "IXZvKXJMZoW", "question": "What is the name of UCL's main library?", "answer": "The UCL Main Library", "options": ["Senate House Library", "British Library", "UCL Library Services", "The Maughan Library", "The UCL Main Library"] }, { "id": "5qLp-pHWWnn", "question": "Which famous writer studied at UCL?", "answer": "Virginia Woolf", "options": ["Virginia Woolf", "Charles Dickens", "William Shakespeare", "Jane Austen", "Oscar Wilde"] }, { "id": "Hj2nDaEw2rW", "question": "Which famous museum is located on UCL's campus?", "answer": "The Petrie Museum of Egyptian Archaeology", "options": ["British Museum", "Science Museum", "Natural History Museum", "Victoria and Albert Museum", "The Petrie Museum of Egyptian Archaeology"] } ] }

GET /questions-generator/usage

opx-website.getQuestionsGeneratorUsageDesc

opx-website.response

opx-website.responseDesc

{ "usedCredits": 150, "totalCredits": 1000, "creditsLeft": 850 }

opx-website.errCodes

opx-website.errCodesDesc

Code

Description

400

Bad Request — Your request is invalid.

401

Unauthorized — Your API key is invalid.