Skip to content

Quickstart

The StudyPlug API generates educational content items for K-5 students on demand (K-8 planned). This guide walks you through your first API call, browsing the curriculum catalog, and using seeds for reproducible output.

Generate 5 addition problems with a single request. No API key required.

Terminal window
curl -X POST https://api.studyplug.org/api/v1/generate \
-H "Content-Type: application/json" \
-d '{"skill": "add-within-10", "grade": "kindergarten", "count": 5}'

The response includes a data object with items (the generated content) and answerKey (the answers), plus a meta object with request metadata.

The API organizes content into a hierarchy: grades contain subjects, which contain topics, which contain skills. Use the catalog endpoints to discover what is available.

Terminal window
# List all grades
curl https://api.studyplug.org/api/v1/grades
# Get a grade with its subjects
curl https://api.studyplug.org/api/v1/grades/grade-3
# List skills filtered by grade and subject
curl "https://api.studyplug.org/api/v1/skills?grade=grade-3&subject=math"
# Search skills by keyword
curl "https://api.studyplug.org/api/v1/skills?q=fraction"

Once you find a skill slug from the catalog, pass it to the generate endpoint. You can request a batch of items or a single item.

Terminal window
# Batch: 10 items (default)
curl -X POST https://api.studyplug.org/api/v1/generate \
-H "Content-Type: application/json" \
-d '{"skill": "multiply-by-6"}'
# Single item
curl -X POST https://api.studyplug.org/api/v1/generate/single \
-H "Content-Type: application/json" \
-d '{"skill": "multiply-by-6"}'

Pass a seed parameter to get the exact same content every time. This is useful for caching, testing, and sharing reproducible worksheets.

Terminal window
# Same seed = same output, every time
curl -X POST https://api.studyplug.org/api/v1/generate \
-H "Content-Type: application/json" \
-d '{"skill": "add-within-10", "count": 5, "seed": 42}'

Seeded requests are also cached server-side, so repeated calls with the same parameters return instantly.