DeepLearnAI
Developer Platform
Get API Key

Generate Multiple-Choice Questions

POST https://api.deep-learn.ai/v1/course/multiple-choice-question

Generate multiple-choice questions based on the provided text or course content.

Request body

text
string
Required

The text or course content used to generate the multiple-choice questions. This can be plain text, or a complete course in any format (JSON or XML)

learningObjectives
string[]
Optional

Learning objectives to help generate questions related to specific goals.

learnerDescription
string
Optional

A description of the learner, for example, "A beginner learning data science".

learnerLanguageLevel
string
Optional
Defaults to "adult"

The learner's language level, e.g., "adult", "beginner".

numberOfQuestions
number
Optional
Defaults to 5

The number of questions to generate.

Returns

questions
object[]

An array of multiple-choice questions, with each question object containing the following attributes:

id
string

Unique identifier for the question.

type
string

The type of question (e.g., "multiple-choice").

question
string

The text of the question.

options
object[]

An array of possible answers. Each option contains:

label
string

The display text of the option.

value
string

The value associated with the option.

isCorrect
boolean

Indicates whether this option is the correct answer.

success
boolean

Indicates if the request was successful.

errorCode
number or null

The error code if the request was not successful.

errorMessage
string or null

The error message if the request was not successful.