curl --request POST \
--url https://api.example.com/api/generate-notes \
--header 'Content-Type: application/json' \
--data '
{
"topic": "<string>",
"content": "<string>"
}
'{
"notes": "<string>",
"topic": "<string>",
"error": "<string>"
}Generate comprehensive study notes in markdown format based on a topic and optional content
curl --request POST \
--url https://api.example.com/api/generate-notes \
--header 'Content-Type: application/json' \
--data '
{
"topic": "<string>",
"content": "<string>"
}
'{
"notes": "<string>",
"topic": "<string>",
"error": "<string>"
}POST /api/generate-notes
curl -X POST https://yourdomain.com/api/generate-notes \
-H "Content-Type: application/json" \
-d '{
"topic": "Photosynthesis",
"content": "Photosynthesis is the process by which plants convert light energy into chemical energy..."
}'
{
"notes": "## Photosynthesis Overview\n\nPhotosynthesis is the process by which plants, algae, and some bacteria convert light energy into chemical energy stored in glucose.\n\n## Key Components\n\n- **Chloroplasts**: Organelles where photosynthesis occurs\n- **Chlorophyll**: Green pigment that absorbs light\n- **Sunlight**: Energy source for the reaction\n\n## The Chemical Equation\n\n6CO₂ + 6H₂O + light energy → C₆H₁₂O₆ + 6O₂\n\n## Two Main Stages\n\n### Light-Dependent Reactions\n\n- Occur in the thylakoid membranes\n- Convert light energy to ATP and NADPH\n- Produce oxygen as a byproduct\n\n### Light-Independent Reactions (Calvin Cycle)\n\n- Occur in the stroma\n- Use ATP and NADPH to convert CO₂ into glucose\n- Do not require direct light\n\n## Importance\n\n- Primary source of energy for most life on Earth\n- Produces oxygen for aerobic organisms\n- Foundation of most food chains",
"topic": "Photosynthesis"
}
{
"error": "Topic is required"
}
topic field is missing or empty.
{
"error": "Failed to generate notes: [error details]"
}
{
"error": "Failed to generate notes"
}
mixtral-8x7b-32768 model