{"openapi":"3.1.0","info":{"title":"Synaptic API","version":"0.1.0"},"paths":{"/v1/sessions/{session_id}/files/{file_id}/annotations":{"get":{"tags":["annotations"],"summary":"List Annotations","description":"List all annotations for a file.","operationId":"list_annotations_v1_sessions__session_id__files__file_id__annotations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AnnotationResponse"},"title":"Response List Annotations V1 Sessions  Session Id  Files  File Id  Annotations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["annotations"],"summary":"Create Annotation","description":"Create a single annotation.","operationId":"create_annotation_v1_sessions__session_id__files__file_id__annotations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/files/{file_id}/annotations/bulk":{"post":{"tags":["annotations"],"summary":"Bulk Upsert Annotations","description":"Batch upsert annotations for debounced frontend saves.","operationId":"bulk_upsert_annotations_v1_sessions__session_id__files__file_id__annotations_bulk_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationBulkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AnnotationResponse"},"title":"Response Bulk Upsert Annotations V1 Sessions  Session Id  Files  File Id  Annotations Bulk Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/files/{file_id}/annotations/{annotation_id}":{"patch":{"tags":["annotations"],"summary":"Update Annotation","description":"Update an annotation's data or color.","operationId":"update_annotation_v1_sessions__session_id__files__file_id__annotations__annotation_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}},{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","title":"Annotation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["annotations"],"summary":"Delete Annotation","description":"Delete an annotation.","operationId":"delete_annotation_v1_sessions__session_id__files__file_id__annotations__annotation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}},{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","title":"Annotation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/me":{"get":{"tags":["auth"],"summary":"Get Current User Profile","description":"Get the authenticated user's profile.","operationId":"get_current_user_profile_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/sync":{"post":{"tags":["auth"],"summary":"Sync Profile","description":"Called after login to update last_login_at and ensure profile exists.\n\nThe DB trigger creates the profile on signup, but this endpoint\nacts as a safety net and keeps last_login_at current.","operationId":"sync_profile_v1_auth_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/sessions":{"post":{"tags":["sessions"],"summary":"Create Session","description":"Create a new study session.","operationId":"create_session_v1_sessions_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["sessions"],"summary":"List Sessions","description":"List all sessions for the current user.","operationId":"list_sessions_v1_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SessionResponse"},"title":"Response List Sessions V1 Sessions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}":{"get":{"tags":["sessions"],"summary":"Get Session","description":"Get a single session by ID.","operationId":"get_session_v1_sessions__session_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["sessions"],"summary":"Update Session","description":"Update session metadata (title, prompt).","operationId":"update_session_v1_sessions__session_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["sessions"],"summary":"Archive Session","description":"Archive (soft-delete) a session.","operationId":"archive_session_v1_sessions__session_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/process":{"post":{"tags":["sessions"],"summary":"Start Processing","description":"Validate session, transition to 'processing', and kick off objective generation.","operationId":"start_processing_v1_sessions__session_id__process_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProcessingStartRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/process/stream":{"post":{"tags":["sessions"],"summary":"Stream Processing","description":"Stream objective generation progress via SSE.","operationId":"stream_processing_v1_sessions__session_id__process_stream_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProcessingStartRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/process-status":{"get":{"tags":["sessions"],"summary":"Get Processing Status","description":"Poll processing progress.","operationId":"get_processing_status_v1_sessions__session_id__process_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessingStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/summarize":{"post":{"tags":["sessions"],"summary":"Generate Summary","description":"Generate an itemized reading summary for a session's paragraphs.","operationId":"generate_summary_v1_sessions__session_id__summarize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadingSummaryRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/summarize/stream":{"post":{"tags":["sessions"],"summary":"Stream Summary","description":"Stream reading summary generation via SSE.","operationId":"stream_summary_v1_sessions__session_id__summarize_stream_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/summary":{"get":{"tags":["sessions"],"summary":"Get Session Summary","description":"Get the latest reading summary for a session.","operationId":"get_session_summary_v1_sessions__session_id__summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadingSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/paragraphs":{"get":{"tags":["sessions"],"summary":"List Paragraphs","description":"List detected paragraphs for a reading session, optionally filtered by file.","operationId":"list_paragraphs_v1_sessions__session_id__paragraphs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"file_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadingParagraphListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/files":{"post":{"tags":["files"],"summary":"Initialize Upload","description":"Initialize a file upload and return a signed upload URL.","operationId":"initialize_upload_v1_sessions__session_id__files_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileInitRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileInitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["files"],"summary":"List Files","description":"List all files in a session.","operationId":"list_files_v1_sessions__session_id__files_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileResponse"},"title":"Response List Files V1 Sessions  Session Id  Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/files/{file_id}/complete":{"post":{"tags":["files"],"summary":"Finalize Upload","description":"Mark a file upload as complete and trigger text extraction.","operationId":"finalize_upload_v1_sessions__session_id__files__file_id__complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/files/preview-urls":{"get":{"tags":["files"],"summary":"Get All Preview Urls","description":"Return signed preview URLs for all completed files in a session.","operationId":"get_all_preview_urls_v1_sessions__session_id__files_preview_urls_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilePreviewUrlResponse"},"title":"Response Get All Preview Urls V1 Sessions  Session Id  Files Preview Urls Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/files/{file_id}":{"get":{"tags":["files"],"summary":"Get File","description":"Get file metadata and processing status.","operationId":"get_file_v1_sessions__session_id__files__file_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["files"],"summary":"Delete File","description":"Delete a file from a draft session.","operationId":"delete_file_v1_sessions__session_id__files__file_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/files/{file_id}/preview-url":{"get":{"tags":["files"],"summary":"Get File Preview Url","description":"Return a signed preview URL for a single file.","operationId":"get_file_preview_url_v1_sessions__session_id__files__file_id__preview_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilePreviewUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/flashcards":{"get":{"tags":["flashcards"],"summary":"List Flashcards","description":"Return the session's flashcard deck and generation status.\n\nCards are generated asynchronously (in parallel with objective\nextraction). Clients should poll this endpoint while ``status`` is\n``pending`` or ``generating``.","operationId":"list_flashcards_v1_sessions__session_id__flashcards_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashcardDeckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["flashcards"],"summary":"Save Deck","description":"Replace the session's flashcard deck with the provided ordered list.\n\nUsed by the deck editor: the client sends the full ordered list of cards\n(existing cards keep their UUID, new cards have ``id=null``); the server\nreconciles by inserting, updating, deleting, and reordering as needed.","operationId":"save_deck_v1_sessions__session_id__flashcards_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashcardSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashcardDeckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/flashcards/generate":{"post":{"tags":["flashcards"],"summary":"Regenerate Flashcards","description":"Kick off (or re-kick) flashcard generation for the session.\n\nUsed by the deck's retry path — handles both the genuine-failure case\n(``flashcards_status == 'failed'``) and the stuck-task case where a\nprevious background worker died mid-generation and left the status\npinned at ``generating``.","operationId":"regenerate_flashcards_v1_sessions__session_id__flashcards_generate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashcardDeckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/flashcards/{flashcard_id}":{"patch":{"tags":["flashcards"],"summary":"Update Flashcard","description":"Update a flashcard (star, last recall status, content, etc.).","operationId":"update_flashcard_v1_sessions__session_id__flashcards__flashcard_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"flashcard_id","in":"path","required":true,"schema":{"type":"string","title":"Flashcard Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashcardUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashcardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/flashcards/transcribe":{"post":{"tags":["flashcards"],"summary":"Transcribe Flashcard Audio","description":"Transcribe a spoken flashcard answer — no grading.\n\nMirrors the teach-back transcription flow. The client records audio\nvia the shared ``VoiceRecorder`` UI, posts the blob here, and the\nreturned transcript is loaded into the editable answer box. Grading\nhappens in a separate call after the user reviews/edits the text.","operationId":"transcribe_flashcard_audio_v1_sessions__session_id__flashcards_transcribe_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_transcribe_flashcard_audio_v1_sessions__session_id__flashcards_transcribe_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashcardTranscribeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/flashcards/connections/grade":{"post":{"tags":["flashcards"],"summary":"Grade Flashcard Connection","description":"Stream a grade for a student's explanation of how two flashcards relate.\n\nRuns ``MODEL_FAST`` against the two cards + session source chunks and\nstreams the verdict + feedback back as SSE (``verdict``,\n``feedback_delta``, ``done``). Nothing is persisted — connection\nattempts are ephemeral in v1.","operationId":"grade_flashcard_connection_v1_sessions__session_id__flashcards_connections_grade_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashcardConnectionGradeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/flashcards/{flashcard_id}/grade":{"post":{"tags":["flashcards"],"summary":"Grade Flashcard","description":"Grade a written flashcard answer.\n\nThe ``answer`` body is plain text — typed, transcribed from a prior\nrecording, or a mix after editing. The grading model compares it\nagainst the card's expected answer and ``last_status`` is written\nso deck stats stay correct.","operationId":"grade_flashcard_v1_sessions__session_id__flashcards__flashcard_id__grade_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"flashcard_id","in":"path","required":true,"schema":{"type":"string","title":"Flashcard Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashcardTextGradeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashcardGradeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/multiple-choice":{"get":{"tags":["multiple-choice"],"summary":"List Multiple Choice","description":"Return the session's MCQ bank and current generation status.\n\nQuestions are generated asynchronously in parallel with flashcards +\nobjectives. Clients should poll this endpoint while ``status`` is\n``pending`` or ``generating``.","operationId":"list_multiple_choice_v1_sessions__session_id__multiple_choice_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultipleChoiceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/multiple-choice/generate":{"post":{"tags":["multiple-choice"],"summary":"Regenerate Multiple Choice","description":"Kick off (or re-kick) MCQ generation for the session.\n\nHandles both the genuine-failure case (``multiple_choice_status ==\n'failed'``) and the stuck-task case where a previous background\nworker died mid-generation and left the status pinned at\n``generating``. An optional ``regeneration_prompt`` on the body is\nforwarded to the agent as per-run guidance.","operationId":"regenerate_multiple_choice_v1_sessions__session_id__multiple_choice_generate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MultipleChoiceGenerateRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultipleChoiceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/free-response":{"get":{"tags":["free-response"],"summary":"List Free Response","description":"Return the session's FR bank and current generation status.\n\nClients should poll while ``status`` is ``pending`` or\n``generating``.","operationId":"list_free_response_v1_sessions__session_id__free_response_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreeResponseListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/free-response/generate":{"post":{"tags":["free-response"],"summary":"Regenerate Free Response","description":"Kick off (or re-kick) FR generation for the session.\n\nHandles the genuine-failure case and the stuck-task case where a\nprevious background worker died mid-run and left the status pinned\nat ``generating``. An optional ``regeneration_prompt`` is forwarded\nto the agent as per-run guidance.","operationId":"regenerate_free_response_v1_sessions__session_id__free_response_generate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FreeResponseGenerateRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreeResponseListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/free-response/transcribe":{"post":{"tags":["free-response"],"summary":"Transcribe Free Response Audio","description":"Transcribe a spoken free-response answer — no grading.\n\nMirrors the flashcards transcribe flow: the client records audio\nwith the shared ``VoiceRecorder`` UI, posts the blob here, and the\nreturned transcript is loaded into the editable answer box in the\nanswer sheet. Grading happens in a separate call after the user\nreviews/edits the text and (optionally) attaches a whiteboard\nsnapshot.","operationId":"transcribe_free_response_audio_v1_sessions__session_id__free_response_transcribe_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_transcribe_free_response_audio_v1_sessions__session_id__free_response_transcribe_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreeResponseTranscribeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/free-response/{question_id}/answer":{"post":{"tags":["free-response"],"summary":"Grade Free Response Answer","description":"Grade a single FR answer. Ephemeral — nothing is persisted.\n\nThe body ships the transcript (typed, voice-transcribed, or both)\nand an optional base64 PNG whiteboard snapshot. The grader is\nvision-capable and will pick up on labelled strokes when an image\nis attached.\n\nBlocked-by-budget raises 402 the same way flashcards grading does.","operationId":"grade_free_response_answer_v1_sessions__session_id__free_response__question_id__answer_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"question_id","in":"path","required":true,"schema":{"type":"string","title":"Question Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreeResponseAnswerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreeResponseGradeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives":{"get":{"tags":["objectives"],"summary":"List Objectives","description":"List all learning objectives for a session with scope estimate.","operationId":"list_objectives_v1_sessions__session_id__objectives_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectiveListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives/{objective_id}":{"get":{"tags":["objectives"],"summary":"Get Objective","description":"Get a single learning objective.","operationId":"get_objective_v1_sessions__session_id__objectives__objective_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectiveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["objectives"],"summary":"Update Objective","description":"Rename or reorder an objective.","operationId":"update_objective_v1_sessions__session_id__objectives__objective_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectiveUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectiveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives/{objective_id}/context":{"get":{"tags":["objectives"],"summary":"Get Objective Context","description":"Get source chunks relevant to this objective (for the viewport).","operationId":"get_objective_context_v1_sessions__session_id__objectives__objective_id__context_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectiveContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives/{objective_id}/start-review":{"post":{"tags":["objectives"],"summary":"Start Review","description":"Transition objective to 'reviewing' state.","operationId":"start_review_v1_sessions__session_id__objectives__objective_id__start_review_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectiveTransitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives/{objective_id}/enter-recall":{"post":{"tags":["objectives"],"summary":"Enter Recall","description":"Transition objective to 'ready_for_recall' state.","operationId":"enter_recall_v1_sessions__session_id__objectives__objective_id__enter_recall_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectiveTransitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives/{objective_id}/skip":{"post":{"tags":["objectives"],"summary":"Skip Objective","description":"Skip this objective.","operationId":"skip_objective_v1_sessions__session_id__objectives__objective_id__skip_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectiveTransitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives/{objective_id}/complete":{"post":{"tags":["objectives"],"summary":"Complete Objective","description":"Mark objective workflow as completed.","operationId":"complete_objective_v1_sessions__session_id__objectives__objective_id__complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectiveTransitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives/{objective_id}/advance":{"post":{"tags":["objectives"],"summary":"Advance Objective","description":"Advance session to the next objective (may complete the session).","operationId":"advance_objective_v1_sessions__session_id__objectives__objective_id__advance_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives/{objective_id}/tutor-thread":{"get":{"tags":["tutor"],"summary":"Get Tutor Thread","description":"Get or create the tutor thread for an objective, with all messages.","operationId":"get_tutor_thread_v1_sessions__session_id__objectives__objective_id__tutor_thread_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TutorThreadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives/{objective_id}/tutor-messages":{"get":{"tags":["tutor"],"summary":"Get Tutor Messages","description":"List all tutor messages for an objective.","operationId":"get_tutor_messages_v1_sessions__session_id__objectives__objective_id__tutor_messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TutorMessageResponse"},"title":"Response Get Tutor Messages V1 Sessions  Session Id  Objectives  Objective Id  Tutor Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tutor"],"summary":"Send Tutor Message","description":"Send a message to the tutor and get a response.","operationId":"send_tutor_message_v1_sessions__session_id__objectives__objective_id__tutor_messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TutorMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TutorMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives/{objective_id}/tutor-messages/stream":{"post":{"tags":["tutor"],"summary":"Stream Tutor Message","description":"Stream a tutor response token-by-token via SSE.","operationId":"stream_tutor_message_v1_sessions__session_id__objectives__objective_id__tutor_messages_stream_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TutorMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives/{objective_id}/tutor-transcribe":{"post":{"tags":["tutor"],"summary":"Transcribe Tutor Audio","description":"Transcribe a spoken question for the Review-screen tutor — no DB writes.\n\nMirrors the flashcards / teach-back transcription flow: the client\nrecords audio with the shared ``VoiceRecorder`` UI, posts the blob\nhere, and the returned transcript is loaded into the chat composer\nso the user can review/edit before sending.","operationId":"transcribe_tutor_audio_v1_sessions__session_id__objectives__objective_id__tutor_transcribe_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_transcribe_tutor_audio_v1_sessions__session_id__objectives__objective_id__tutor_transcribe_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TutorTranscribeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives/{objective_id}/active-attempt":{"get":{"tags":["teachback"],"summary":"Get Active Attempt","description":"Get the active (non-terminal) attempt for an objective, if any.","operationId":"get_active_attempt_v1_sessions__session_id__objectives__objective_id__active_attempt_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives/{objective_id}/latest-attempt":{"get":{"tags":["teachback"],"summary":"Get Latest Attempt","description":"Get the most recent attempt for an objective, if any.","operationId":"get_latest_attempt_v1_sessions__session_id__objectives__objective_id__latest_attempt_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/objectives/{objective_id}/teachback-attempts":{"post":{"tags":["teachback"],"summary":"Create Attempt","description":"Create a new teach-back attempt, or return existing active one.","operationId":"create_attempt_v1_sessions__session_id__objectives__objective_id__teachback_attempts_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"objective_id","in":"path","required":true,"schema":{"type":"string","title":"Objective Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeachbackAttemptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teachback-attempts/{attempt_id}/transcribe":{"post":{"tags":["teachback"],"summary":"Transcribe Audio","description":"Upload audio and get a transcript via Whisper.","operationId":"transcribe_audio_v1_teachback_attempts__attempt_id__transcribe_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","title":"Attempt Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_transcribe_audio_v1_teachback_attempts__attempt_id__transcribe_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeachbackAttemptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teachback-attempts/{attempt_id}/text":{"post":{"tags":["teachback"],"summary":"Submit Typed Text","description":"Submit typed text as the teach-back content.","operationId":"submit_typed_text_v1_teachback_attempts__attempt_id__text_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","title":"Attempt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeachbackTextSubmit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeachbackAttemptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teachback-attempts/{attempt_id}/transcript":{"patch":{"tags":["teachback"],"summary":"Edit Transcript","description":"Edit the transcript before submission.","operationId":"edit_transcript_v1_teachback_attempts__attempt_id__transcript_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","title":"Attempt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeachbackTranscriptEdit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeachbackAttemptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teachback-attempts/{attempt_id}/submit":{"post":{"tags":["teachback"],"summary":"Submit Attempt","description":"Submit the attempt — triggers follow-up questioning or evaluation.","operationId":"submit_attempt_v1_teachback_attempts__attempt_id__submit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","title":"Attempt Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TeachbackSubmitBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teachback-attempts/{attempt_id}/followups":{"post":{"tags":["teachback"],"summary":"Answer Followup","description":"Answer a follow-up question from the teach-back agent.","operationId":"answer_followup_v1_teachback_attempts__attempt_id__followups_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","title":"Attempt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teachback-attempts/{attempt_id}/followups/transcribe":{"post":{"tags":["teachback"],"summary":"Answer Followup Audio","description":"Transcribe audio and submit it as a follow-up answer.","operationId":"answer_followup_audio_v1_teachback_attempts__attempt_id__followups_transcribe_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","title":"Attempt Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_answer_followup_audio_v1_teachback_attempts__attempt_id__followups_transcribe_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teachback-attempts/{attempt_id}/skip-followups":{"post":{"tags":["teachback"],"summary":"Skip Followups","description":"Skip remaining follow-up questions and evaluate immediately.","operationId":"skip_followups_v1_teachback_attempts__attempt_id__skip_followups_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","title":"Attempt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teachback-attempts/{attempt_id}/evaluate/stream":{"post":{"tags":["teachback"],"summary":"Stream Evaluation","description":"Stream evaluation results via SSE as the LLM scores each dimension.","operationId":"stream_evaluation_v1_teachback_attempts__attempt_id__evaluate_stream_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","title":"Attempt Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TeachbackEvaluateBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teachback-attempts/{attempt_id}":{"get":{"tags":["teachback"],"summary":"Get Attempt","description":"Get full attempt details including transcript and turns.","operationId":"get_attempt_v1_teachback_attempts__attempt_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","title":"Attempt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeachbackAttemptDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teachback-attempts/{attempt_id}/abandon":{"post":{"tags":["teachback"],"summary":"Abandon Attempt","description":"Abandon an in-progress attempt.","operationId":"abandon_attempt_v1_teachback_attempts__attempt_id__abandon_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","title":"Attempt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeachbackAttemptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teachback-attempts/{attempt_id}/assessment-status":{"get":{"tags":["assessments"],"summary":"Get Assessment Status","description":"Poll whether the evaluation is complete.","operationId":"get_assessment_status_v1_teachback_attempts__attempt_id__assessment_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","title":"Attempt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teachback-attempts/{attempt_id}/assessment":{"get":{"tags":["assessments"],"summary":"Get Assessment","description":"Get the full assessment for an attempt.","operationId":"get_assessment_v1_teachback_attempts__attempt_id__assessment_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","title":"Attempt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectiveAssessmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/subscription":{"get":{"tags":["billing"],"summary":"Get Subscription","description":"Get the current user's subscription and usage summary.","operationId":"get_subscription_v1_billing_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/subscribe":{"post":{"tags":["billing"],"summary":"Subscribe","description":"Create a Stripe Checkout Session for a new subscription.","operationId":"subscribe_v1_billing_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/checkout/{checkout_session_id}/confirm":{"post":{"tags":["billing"],"summary":"Confirm Checkout","description":"Confirm a completed subscription checkout (webhook fallback).","operationId":"confirm_checkout_v1_billing_checkout__checkout_session_id__confirm_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"checkout_session_id","in":"path","required":true,"schema":{"type":"string","title":"Checkout Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/payment-method/setup":{"post":{"tags":["billing"],"summary":"Setup Payment Method","description":"Create a Stripe Checkout Session (setup mode) for adding a card.","operationId":"setup_payment_method_v1_billing_payment_method_setup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/payment-method/setup/{checkout_session_id}/confirm":{"post":{"tags":["billing"],"summary":"Confirm Payment Method Setup","description":"Finalize an add-card flow — set the new method as the default.","operationId":"confirm_payment_method_setup_v1_billing_payment_method_setup__checkout_session_id__confirm_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"checkout_session_id","in":"path","required":true,"schema":{"type":"string","title":"Checkout Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/change-plan":{"post":{"tags":["billing"],"summary":"Change Plan","description":"Upgrade or downgrade the subscription plan.","operationId":"change_plan_v1_billing_change_plan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePlanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/cancel":{"post":{"tags":["billing"],"summary":"Cancel Subscription","description":"Cancel the subscription at period end.","operationId":"cancel_subscription_v1_billing_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/resume":{"post":{"tags":["billing"],"summary":"Resume Subscription","description":"Undo a pending cancellation — keep the subscription active.","operationId":"resume_subscription_v1_billing_resume_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/enable-overage":{"post":{"tags":["billing"],"summary":"Enable Overage","description":"Enable bill-by-usage with a spending limit.","operationId":"enable_overage_v1_billing_enable_overage_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnableOverageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/disable-overage":{"post":{"tags":["billing"],"summary":"Disable Overage","description":"Disable bill-by-usage.","operationId":"disable_overage_v1_billing_disable_overage_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/billing/usage-history":{"get":{"tags":["billing"],"summary":"Get Usage History","description":"Get the user's API usage history.","operationId":"get_usage_history_v1_billing_usage_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events (no auth — verified by signature).","operationId":"stripe_webhook_v1_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/tts/sentences":{"post":{"tags":["tts"],"summary":"Tts Sentences","description":"Generate TTS chunk-by-chunk, streaming results as NDJSON.","operationId":"tts_sentences_v1_tts_sentences_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/sessions/{session_id}/video":{"post":{"tags":["video"],"summary":"Submit Video","description":"Accept a YouTube URL and kick off background processing (transcript + segmentation).","operationId":"submit_video_v1_sessions__session_id__video_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProcessRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["video"],"summary":"Get Video Source","description":"Get the video source metadata for a session.","operationId":"get_video_source_v1_sessions__session_id__video_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/VideoSourceResponse"},{"type":"null"}],"title":"Response Get Video Source V1 Sessions  Session Id  Video Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/video/segments":{"get":{"tags":["video"],"summary":"List Video Segments","description":"Get all video segments with their linked learning objectives.","operationId":"list_video_segments_v1_sessions__session_id__video_segments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoSegmentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sessions/{session_id}/video/segments/{segment_id}/quick-check":{"post":{"tags":["video"],"summary":"Quick Check Segment","description":"Lightweight comprehension check for a video segment.","operationId":"quick_check_segment_v1_sessions__session_id__video_segments__segment_id__quick_check_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","title":"Segment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoQuickCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoQuickCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AdvanceResponse":{"properties":{"session_completed":{"type":"boolean","title":"Session Completed"},"next_objective_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Objective Id"},"session_status":{"$ref":"#/components/schemas/SessionStatus"}},"type":"object","required":["session_completed","session_status"],"title":"AdvanceResponse"},"AnnotationBulkItem":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"page_number":{"type":"integer","title":"Page Number"},"type":{"type":"string","title":"Type"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"color":{"type":"string","title":"Color","default":"#FFEB3B"}},"type":"object","required":["page_number","type","data"],"title":"AnnotationBulkItem"},"AnnotationBulkRequest":{"properties":{"annotations":{"items":{"$ref":"#/components/schemas/AnnotationBulkItem"},"type":"array","title":"Annotations"}},"type":"object","required":["annotations"],"title":"AnnotationBulkRequest"},"AnnotationCreate":{"properties":{"page_number":{"type":"integer","title":"Page Number"},"type":{"type":"string","title":"Type"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"color":{"type":"string","title":"Color","default":"#FFEB3B"}},"type":"object","required":["page_number","type","data"],"title":"AnnotationCreate"},"AnnotationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"session_id":{"type":"string","format":"uuid","title":"Session Id"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"page_number":{"type":"integer","title":"Page Number"},"type":{"type":"string","title":"Type"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"color":{"type":"string","title":"Color"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","session_id","file_id","page_number","type","data","color","created_at","updated_at"],"title":"AnnotationResponse"},"AnnotationUpdate":{"properties":{"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"}},"type":"object","title":"AnnotationUpdate"},"AssessmentStatusResponse":{"properties":{"status":{"$ref":"#/components/schemas/AttemptStatus"},"has_assessment":{"type":"boolean","title":"Has Assessment"}},"type":"object","required":["status","has_assessment"],"title":"AssessmentStatusResponse"},"AttemptStatus":{"type":"string","enum":["started","capturing_input","editing","submitted","awaiting_followup","evaluating","evaluated","abandoned"],"title":"AttemptStatus"},"Body_answer_followup_audio_v1_teachback_attempts__attempt_id__followups_transcribe_post":{"properties":{"audio":{"type":"string","format":"binary","title":"Audio"},"whiteboard":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Whiteboard"}},"type":"object","required":["audio"],"title":"Body_answer_followup_audio_v1_teachback_attempts__attempt_id__followups_transcribe_post"},"Body_transcribe_audio_v1_teachback_attempts__attempt_id__transcribe_post":{"properties":{"audio":{"type":"string","format":"binary","title":"Audio"}},"type":"object","required":["audio"],"title":"Body_transcribe_audio_v1_teachback_attempts__attempt_id__transcribe_post"},"Body_transcribe_flashcard_audio_v1_sessions__session_id__flashcards_transcribe_post":{"properties":{"audio":{"type":"string","format":"binary","title":"Audio"}},"type":"object","required":["audio"],"title":"Body_transcribe_flashcard_audio_v1_sessions__session_id__flashcards_transcribe_post"},"Body_transcribe_free_response_audio_v1_sessions__session_id__free_response_transcribe_post":{"properties":{"audio":{"type":"string","format":"binary","title":"Audio"}},"type":"object","required":["audio"],"title":"Body_transcribe_free_response_audio_v1_sessions__session_id__free_response_transcribe_post"},"Body_transcribe_tutor_audio_v1_sessions__session_id__objectives__objective_id__tutor_transcribe_post":{"properties":{"audio":{"type":"string","format":"binary","title":"Audio"}},"type":"object","required":["audio"],"title":"Body_transcribe_tutor_audio_v1_sessions__session_id__objectives__objective_id__tutor_transcribe_post"},"ChangePlanRequest":{"properties":{"plan":{"type":"string","title":"Plan"}},"type":"object","required":["plan"],"title":"ChangePlanRequest"},"CheckoutResponse":{"properties":{"checkout_session_id":{"type":"string","title":"Checkout Session Id"},"client_secret":{"type":"string","title":"Client Secret"}},"type":"object","required":["checkout_session_id","client_secret"],"title":"CheckoutResponse"},"EnableOverageRequest":{"properties":{"limit_dollars":{"type":"number","title":"Limit Dollars"}},"type":"object","required":["limit_dollars"],"title":"EnableOverageRequest"},"FileInitRequest":{"properties":{"filename":{"type":"string","title":"Filename"},"mime_type":{"type":"string","title":"Mime Type"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["filename","mime_type","size_bytes"],"title":"FileInitRequest"},"FileInitResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"upload_url":{"type":"string","title":"Upload Url"}},"type":"object","required":["id","upload_url"],"title":"FileInitResponse"},"FilePreviewUrlResponse":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"type":"string","title":"Filename"},"preview_type":{"type":"string","title":"Preview Type"},"url":{"type":"string","title":"Url"},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count"}},"type":"object","required":["file_id","filename","preview_type","url"],"title":"FilePreviewUrlResponse"},"FileProcessingStatus":{"type":"string","enum":["pending","processing","completed","failed"],"title":"FileProcessingStatus"},"FileResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"session_id":{"type":"string","format":"uuid","title":"Session Id"},"filename":{"type":"string","title":"Filename"},"storage_path":{"type":"string","title":"Storage Path"},"mime_type":{"type":"string","title":"Mime Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count"},"processing_status":{"$ref":"#/components/schemas/FileProcessingStatus"},"preview_type":{"type":"string","title":"Preview Type","default":"none"},"preview_storage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Storage Path"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","session_id","filename","storage_path","mime_type","size_bytes","page_count","processing_status","created_at"],"title":"FileResponse"},"FlashcardConnectionGradeRequest":{"properties":{"card_a_id":{"type":"string","format":"uuid","title":"Card A Id"},"card_b_id":{"type":"string","format":"uuid","title":"Card B Id"},"explanation":{"type":"string","title":"Explanation"}},"type":"object","required":["card_a_id","card_b_id","explanation"],"title":"FlashcardConnectionGradeRequest","description":"Body for the two-card connection grader.\n\nThe client sends the two flashcard IDs the user selected from the grid\nplus a plain-text explanation of how they're related. The response is\na streaming SSE body rather than JSON — see the route docstring for\nthe event shape."},"FlashcardDeckResponse":{"properties":{"status":{"$ref":"#/components/schemas/GenerationStatus"},"cards":{"items":{"$ref":"#/components/schemas/FlashcardResponse"},"type":"array","title":"Cards","default":[]}},"type":"object","required":["status"],"title":"FlashcardDeckResponse"},"FlashcardGradeResponse":{"properties":{"correct":{"type":"boolean","title":"Correct"}},"type":"object","required":["correct"],"title":"FlashcardGradeResponse","description":"Result of grading a written flashcard answer — pass/fail only."},"FlashcardRecallStatus":{"type":"string","enum":["correct","incorrect"],"title":"FlashcardRecallStatus"},"FlashcardResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"session_id":{"type":"string","format":"uuid","title":"Session Id"},"front":{"type":"string","title":"Front"},"back":{"type":"string","title":"Back"},"order_index":{"type":"integer","title":"Order Index"},"is_starred":{"type":"boolean","title":"Is Starred","default":false},"last_status":{"anyOf":[{"$ref":"#/components/schemas/FlashcardRecallStatus"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","session_id","front","back","order_index","created_at"],"title":"FlashcardResponse"},"FlashcardSaveItem":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"front":{"type":"string","title":"Front"},"back":{"type":"string","title":"Back"}},"type":"object","required":["front","back"],"title":"FlashcardSaveItem","description":"A single card in a bulk-save payload.\n\n``id`` is ``None`` for newly-added cards (the server assigns one) and is\nthe existing UUID for cards that already exist in the deck. ``order_index``\nis implicit — the server uses the position of each item in the list."},"FlashcardSaveRequest":{"properties":{"cards":{"items":{"$ref":"#/components/schemas/FlashcardSaveItem"},"type":"array","title":"Cards"}},"type":"object","required":["cards"],"title":"FlashcardSaveRequest"},"FlashcardTextGradeRequest":{"properties":{"answer":{"type":"string","title":"Answer"}},"type":"object","required":["answer"],"title":"FlashcardTextGradeRequest","description":"Body for the text-answer grading endpoint.\n\nThe ``answer`` may have been typed, transcribed from a prior voice\nrecording, or both. The server just treats it as plain text."},"FlashcardTranscribeResponse":{"properties":{"transcript":{"type":"string","title":"Transcript"}},"type":"object","required":["transcript"],"title":"FlashcardTranscribeResponse","description":"Raw transcript of a spoken flashcard answer — grading happens later.\n\nActive recall mirrors teach-back: the user records, we transcribe, the\ntranscript lands in the answer box for the user to review/edit, and\nonly then does the user submit the (possibly edited) text to the\ngrading model."},"FlashcardUpdateRequest":{"properties":{"is_starred":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Starred"},"last_status":{"anyOf":[{"$ref":"#/components/schemas/FlashcardRecallStatus"},{"type":"null"}]},"clear_last_status":{"type":"boolean","title":"Clear Last Status","default":false},"front":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Front"},"back":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Back"}},"type":"object","title":"FlashcardUpdateRequest"},"FollowupRequest":{"properties":{"content":{"type":"string","title":"Content"},"whiteboard_image_b64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whiteboard Image B64"}},"type":"object","required":["content"],"title":"FollowupRequest"},"FollowupResponse":{"properties":{"attempt":{"$ref":"#/components/schemas/TeachbackAttemptDetailResponse"},"action":{"type":"string","title":"Action"},"assessment":{"anyOf":[{"$ref":"#/components/schemas/ObjectiveAssessmentResponse"},{"type":"null"}]}},"type":"object","required":["attempt","action"],"title":"FollowupResponse"},"FreeResponseAnswerRequest":{"properties":{"transcript":{"type":"string","title":"Transcript"},"whiteboard_image_b64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whiteboard Image B64"}},"type":"object","required":["transcript"],"title":"FreeResponseAnswerRequest","description":"Body for ``POST /free-response/{question_id}/answer``.\n\n``whiteboard_image_b64`` is the bare base64 payload of the PNG\nsnapshot (no ``data:image/png;base64,`` prefix). The grader handles\nthe prefix wrapping itself when constructing the vision multipart\nmessage."},"FreeResponseGenerateRequest":{"properties":{"regeneration_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regeneration Prompt"}},"type":"object","title":"FreeResponseGenerateRequest","description":"Optional body for the FR ``/generate`` endpoint.\n\nMirrors ``MultipleChoiceGenerateRequest``. An optional\n``regeneration_prompt`` is forwarded to the generation agent for\nthis run only."},"FreeResponseGradeResponse":{"properties":{"correct":{"type":"boolean","title":"Correct"},"feedback":{"type":"string","title":"Feedback"},"covered_points":{"items":{"type":"string"},"type":"array","title":"Covered Points","default":[]},"missed_points":{"items":{"type":"string"},"type":"array","title":"Missed Points","default":[]},"objective_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Objective Ids","default":[]}},"type":"object","required":["correct","feedback"],"title":"FreeResponseGradeResponse","description":"Ephemeral grade result — not persisted.\n\n``objective_ids`` is returned alongside the grade so the deck can\nrender the post-answer ``<ObjectiveRow>`` CTAs without a second\nround-trip."},"FreeResponseListResponse":{"properties":{"status":{"$ref":"#/components/schemas/GenerationStatus"},"questions":{"items":{"$ref":"#/components/schemas/FreeResponseQuestionResponse"},"type":"array","title":"Questions","default":[]}},"type":"object","required":["status"],"title":"FreeResponseListResponse","description":"Session-level FR bank with generation lifecycle status."},"FreeResponseQuestionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"question":{"type":"string","title":"Question"},"answer_outline":{"type":"string","title":"Answer Outline"},"calculation_steps":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Steps"},"order_index":{"type":"integer","title":"Order Index"},"objective_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Objective Ids","default":[]}},"type":"object","required":["id","question","answer_outline","order_index"],"title":"FreeResponseQuestionResponse","description":"A single free-response question with its grading rubric attached.\n\n``answer_outline`` and ``calculation_steps`` ship to the client\nbecause the deck needs them to render the covered/missed breakdown\nin the grade panel. Same trust posture as flashcards shipping\n``back`` — the deck is trusted not to leak them pre-submit."},"FreeResponseTranscribeResponse":{"properties":{"transcript":{"type":"string","title":"Transcript"}},"type":"object","required":["transcript"],"title":"FreeResponseTranscribeResponse","description":"Raw transcript of a spoken free-response answer."},"GenerationStatus":{"type":"string","enum":["not_selected","pending","generating","ready","failed"],"title":"GenerationStatus","description":"Lifecycle for a per-type artifact generated from a session's materials.\n\n``not_selected`` means the user opted out of generating this artifact on\nthe options screen — the cell still renders on the objectives page so\nthe user can opt in later, but no worker will touch it until they do."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MasteryBand":{"type":"string","enum":["unknown","needs_review","developing","strong","mastered"],"title":"MasteryBand"},"MultipleChoiceChoiceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"label":{"type":"string","title":"Label"},"choice_text":{"type":"string","title":"Choice Text"},"is_correct":{"type":"boolean","title":"Is Correct"},"explanation":{"type":"string","title":"Explanation"},"order_index":{"type":"integer","title":"Order Index"}},"type":"object","required":["id","label","choice_text","is_correct","explanation","order_index"],"title":"MultipleChoiceChoiceResponse","description":"A single A/B/C/D choice for an MCQ.\n\n``is_correct`` and ``explanation`` ship to the client because MCQ\ngrading is entirely client-side — the server is not involved in\nscoring an attempt."},"MultipleChoiceGenerateRequest":{"properties":{"regeneration_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regeneration Prompt"}},"type":"object","title":"MultipleChoiceGenerateRequest","description":"Optional body for the MCQ ``/generate`` endpoint.\n\n``regeneration_prompt`` is a short free-text nudge the user can\nattach when they click \"Regenerate\" — e.g. \"Focus more on the\nsecond chapter\" or \"Make the distractors harder\". It is forwarded\nto the generation agent as additional guidance for this run only;\nthe session's base ``prompt`` is still honoured."},"MultipleChoiceListResponse":{"properties":{"status":{"$ref":"#/components/schemas/GenerationStatus"},"questions":{"items":{"$ref":"#/components/schemas/MultipleChoiceQuestionResponse"},"type":"array","title":"Questions","default":[]}},"type":"object","required":["status"],"title":"MultipleChoiceListResponse","description":"Session-level MCQ bank with generation lifecycle status."},"MultipleChoiceQuestionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"question":{"type":"string","title":"Question"},"order_index":{"type":"integer","title":"Order Index"},"choices":{"items":{"$ref":"#/components/schemas/MultipleChoiceChoiceResponse"},"type":"array","title":"Choices","default":[]},"objective_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Objective Ids","default":[]}},"type":"object","required":["id","question","order_index"],"title":"MultipleChoiceQuestionResponse"},"ObjectiveAssessmentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"attempt_id":{"type":"string","format":"uuid","title":"Attempt Id"},"objective_id":{"type":"string","format":"uuid","title":"Objective Id"},"accuracy_score":{"type":"integer","title":"Accuracy Score"},"completeness_score":{"type":"integer","title":"Completeness Score"},"clarity_score":{"type":"integer","title":"Clarity Score"},"depth_score":{"type":"integer","title":"Depth Score"},"total_score":{"type":"integer","title":"Total Score"},"mastery_band":{"$ref":"#/components/schemas/MasteryBand"},"accuracy_justification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accuracy Justification"},"completeness_justification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completeness Justification"},"clarity_justification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clarity Justification"},"depth_justification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Depth Justification"},"strengths":{"items":{"type":"string"},"type":"array","title":"Strengths","default":[]},"missed_concepts":{"items":{"type":"string"},"type":"array","title":"Missed Concepts","default":[]},"inaccuracies":{"items":{"type":"string"},"type":"array","title":"Inaccuracies","default":[]},"ideal_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ideal Answer"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","attempt_id","objective_id","accuracy_score","completeness_score","clarity_score","depth_score","total_score","mastery_band","created_at"],"title":"ObjectiveAssessmentResponse"},"ObjectiveContextResponse":{"properties":{"objective_id":{"type":"string","format":"uuid","title":"Objective Id"},"chunks":{"items":{"$ref":"#/components/schemas/SourceChunkResponse"},"type":"array","title":"Chunks","default":[]}},"type":"object","required":["objective_id"],"title":"ObjectiveContextResponse"},"ObjectiveListResponse":{"properties":{"objectives":{"items":{"$ref":"#/components/schemas/ObjectiveResponse"},"type":"array","title":"Objectives"},"scope_estimate":{"$ref":"#/components/schemas/ScopeEstimate"}},"type":"object","required":["objectives","scope_estimate"],"title":"ObjectiveListResponse"},"ObjectiveResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"session_id":{"type":"string","format":"uuid","title":"Session Id"},"title":{"type":"string","title":"Title"},"order_index":{"type":"integer","title":"Order Index"},"workflow_status":{"$ref":"#/components/schemas/ObjectiveWorkflowStatus"},"mastery_status":{"type":"string","title":"Mastery Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","session_id","title","order_index","workflow_status","mastery_status","created_at","updated_at"],"title":"ObjectiveResponse"},"ObjectiveTransitionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workflow_status":{"$ref":"#/components/schemas/ObjectiveWorkflowStatus"},"mastery_status":{"type":"string","title":"Mastery Status"},"session_status":{"anyOf":[{"$ref":"#/components/schemas/SessionStatus"},{"type":"null"}]}},"type":"object","required":["id","workflow_status","mastery_status"],"title":"ObjectiveTransitionResponse"},"ObjectiveUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"}},"type":"object","title":"ObjectiveUpdateRequest"},"ObjectiveWorkflowStatus":{"type":"string","enum":["not_started","reviewing","ready_for_recall","attempt_in_progress","awaiting_followup","evaluating","completed","skipped"],"title":"ObjectiveWorkflowStatus"},"ProcessingStartRequest":{"properties":{"generation_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Generation Types"}},"type":"object","title":"ProcessingStartRequest","description":"Body for ``POST /sessions/{id}/process(/stream)``.\n\n``generation_types`` is the list of per-type artifacts the user opted\ninto on the options screen (e.g. ``[\"flashcards\", \"multiple_choice\"]``).\nOmitting the body is equivalent to legacy behavior — flashcards only."},"ProcessingStatusResponse":{"properties":{"status":{"$ref":"#/components/schemas/SessionStatus"},"objectives_count":{"type":"integer","title":"Objectives Count","default":0},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["status"],"title":"ProcessingStatusResponse"},"ReadingParagraphListResponse":{"properties":{"paragraphs":{"items":{"$ref":"#/components/schemas/ReadingParagraphResponse"},"type":"array","title":"Paragraphs"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["paragraphs","total_count"],"title":"ReadingParagraphListResponse"},"ReadingParagraphResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"session_id":{"type":"string","format":"uuid","title":"Session Id"},"source_file_id":{"type":"string","format":"uuid","title":"Source File Id"},"page_number":{"type":"integer","title":"Page Number"},"paragraph_order":{"type":"integer","title":"Paragraph Order"},"content":{"type":"string","title":"Content"},"bbox":{"items":{"type":"number"},"type":"array","title":"Bbox"},"bbox_normalized":{"items":{"type":"number"},"type":"array","title":"Bbox Normalized"},"is_heading":{"type":"boolean","title":"Is Heading"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","session_id","source_file_id","page_number","paragraph_order","content","bbox","bbox_normalized","is_heading","created_at"],"title":"ReadingParagraphResponse"},"ReadingSummaryItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"summary_text":{"type":"string","title":"Summary Text"},"paragraph_id":{"type":"string","format":"uuid","title":"Paragraph Id"},"page_number":{"type":"integer","title":"Page Number"},"paragraph_order":{"type":"integer","title":"Paragraph Order","default":0},"bbox_normalized":{"items":{"type":"number"},"type":"array","title":"Bbox Normalized"},"paragraph_content":{"type":"string","title":"Paragraph Content"}},"type":"object","required":["id","summary_text","paragraph_id","page_number","bbox_normalized","paragraph_content"],"title":"ReadingSummaryItemResponse"},"ReadingSummaryResponse":{"properties":{"run":{"anyOf":[{"$ref":"#/components/schemas/ReadingSummaryRunResponse"},{"type":"null"}]},"items":{"items":{"$ref":"#/components/schemas/ReadingSummaryItemResponse"},"type":"array","title":"Items","default":[]}},"type":"object","title":"ReadingSummaryResponse"},"ReadingSummaryRunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"session_id":{"type":"string","format":"uuid","title":"Session Id"},"status":{"type":"string","title":"Status"},"model":{"type":"string","title":"Model"},"section_count":{"type":"integer","title":"Section Count"},"completed_sections":{"type":"integer","title":"Completed Sections"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","session_id","status","model","section_count","completed_sections","created_at","updated_at"],"title":"ReadingSummaryRunResponse"},"ScopeEstimate":{"properties":{"total_objectives":{"type":"integer","title":"Total Objectives"},"estimated_hours_min":{"type":"number","title":"Estimated Hours Min"},"estimated_hours_max":{"type":"number","title":"Estimated Hours Max"}},"type":"object","required":["total_objectives","estimated_hours_min","estimated_hours_max"],"title":"ScopeEstimate"},"SessionCreate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"session_type":{"$ref":"#/components/schemas/SessionType","default":"study"}},"type":"object","title":"SessionCreate"},"SessionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"session_type":{"$ref":"#/components/schemas/SessionType","default":"study"},"status":{"$ref":"#/components/schemas/SessionStatus"},"is_sample":{"type":"boolean","title":"Is Sample","default":false},"source_file_count":{"type":"integer","title":"Source File Count","default":0},"objectives_total":{"type":"integer","title":"Objectives Total","default":0},"objectives_completed":{"type":"integer","title":"Objectives Completed","default":0},"flashcards_status":{"$ref":"#/components/schemas/GenerationStatus","default":"not_selected"},"multiple_choice_status":{"$ref":"#/components/schemas/GenerationStatus","default":"not_selected"},"free_response_status":{"$ref":"#/components/schemas/GenerationStatus","default":"not_selected"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","title","prompt","status","created_at","updated_at"],"title":"SessionResponse"},"SessionStatus":{"type":"string","enum":["draft","processing","ready","in_progress","completed","failed","archived"],"title":"SessionStatus"},"SessionType":{"type":"string","enum":["study","reading","video"],"title":"SessionType"},"SessionUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"session_type":{"anyOf":[{"$ref":"#/components/schemas/SessionType"},{"type":"null"}]}},"type":"object","title":"SessionUpdate"},"SourceChunkResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"content":{"type":"string","title":"Content"},"page_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Number"},"chunk_order":{"type":"integer","title":"Chunk Order"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}},"relevance_score":{"type":"number","title":"Relevance Score","default":1.0},"source_filename":{"type":"string","title":"Source Filename","default":""}},"type":"object","required":["id","content","chunk_order"],"title":"SourceChunkResponse"},"SourceCitation":{"properties":{"type":{"type":"string","title":"Type"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"chunk_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chunk Id"},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snippet"}},"type":"object","required":["type"],"title":"SourceCitation"},"SubscribeRequest":{"properties":{"plan":{"type":"string","title":"Plan"}},"type":"object","required":["plan"],"title":"SubscribeRequest"},"SubscriptionResponse":{"properties":{"plan":{"type":"string","title":"Plan"},"plan_price":{"type":"number","title":"Plan Price"},"usage_cap":{"type":"number","title":"Usage Cap"},"current_usage":{"type":"number","title":"Current Usage"},"remaining":{"type":"number","title":"Remaining"},"period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period End"},"bill_by_usage_enabled":{"type":"boolean","title":"Bill By Usage Enabled","default":false},"bill_by_usage_limit":{"type":"number","title":"Bill By Usage Limit","default":0},"bill_by_usage_used":{"type":"number","title":"Bill By Usage Used","default":0},"overage_markup":{"type":"number","title":"Overage Markup","default":1.1},"can_upgrade":{"type":"boolean","title":"Can Upgrade","default":false},"upgrade_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upgrade To"},"can_bill_by_usage":{"type":"boolean","title":"Can Bill By Usage","default":false},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false},"subscription_status":{"type":"string","title":"Subscription Status","default":"active"}},"type":"object","required":["plan","plan_price","usage_cap","current_usage","remaining"],"title":"SubscriptionResponse"},"TTSRequest":{"properties":{"text":{"type":"string","title":"Text"},"start_chunk_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Chunk Index"},"raw_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Text"}},"type":"object","required":["text"],"title":"TTSRequest"},"TeachbackAttemptDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"objective_id":{"type":"string","format":"uuid","title":"Objective Id"},"status":{"$ref":"#/components/schemas/AttemptStatus"},"transcript":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript"},"audio_storage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Storage Path"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"turns":{"items":{"$ref":"#/components/schemas/TeachbackTurnResponse"},"type":"array","title":"Turns","default":[]}},"type":"object","required":["id","objective_id","status","created_at","updated_at"],"title":"TeachbackAttemptDetailResponse"},"TeachbackAttemptResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"objective_id":{"type":"string","format":"uuid","title":"Objective Id"},"status":{"$ref":"#/components/schemas/AttemptStatus"},"transcript":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript"},"audio_storage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Storage Path"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","objective_id","status","created_at","updated_at"],"title":"TeachbackAttemptResponse"},"TeachbackEvaluateBody":{"properties":{"whiteboard_image_b64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whiteboard Image B64"}},"type":"object","title":"TeachbackEvaluateBody","description":"Optional body for POST /teachback-attempts/{id}/evaluate(/stream)."},"TeachbackSubmitBody":{"properties":{"whiteboard_image_b64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whiteboard Image B64"}},"type":"object","title":"TeachbackSubmitBody","description":"Optional body for POST /teachback-attempts/{id}/submit.\n\nThe endpoint has historically been body-less; this schema adds a single\noptional field for the whiteboard snapshot so voice-only attempts can\nalso ship their drawing along with the initial transcript."},"TeachbackTextSubmit":{"properties":{"content":{"type":"string","title":"Content"},"whiteboard_image_b64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whiteboard Image B64"}},"type":"object","required":["content"],"title":"TeachbackTextSubmit"},"TeachbackTranscriptEdit":{"properties":{"transcript":{"type":"string","title":"Transcript"}},"type":"object","required":["transcript"],"title":"TeachbackTranscriptEdit"},"TeachbackTurnResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"attempt_id":{"type":"string","format":"uuid","title":"Attempt Id"},"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"turn_order":{"type":"integer","title":"Turn Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","attempt_id","role","content","turn_order","created_at"],"title":"TeachbackTurnResponse"},"TutorMessageRequest":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"TutorMessageRequest"},"TutorMessageResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"thread_id":{"type":"string","format":"uuid","title":"Thread Id"},"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"sources_cited":{"items":{"$ref":"#/components/schemas/SourceCitation"},"type":"array","title":"Sources Cited","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","thread_id","role","content","created_at"],"title":"TutorMessageResponse"},"TutorThreadResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"objective_id":{"type":"string","format":"uuid","title":"Objective Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"messages":{"items":{"$ref":"#/components/schemas/TutorMessageResponse"},"type":"array","title":"Messages","default":[]}},"type":"object","required":["id","objective_id","created_at"],"title":"TutorThreadResponse"},"TutorTranscribeResponse":{"properties":{"transcript":{"type":"string","title":"Transcript"}},"type":"object","required":["transcript"],"title":"TutorTranscribeResponse","description":"Raw transcript of a spoken question for the Review-screen tutor.\n\nMirrors the flashcards / teach-back transcribe flow: the browser\nrecords audio, posts the blob to ``/transcribe``, and the resulting\ntext lands in the chat composer for the user to review/edit before\nhitting Send."},"UsageHistoryResponse":{"properties":{"records":{"items":{"$ref":"#/components/schemas/UsageRecordResponse"},"type":"array","title":"Records"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["records","total_count"],"title":"UsageHistoryResponse"},"UsageRecordResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"action_type":{"type":"string","title":"Action Type"},"provider":{"type":"string","title":"Provider"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"cost_dollars":{"type":"number","title":"Cost Dollars"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}},"session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Session Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","action_type","provider","cost_dollars","created_at"],"title":"UsageRecordResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VideoProcessRequest":{"properties":{"youtube_url":{"type":"string","title":"Youtube Url"}},"type":"object","required":["youtube_url"],"title":"VideoProcessRequest"},"VideoQuickCheckRequest":{"properties":{"explanation":{"type":"string","title":"Explanation"}},"type":"object","required":["explanation"],"title":"VideoQuickCheckRequest"},"VideoQuickCheckResponse":{"properties":{"satisfactory":{"type":"boolean","title":"Satisfactory"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"}},"type":"object","required":["satisfactory"],"title":"VideoQuickCheckResponse"},"VideoSegmentListResponse":{"properties":{"segments":{"items":{"$ref":"#/components/schemas/VideoSegmentResponse"},"type":"array","title":"Segments"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["segments","total_count"],"title":"VideoSegmentListResponse"},"VideoSegmentObjectiveResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"workflow_status":{"type":"string","title":"Workflow Status"},"mastery_status":{"type":"string","title":"Mastery Status"}},"type":"object","required":["id","title","workflow_status","mastery_status"],"title":"VideoSegmentObjectiveResponse"},"VideoSegmentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"session_id":{"type":"string","format":"uuid","title":"Session Id"},"video_source_id":{"type":"string","format":"uuid","title":"Video Source Id"},"learning_objective_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Learning Objective Id"},"learning_objective":{"anyOf":[{"$ref":"#/components/schemas/VideoSegmentObjectiveResponse"},{"type":"null"}]},"segment_order":{"type":"integer","title":"Segment Order"},"start_time_seconds":{"type":"number","title":"Start Time Seconds"},"end_time_seconds":{"type":"number","title":"End Time Seconds"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"transcript_excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript Excerpt"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","session_id","video_source_id","segment_order","start_time_seconds","end_time_seconds","created_at"],"title":"VideoSegmentResponse"},"VideoSourceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"session_id":{"type":"string","format":"uuid","title":"Session Id"},"youtube_url":{"type":"string","title":"Youtube Url"},"youtube_video_id":{"type":"string","title":"Youtube Video Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"channel_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Name"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"processing_status":{"type":"string","title":"Processing Status"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","session_id","youtube_url","youtube_video_id","processing_status","created_at","updated_at"],"title":"VideoSourceResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}