Each call starts a background job. Wait until the job’s status is
Completed before the next call. The wait_for helper below does this for you.Set up
You need an access token. If you don’t have one, follow the Quickstart.While a job is starting, the API can briefly return
404, and explanations return 400 until they’re ready. wait_for keeps checking in both cases and stops only if the job failed.Step 1: Start the worksheet
Send the board, grade, and subject, a topic, and how many questions you want. The three distributions are JSON strings.What you get back
What you get back
additional_recommendations.Step 2: Configure the questions
Sendsubject_matter and learning_standards back, with any edits. You get a plan for every question.
What you get back
What you get back
question_summary is trimmed here. In a real response, its counts add up to the number of questions.Step 3: Generate the questions
Send the plan back, with any edits. You get the questions and the answer key.What you get back
What you get back
Questions are grouped by type. Only multiple-choice questions have
options.Step 4: Add explanations (optional)
Add a step-by-step explanation, key concepts, and common mistakes to every question.explained["questions"] now has an explanations list.
Good to know
Limits
Limits
Use webhooks instead of polling
Use webhooks instead of polling
Register a webhook for each step, then fetch the result when the event arrives. See Async jobs and webhooks.
Troubleshooting
Troubleshooting
Related
Worksheet API reference
Every field, response, and error.
List worksheets
Show a teacher’s worksheet history.