Câu hỏi tắc nghiệm
Tạo bộ câu hỏi trắc nghiệm từ một ghi chú đã có. Tất cả các endpoint bên dưới đều hỗ trợ API Key (X-API-Key hoặc Authorization: Bearer ntx_...).
Base URL: https://api.notexapp.com
Tạo Quiz — POST /v6/create/quiz
Tạo một bộ câu hỏi trắc nghiệm từ ghi chú. Trả về task_id — theo dõi
Tasks để lấy kết quả.
Cũng hỗ trợ: User JWT, Service Key.
Content-Type: application/x-www-form-urlencoded
| Field | Type | Required | Description |
|---|---|---|---|
note_id | string | required | ID của ghi chú dùng để tạo bộ câu hỏi |
num_questions | string | optional | Số lượng câu hỏi cần tạo |
set_name | string | optional | Tên của bộ câu hỏi |
difficulty | string | optional | Mức độ khó (easy, medium, hard) |
custom_prompt | string | optional | Yêu cầu tùy chỉnh dành cho AI |
community | boolean | optional | Tạo từ ghi chú cộng đồng |
curl -X POST https://api.notexapp.com/v6/create/quiz \
-H "X-API-Key: ntx_live_..." \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "note_id=665f..." \
--data-urlencode "num_questions=10" \
--data-urlencode "difficulty=medium"
Response (200) — trả về task_id:
{
"status": "PROCESSING",
"data": {
"task_id": "b3f1a2c4-...",
"user_id": "665f..."
}
}
Theo dõi kết quả tác vụ để lấy bộ câu hỏi đã tạo:
{
"status": "SUCCESS",
"data": {
"quiz_set_id": "665f...",
"set_name": "Machine Learning Quiz",
"questions": [
{
"question": "Which algorithm is used for classification?",
"options": ["Linear Regression", "Decision Tree", "K-Means", "PCA"],
"answer": "Decision Tree"
},
...
]
}
}
Was this page helpful?