POST - Generate Worksheet Explanations
Initiates the worksheet explanation generation process for a given worksheet.
This step generates detailed explanations for each question in the worksheet after question generation is completed.
Prerequisites:
- The worksheet must exist.
- The question generation step (
QUESTION_GENERATION) must be completed. - The explanation generation must not already be in progress or completed.
How to Use:
- Call
POST /worksheet/v1/generate-explanations/{work_sheet_id}with a valid worksheet ID. - The API validates that:
- The worksheet exists.
- Question generation is completed.
- Explanation generation has not already started or completed.
- If validation passes, the explanation generation job is queued asynchronously.
- You receive a confirmation message with the worksheet ID.
Path Parameters:
work_sheet_id(UUID, required): The unique ID of the worksheet.
Response Codes:
200 OK: Explanation generation initiated successfully.400 Bad Request: Question generation not completed yet, or explanation generation already in progress/completed.404 Not Found: Worksheet not found.
POST
Generate Worksheet Explanations
Documentation Index
Fetch the complete documentation index at: https://docs.crazygoldfish.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the worksheet
Response
Worksheet explanation generation initiated successfully.
Previous
GET - Get Worksheet ExplanationsRetrieves all questions with their explanations for a given worksheet.
The response includes worksheet metadata along with questions that have an `explanation` key added to each question object.
**Prerequisites:**
- The worksheet must exist.
- The question generation step must be completed.
- The explanation generation step must be completed.
**How to Use:**
1. Call `GET /worksheet/v1/generate-explanations/{work_sheet_id}` with the worksheet ID.
2. On success, you will receive worksheet metadata along with questions and their explanations.
3. If the worksheet or any required step is missing, a `404` error is returned.
4. If the generation steps are not yet completed, a `400` error is returned with the current status.
5. If explanation generation failed, a `400` error is returned with the failure message.
**Path Parameters:**
- `work_sheet_id` (UUID, required): The unique ID of the worksheet.
**Response Data:**
- `id`: Worksheet ID.
- `board`: Board details (id and name).
- `grade`: Grade details (id and name).
- `section`: Worksheet section.
- `subject`: Subject details (id and name).
- `status`: Current status of the explanation generation step.
- `number_of_questions`: Total number of questions in the worksheet.
- `topic`: Topic of the worksheet.
- `documents`: List of document URLs associated with the worksheet.
- `audio`: Audio URL if available.
- `questions`: Array of questions with explanations merged.
**Response Codes:**
- `200 OK`: Questions with explanations returned successfully.
- `400 Bad Request`: Questions or explanations not yet generated, or generation failed.
- `404 Not Found`: Worksheet, questions, or explanations not found.
- `500 Internal Server Error`: Unexpected error occurred.
Next
Generate Worksheet Explanations