For AI agents: visit https://elai.readme.io/llms.txt for an index of all pages formatted in Markdown and endpoints in OpenAPI. Append .md to any documentation page URL to get its markdown version.
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
Time
Status
User Agent
Retrieving recent requests…
Loading…
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
]
}
}'
Responses
409
AI features are not enabled for this workspace, or its LLM usage allowance is exhausted.
500
The LLM call failed.
Updated about 2 hours ago
Did this page help you?
Yes
No
Language
ShellNodeRubyPHPPython
Credentials
Header
Header
Loading…
Response
Click Try It! to start a request and see the response here! Or choose an example: