Generate a course end-to-end: create the job, wait for completion, export to SCORM.
Prerequisites
- An API key on a paid plan.
Set your key as an env var:
export LS_API_KEY="ls_your_key_here"
1. Create a course
POST /api/v1/courses returns immediately with a jobId. Generation
runs in the background.
curl -s https://learningstudioai.com/api/v1/courses \
-H "Authorization: Bearer $LS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "subject": "Workplace safety basics" }'
Response (202 Accepted):
{
"jobId": "8aF2k...Xq",
"status": "pending",
"pollUrl": "/api/v1/courses/jobs/8aF2k...Xq"
}
See Create a course for the full body
schema (outline, addOns, format, languageId, callbackUrl).
2. Poll until completion
GET /api/v1/courses/jobs/:jobId returns the current state. Status
moves pending → running → completed (or failed). Generation
typically completes in 60–120 seconds.
curl -s https://learningstudioai.com/api/v1/courses/jobs/$JOB_ID \
-H "Authorization: Bearer $LS_API_KEY"
Final response on success:
{
"jobId": "8aF2k...Xq",
"status": "completed",
"progress": 100,
"course": {
"id": "cou_abc123",
"name": "Workplace Safety Basics",
"shareUrl": "https://learningstudioai.com/go/cou_abc123",
"createdAt": "2026-04-29T17:14:08.000Z"
}
}
Prefer not to poll? Pass callbackUrl on the create request and
we'll POST a course.created event when the job finishes — see
Webhooks.
3. Export to SCORM
POST /api/v1/courses/:id/export is synchronous and typically
returns in under 30 seconds.
curl -s https://learningstudioai.com/api/v1/courses/$COURSE_ID/export \
-H "Authorization: Bearer $LS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "format": "scorm12" }'
Response:
{
"courseId": "cou_abc123",
"format": "scorm12",
"downloadUrl": "https://storage.googleapis.com/.../course.zip",
"shareUrl": "https://learningstudioai.com/go/cou_abc123",
"exportedAt": "2026-04-29T17:15:42.000Z"
}
Hand downloadUrl to your LMS. Supported format values:
scorm12, scorm2004, scorm2004_4.
Next steps
- Wire a webhook receiver so you don't have to poll.
- Browse the API reference for full parameter and response details on each endpoint.
- Check the Errors page for status codes and machine-readable error codes.