API KeysThẻ ghi nhớ

Thẻ ghi nhớ

Tạo bộ flashcard 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 Flashcards — POST /v6/create/flashcards

Tạo một bộ flashcard 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 flashcard
num_cardsstringoptionalSố lượng thẻ cần tạo
set_namestringoptionalTên của bộ flashcard
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/flashcards \
  -H "X-API-Key: ntx_live_..." \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "note_id=665f..." \
  --data-urlencode "num_cards=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ộ flashcard đã tạo:

{
  "status": "SUCCESS",
  "data": {
    "flashcard_set_id": "665f...",
    "set_name": "Machine Learning Basics",
    "cards": [
      { "front": "What is supervised learning?", "back": "..." },
      ...
    ]
  }
}