API KeysQuiz

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

FieldTypeRequiredDescription
note_idstringrequiredID của ghi chú dùng để tạo bộ câu hỏi
num_questionsstringoptionalSố lượng câu hỏi cần tạo
set_namestringoptionalTên của bộ câu hỏi
difficultystringoptionalMức độ khó (easy, medium, hard)
custom_promptstringoptionalYêu cầu tùy chỉnh dành cho AI
communitybooleanoptionalTạ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"
      },
      ...
    ]
  }
}