Access step-by-step reasoning, simplified explanations, and lists of common student errors.
The Explanations API generates or retrieves detailed educational explanations for a given question. This includes full step-by-step solutions, simplified summaries for quick review, and mapped common mistakes with explanations of why they are incorrect.
The returned explanation object matches the following schema:
mistake and whyWrong.curl -X POST "https://dev.aloc.com.ng/api/v1/questions/f47ac10b-58cc-4372-a567-0e02b2c3d479/explain" \ -H "X-API-Key: alc_live_7f3a91c2d8e4f1ab92dd"
{
"data": {
"questionId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"explanation": "To solve x + 3 = 8, we subtract 3 from both sides: x = 8 - 3, which gives x = 5.",
"simplifiedExplanation": "Subtract 3 from both sides of the equation to find x = 5.",
"commonMistakes": [
{
"mistake": "Adding 3 to both sides",
"whyWrong": "Adding 3 would yield x + 6 = 11, which does not isolate x correctly."
}
],
"solutionImageUrl": null,
"sourceType": "ai",
"confidence": 0.99,
"needsReview": false
}
}