
Complete API documentation for integrating BetterLearn into your applications. RESTful endpoints, authentication, and code examples.
All API requests require authentication using an API key. Include your API key in the Authorization header:
/api/v1/quizzes/generateQuizzesGenerate a new quiz using AI
/api/v1/quizzes/{id}QuizzesRetrieve a specific quiz by ID
/api/v1/lesson-plans/createLesson PlansCreate a lesson plan
/api/v1/user/creditsAccountGet current credit balance
/api/v1/exports/{id}ExportsExport content to various formats
// Example: Generate a quiz using the API
const response = await fetch('https://api.betterlearn.com/v1/quizzes/generate', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
topic: 'World War II',
difficulty: 'medium',
questionCount: 10,
questionTypes: ['multiple-choice', 'true-false']
})
});
const quiz = await response.json();Get your API key and start building with BetterLearn today.