Rephrase or regenerate one quiz question

Takes an existing question and returns a new version of it. Stateless — nothing is persisted.

Two modes, with mutually exclusive knobs:

rephrase — improve the wording. Answer count, quiz type and the number of correct answers are preserved (though which positions are correct may move). Combine hint keys in instructions (e.g. improve_clarity, more_professional). quizType and answersCount are rejected in this mode.

regenerate — reshape the question, e.g. change type or option count via quizType and answersCount (0 lets the model choose). Feedback text is always regenerated. instructions are rejected in this mode.

notice reports insufficient_data when the input question was underspecified; the model still runs.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
curl -X POST 'https://apis.elai.io/api/v1/quiz/regenerate-question' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "mode": "rephrase",
  "instructions": [
    "improve_clarity"
  ],
  "shouldRegenerateFeedback": false,
  "question": {
    "questionText": "What is Elai?",
    "answers": [
      {
        "text": "A video platform"
      },
      {
        "text": "A database"
      }
    ],
    "correctAnswers": [
      0
    ]
  }
}'
Body Params
string
enum
required
Allowed:
question
object
required
string
enum
Allowed:
integer
-9007199254740991 to 9007199254740991
boolean
Defaults to false
instructions
array of strings
Defaults to []
instructions
Allowed:
Responses

mode rejects.

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json