{"openapi":"3.1.0","info":{"title":"NoteSight API","description":"Backend API for NoteSight: Sheet music recognition, transcription, and MusicXML generation","version":"0.1.0"},"paths":{"/api/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_api_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Register Api Register Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/token":{"post":{"tags":["auth"],"summary":"Login For Access Token","operationId":"login_for_access_token_api_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_for_access_token_api_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Revoke the current access token and invalidate user session.","operationId":"logout_api_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/refresh-token":{"post":{"tags":["auth"],"summary":"Refresh Access Token","description":"Exchange a valid refresh token for a fresh access token with Refresh Token Rotation (RTR).","operationId":"refresh_access_token_api_refresh_token_post","parameters":[{"name":"refresh_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Deprecated query param; prefer JSON body","title":"Refresh Token"},"description":"Deprecated query param; prefer JSON body"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshTokenRequest"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/request-verification":{"post":{"tags":["auth"],"summary":"Request Email Verification","description":"Send an account verification email link. Can be requested authenticated or by email.","operationId":"request_email_verification_api_request_verification_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RequestVerificationRequest"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/request-verification":{"post":{"tags":["auth"],"summary":"Request Email Verification","description":"Send an account verification email link. Can be requested authenticated or by email.","operationId":"request_email_verification_api_auth_request_verification_post","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RequestVerificationRequest"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/verify-email":{"post":{"tags":["auth"],"summary":"Verify Email","description":"Validate a cryptographic verification token and mark account as verified.","operationId":"verify_email_api_auth_verify_email_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["auth"],"summary":"Verify Email Link","description":"Direct browser GET link from verification emails redirecting to frontend.","operationId":"verify_email_link_api_auth_verify_email_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","description":"Email verification token","title":"Token"},"description":"Email verification token"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Generate expiring, single-use password reset token and send email link.","operationId":"forgot_password_api_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Reset user password using valid cryptographic token and revoke existing sessions.","operationId":"reset_password_api_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google/url":{"get":{"tags":["auth"],"summary":"Get Google Auth Url","description":"Generate and return Google OAuth consent URL with CSRF state token.","operationId":"get_google_auth_url_api_auth_google_url_get","parameters":[{"name":"redirect_uri","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional custom callback URI","title":"Redirect Uri"},"description":"Optional custom callback URI"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google/login":{"get":{"tags":["auth"],"summary":"Google Login Redirect","description":"Direct 307 redirect to Google's OAuth 2.0 authorization screen.","operationId":"google_login_redirect_api_auth_google_login_get","parameters":[{"name":"redirect_uri","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google/callback":{"post":{"tags":["auth"],"summary":"Google Callback Post","description":"Exchange authorization code for NoteSight session tokens via API.","operationId":"google_callback_post_api_auth_google_callback_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthGoogleCallbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["auth"],"summary":"Google Callback Get","description":"Direct browser GET callback from Google redirecting to frontend with session tokens.","operationId":"google_callback_get_api_auth_google_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","description":"Google OAuth authorization code","title":"Code"},"description":"Google OAuth authorization code"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"OAuth state nonce","title":"State"},"description":"OAuth state nonce"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/2fa/setup":{"post":{"tags":["auth"],"summary":"Setup Two Factor Auth","description":"Generate a new uncommitted TOTP secret, backup codes, and QR code URI.","operationId":"setup_two_factor_auth_api_2fa_setup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpSetupResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/auth/2fa/setup":{"post":{"tags":["auth"],"summary":"Setup Two Factor Auth","description":"Generate a new uncommitted TOTP secret, backup codes, and QR code URI.","operationId":"setup_two_factor_auth_api_auth_2fa_setup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpSetupResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/2fa/verify":{"post":{"tags":["auth"],"summary":"Verify And Enable Two Factor Auth","description":"Confirm a 6-digit TOTP code and activate Two-Factor Authentication.","operationId":"verify_and_enable_two_factor_auth_api_2fa_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/auth/2fa/verify":{"post":{"tags":["auth"],"summary":"Verify And Enable Two Factor Auth","description":"Confirm a 6-digit TOTP code and activate Two-Factor Authentication.","operationId":"verify_and_enable_two_factor_auth_api_auth_2fa_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/2fa/disable":{"post":{"tags":["auth"],"summary":"Disable Two Factor Auth","description":"Disable Two-Factor Authentication after verifying the user's password or current TOTP code.","operationId":"disable_two_factor_auth_api_2fa_disable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpDisableRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/auth/2fa/disable":{"post":{"tags":["auth"],"summary":"Disable Two Factor Auth","description":"Disable Two-Factor Authentication after verifying the user's password or current TOTP code.","operationId":"disable_two_factor_auth_api_auth_2fa_disable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpDisableRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/2fa/login":{"post":{"tags":["auth"],"summary":"Login With Two Factor Auth","description":"Complete login using a temporary 2FA token and either a 6-digit TOTP or an 8-character backup recovery code.","operationId":"login_with_two_factor_auth_api_2fa_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/2fa/login":{"post":{"tags":["auth"],"summary":"Login With Two Factor Auth","description":"Complete login using a temporary 2FA token and either a 6-digit TOTP or an 8-character backup recovery code.","operationId":"login_with_two_factor_auth_api_auth_2fa_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/legal/terms":{"get":{"tags":["users"],"summary":"Get Legal Terms","description":"Retrieve current NoteSight Terms of Service, Acceptable Use, and Sheet Music Copyright Policy.","operationId":"get_legal_terms_api_legal_terms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalTermsResponse"}}}}}}},"/api/user/profile":{"get":{"tags":["users"],"summary":"Get User Profile","description":"Retrieve full user profile details, legal acceptance record, and optional billing summary.","operationId":"get_user_profile_api_user_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"patch":{"tags":["users"],"summary":"Update User Profile","description":"Update user personal and musical profile settings.","operationId":"update_user_profile_api_user_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/user/change-password":{"post":{"tags":["users"],"summary":"Change Password","description":"Securely update the authenticated user's password.","operationId":"change_password_api_user_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/user/account":{"delete":{"tags":["users"],"summary":"Delete User Account","description":"Permanently delete the user's account and all associated score files and records (GDPR Right to Erasure).\nRequires current password verification for password accounts; OAuth users verify via active session.","operationId":"delete_user_account_api_user_account_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/user/quota":{"get":{"tags":["users"],"summary":"Get Current User Quota","description":"Retrieve current subscription tier, storage quota usage, page allowances, and catalog of plans.","operationId":"get_current_user_quota_api_user_quota_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserQuotaResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/user/tier":{"post":{"tags":["users"],"summary":"Update User Tier","description":"Update user subscription tier (self-service downgrade to starter, or upgrade in mock mode).","operationId":"update_user_tier_api_user_tier_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTierRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserQuotaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"patch":{"tags":["users"],"summary":"Update User Tier","description":"Update user subscription tier (self-service downgrade to starter, or upgrade in mock mode).","operationId":"update_user_tier_api_user_tier_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTierRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserQuotaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/jobs/upload":{"post":{"tags":["scores"],"summary":"Upload Score","description":"Accept an uploaded score (PDF/image) and queue it as a pending OMR job, with instant deduplication caching.","operationId":"upload_score_api_jobs_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_score_api_jobs_upload_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/upload":{"post":{"tags":["scores"],"summary":"Upload Score","description":"Accept an uploaded score (PDF/image) and queue it as a pending OMR job, with instant deduplication caching.","operationId":"upload_score_api_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_score_api_upload_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/jobs/create":{"post":{"tags":["scores"],"summary":"Create Custom Score","description":"Create a new score from scratch and save directly into the user's library.","operationId":"create_custom_score_api_jobs_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/jobs":{"get":{"tags":["scores"],"summary":"List User Jobs","description":"Retrieve all recognition jobs for the current authenticated user, ordered newest first.","operationId":"list_user_jobs_api_jobs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/JobResponse"},"type":"array","title":"Response List User Jobs Api Jobs Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/jobs/{job_id}":{"get":{"tags":["scores"],"summary":"Get Job Status","description":"Retrieve the current processing state and details of a job by ID.","operationId":"get_job_status_api_jobs__job_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["scores"],"summary":"Update Job Score","description":"Update an existing completed job's MusicXML score with user edits and invalidate cached exports.","operationId":"update_job_score_api_jobs__job_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["scores"],"summary":"Delete Job","description":"Delete a recognition job and its associated files from disk.","operationId":"delete_job_api_jobs__job_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/retry":{"post":{"tags":["scores"],"summary":"Retry Failed Job","description":"Retry a failed recognition job using the preserved uploaded file.","operationId":"retry_failed_job_api_jobs__job_id__retry_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/stream":{"get":{"tags":["scores"],"summary":"Stream Job Events","description":"Stream real-time job lifecycle events via Server-Sent Events (SSE). Non-blocking async implementation.","operationId":"stream_job_events_api_jobs__job_id__stream_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/validation":{"get":{"tags":["scores"],"summary":"Get Job Rhythm Validation","description":"Validate measure rhythms and return detection confidence report for a completed job.","operationId":"get_job_rhythm_validation_api_jobs__job_id__validation_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/original":{"get":{"tags":["scores"],"summary":"Get Job Original File","description":"Retrieve the original uploaded sheet music document (PDF or image) for side-by-side review.","operationId":"get_job_original_file_api_jobs__job_id__original_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scores/export/{job_id}/musicxml":{"get":{"tags":["exports"],"summary":"Download Musicxml","description":"Download the finalized MusicXML file for a completed job.","operationId":"download_musicxml_api_scores_export__job_id__musicxml_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/download":{"get":{"tags":["exports"],"summary":"Download Musicxml","description":"Download the finalized MusicXML file for a completed job.","operationId":"download_musicxml_api_jobs__job_id__download_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scores/export/{job_id}/pdf":{"get":{"tags":["exports"],"summary":"Export Job Pdf","description":"Export the recognized score as a printable multi-page PDF.","operationId":"export_job_pdf_api_scores_export__job_id__pdf_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/export/pdf":{"get":{"tags":["exports"],"summary":"Export Job Pdf","description":"Export the recognized score as a printable multi-page PDF.","operationId":"export_job_pdf_api_jobs__job_id__export_pdf_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/convert/xml-to-pdf":{"post":{"tags":["exports"],"summary":"Convert Xml To Pdf","description":"Directly convert an uploaded MusicXML file into a PDF (useful for batch testing).","operationId":"convert_xml_to_pdf_api_convert_xml_to_pdf_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_convert_xml_to_pdf_api_convert_xml_to_pdf_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scores/export/{job_id}/midi":{"get":{"tags":["exports"],"summary":"Export Job Midi","description":"Export the recognized score as a downloadable Standard MIDI File (.mid).","operationId":"export_job_midi_api_scores_export__job_id__midi_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/export/midi":{"get":{"tags":["exports"],"summary":"Export Job Midi","description":"Export the recognized score as a downloadable Standard MIDI File (.mid).","operationId":"export_job_midi_api_jobs__job_id__export_midi_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/convert/xml-to-midi":{"post":{"tags":["exports"],"summary":"Convert Xml To Midi","description":"Directly convert an uploaded MusicXML file into a Standard MIDI File (.mid).","operationId":"convert_xml_to_midi_api_convert_xml_to_midi_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_convert_xml_to_midi_api_convert_xml_to_midi_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/share":{"post":{"tags":["collaboration"],"summary":"Create Or Update Score Share","description":"Create or update a public share link for a user's score job.","operationId":"create_or_update_score_share_api_jobs__job_id__share_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreShareCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreShareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["collaboration"],"summary":"Get Score Share","description":"Retrieve active share link settings for a user's score job.","operationId":"get_score_share_api_jobs__job_id__share_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreShareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["collaboration"],"summary":"Revoke Score Share","description":"Revoke public share link for a score.","operationId":"revoke_score_share_api_jobs__job_id__share_delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Revoke Score Share Api Jobs  Job Id  Share Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scores/share/{token}":{"get":{"tags":["collaboration"],"summary":"Get Public Shared Score","description":"Public endpoint: Retrieve a shared score's metadata and MusicXML content.","operationId":"get_public_shared_score_api_scores_share__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicSharedScoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/scores/share/{token}/fork":{"post":{"tags":["collaboration"],"summary":"Fork Shared Score","description":"Fork/clone a publicly shared score into the authenticated user's library.","operationId":"fork_shared_score_api_scores_share__token__fork_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreForkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/annotations":{"get":{"tags":["collaboration"],"summary":"Get Job Annotations","description":"Retrieve annotations for a score. Accessible to owner or via active share token.","operationId":"get_job_annotations_api_jobs__job_id__annotations_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"share_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScoreAnnotationResponse"},"title":"Response Get Job Annotations Api Jobs  Job Id  Annotations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["collaboration"],"summary":"Create Score Annotation","description":"Create a new annotation on a measure. Requires score ownership or active share access.","operationId":"create_score_annotation_api_jobs__job_id__annotations_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"share_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAnnotationCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/annotations/{annotation_id}":{"patch":{"tags":["collaboration"],"summary":"Update Score Annotation","description":"Update content, color, or resolved status of an annotation. Requires score owner or author permissions.","operationId":"update_score_annotation_api_jobs__job_id__annotations__annotation_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","title":"Annotation Id"}},{"name":"share_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAnnotationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreAnnotationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["collaboration"],"summary":"Delete Score Annotation","description":"Delete an annotation. Strictly requires score owner or annotation author permissions.","operationId":"delete_score_annotation_api_jobs__job_id__annotations__annotation_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"annotation_id","in":"path","required":true,"schema":{"type":"string","title":"Annotation Id"}},{"name":"share_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Score Annotation Api Jobs  Job Id  Annotations  Annotation Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/training/quality-report":{"get":{"tags":["training"],"summary":"Get Omr Quality Report","description":"Retrieve aggregate conversion quality and active learning telemetry statistics (scoped to user).","operationId":"get_omr_quality_report_api_training_quality_report_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OMRQualityReportResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/training/triplets":{"get":{"tags":["training"],"summary":"Get Training Triplets","description":"List captured training triplets for active learning inspection (scoped to user).","operationId":"get_training_triplets_api_training_triplets_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OMRTrainingTripletResponse"},"title":"Response Get Training Triplets Api Training Triplets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/training/dataset/export":{"get":{"tags":["training"],"summary":"Export Training Dataset","description":"Export collected training triplets as a standalone ZIP fine-tuning dataset archive with JSONL manifest (scoped to user).","operationId":"export_training_dataset_api_training_dataset_export_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"include_augmented","in":"query","required":false,"schema":{"type":"boolean","description":"Apply synthetic document augmentations (folds, bleeds, noise) to exported images","default":false,"title":"Include Augmented"},"description":"Apply synthetic document augmentations (folds, bleeds, noise) to exported images"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/create-checkout-session":{"post":{"tags":["billing"],"summary":"Handle Create Checkout Session","description":"Initiate a secure Stripe Hosted Checkout session.\nNo card numbers or CVVs touch the NoteSight application.","operationId":"handle_create_checkout_session_api_billing_create_checkout_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/billing/create-portal-session":{"post":{"tags":["billing"],"summary":"Handle Create Portal Session","description":"Initiate a secure Stripe Customer Billing Portal session.\nAllows users to update payment methods, download invoices, or cancel their subscription.","operationId":"handle_create_portal_session_api_billing_create_portal_session_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CustomerPortalRequest"},{"type":"null"}],"title":"Request Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPortalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/billing/status":{"get":{"tags":["billing"],"summary":"Handle Get Billing Status","description":"Retrieve live billing status, active subscription details, and customer reference.","operationId":"handle_get_billing_status_api_billing_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/billing/details":{"patch":{"tags":["billing"],"summary":"Handle Update Billing Details","description":"Update optional billing contact details (name, email, country).\nCompletely optional for free/starter tier users.","operationId":"handle_update_billing_details_api_billing_details_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionalBillingDetailsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/billing/webhook":{"post":{"tags":["billing"],"summary":"Handle Stripe Webhook","description":"Receive and process asynchronous Stripe events with HMAC-SHA256 signature verification\nand idempotency deduplication.","operationId":"handle_stripe_webhook_api_billing_webhook_post","parameters":[{"name":"Stripe-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Handle Stripe Webhook Api Billing Webhook Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health/live":{"get":{"tags":["Health"],"summary":"Liveness Probe","description":"Kubernetes/container liveness probe.\nReturns 200 immediately to confirm the application event loop and HTTP server are responsive.","operationId":"liveness_probe_health_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Liveness Probe Health Live Get"}}}}}}},"/health/ready":{"get":{"tags":["Health"],"summary":"Readiness Probe","description":"Readiness probe verifying that core dependencies (PostgreSQL, Redis, Storage) are available.\nReturns 200 if ready to serve user traffic, or 503 if any mandatory dependency fails.","operationId":"readiness_probe_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Readiness Probe Health Ready Get"}}}}}}},"/":{"get":{"summary":"Health Check","operationId":"health_check__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/llms.txt":{"get":{"tags":["discovery"],"summary":"Get Llms Txt","description":"Serve standardized LLM and AI agent documentation.","operationId":"get_llms_txt_api_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"AccountDeletionRequest":{"properties":{"password":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Password"}},"type":"object","title":"AccountDeletionRequest"},"BillingStatusResponse":{"properties":{"tier":{"type":"string","title":"Tier"},"has_active_subscription":{"type":"boolean","title":"Has Active Subscription"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionInfo"},{"type":"null"}]},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"billing_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Name"},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email"},"billing_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Country"}},"type":"object","required":["tier","has_active_subscription"],"title":"BillingStatusResponse"},"Body_convert_xml_to_midi_api_convert_xml_to_midi_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_convert_xml_to_midi_api_convert_xml_to_midi_post"},"Body_convert_xml_to_pdf_api_convert_xml_to_pdf_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_convert_xml_to_pdf_api_convert_xml_to_pdf_post"},"Body_login_for_access_token_api_token_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_login_for_access_token_api_token_post"},"Body_upload_score_api_jobs_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_score_api_jobs_upload_post"},"Body_upload_score_api_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_score_api_upload_post"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","maxLength":128,"title":"Current Password"},"new_password":{"type":"string","maxLength":128,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"CheckoutSessionRequest":{"properties":{"tier":{"$ref":"#/components/schemas/UserTier"},"locale":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Locale","description":"Language code for Stripe Checkout (e.g. 'en', 'es', 'de', 'fr', 'it', 'pt', 'auto')"}},"type":"object","required":["tier"],"title":"CheckoutSessionRequest"},"CheckoutSessionResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"}},"type":"object","required":["checkout_url"],"title":"CheckoutSessionResponse"},"CustomerPortalRequest":{"properties":{"locale":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Locale","description":"Language code for Stripe Customer Portal"}},"type":"object","title":"CustomerPortalRequest"},"CustomerPortalResponse":{"properties":{"portal_url":{"type":"string","title":"Portal Url"}},"type":"object","required":["portal_url"],"title":"CustomerPortalResponse"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"JobResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/JobStatus"},"original_filename":{"type":"string","title":"Original Filename"},"result_file_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result File Path"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"content_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Hash"},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Count"},"file_size_bytes":{"type":"integer","title":"File Size Bytes","default":0},"processing_time_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Processing Time Seconds"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","original_filename"],"title":"JobResponse","description":"Schema representing job state returned to the client."},"JobStatus":{"type":"string","enum":["pending","processing","completed","failed"],"title":"JobStatus"},"JobUpdate":{"properties":{"musicxml":{"type":"string","title":"Musicxml"}},"type":"object","required":["musicxml"],"title":"JobUpdate","description":"Schema for updating an existing completed job's MusicXML content."},"LegalTermsResponse":{"properties":{"version":{"type":"string","title":"Version"},"effective_date":{"type":"string","title":"Effective Date"},"title":{"type":"string","title":"Title"},"summary":{"type":"string","title":"Summary"},"sections":{"items":{"$ref":"#/components/schemas/LegalTermsSection"},"type":"array","title":"Sections"}},"type":"object","required":["version","effective_date","title","summary","sections"],"title":"LegalTermsResponse"},"LegalTermsSection":{"properties":{"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"}},"type":"object","required":["title","content"],"title":"LegalTermsSection"},"OAuthGoogleCallbackRequest":{"properties":{"code":{"type":"string","title":"Code"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},"type":"object","required":["code"],"title":"OAuthGoogleCallbackRequest"},"OAuthUrlResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"OAuthUrlResponse"},"OMRQualityReportResponse":{"properties":{"total_triplets":{"type":"integer","title":"Total Triplets"},"average_cer":{"type":"number","title":"Average Cer"},"median_cer":{"type":"number","title":"Median Cer"},"total_measures_modified":{"type":"integer","title":"Total Measures Modified"},"total_rhythm_issues_fixed":{"type":"integer","title":"Total Rhythm Issues Fixed"},"cer_distribution":{"additionalProperties":{"type":"integer"},"type":"object","title":"Cer Distribution"},"common_modified_elements":{"additionalProperties":{"type":"integer"},"type":"object","title":"Common Modified Elements"}},"type":"object","required":["total_triplets","average_cer","median_cer","total_measures_modified","total_rhythm_issues_fixed","cer_distribution","common_modified_elements"],"title":"OMRQualityReportResponse"},"OMRTrainingTripletResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"job_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Job Id"},"image_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Path"},"raw_prediction_path":{"type":"string","title":"Raw Prediction Path"},"corrected_xml_path":{"type":"string","title":"Corrected Xml Path"},"character_error_rate":{"type":"number","title":"Character Error Rate"},"measures_modified":{"type":"integer","title":"Measures Modified"},"rhythm_issues_fixed":{"type":"integer","title":"Rhythm Issues Fixed"},"diff_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Diff Summary"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","raw_prediction_path","corrected_xml_path","character_error_rate","measures_modified","rhythm_issues_fixed","created_at"],"title":"OMRTrainingTripletResponse"},"OptionalBillingDetailsUpdate":{"properties":{"billing_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Billing Name"},"billing_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Billing Email"},"billing_country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Billing Country"}},"type":"object","title":"OptionalBillingDetailsUpdate"},"PublicSharedScoreResponse":{"properties":{"share_token":{"type":"string","title":"Share Token"},"title":{"type":"string","title":"Title"},"author_name":{"type":"string","title":"Author Name"},"musicxml":{"type":"string","title":"Musicxml"},"allow_playback":{"type":"boolean","title":"Allow Playback"},"allow_fork":{"type":"boolean","title":"Allow Fork"},"view_count":{"type":"integer","title":"View Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["share_token","title","author_name","musicxml","allow_playback","allow_fork","view_count","created_at"],"title":"PublicSharedScoreResponse"},"QuotaPagesInfo":{"properties":{"max_per_score":{"type":"integer","title":"Max Per Score"},"processed_this_month":{"type":"integer","title":"Processed This Month"},"monthly_limit":{"type":"integer","title":"Monthly Limit"},"remaining_this_month":{"type":"integer","title":"Remaining This Month"}},"type":"object","required":["max_per_score","processed_this_month","monthly_limit","remaining_this_month"],"title":"QuotaPagesInfo"},"QuotaStorageInfo":{"properties":{"used_bytes":{"type":"integer","title":"Used Bytes"},"used_mb":{"type":"number","title":"Used Mb"},"limit_bytes":{"type":"integer","title":"Limit Bytes"},"limit_mb":{"type":"integer","title":"Limit Mb"},"percent_used":{"type":"number","title":"Percent Used"}},"type":"object","required":["used_bytes","used_mb","limit_bytes","limit_mb","percent_used"],"title":"QuotaStorageInfo"},"RefreshTokenRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshTokenRequest"},"RequestVerificationRequest":{"properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"}},"type":"object","title":"RequestVerificationRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","maxLength":128,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"RhythmIssueResponse":{"properties":{"measure_number":{"type":"integer","title":"Measure Number"},"time_signature":{"type":"string","title":"Time Signature"},"expected_beats":{"type":"number","title":"Expected Beats"},"actual_beats":{"type":"number","title":"Actual Beats"},"discrepancy_beats":{"type":"number","title":"Discrepancy Beats"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["measure_number","time_signature","expected_beats","actual_beats","discrepancy_beats","status","message"],"title":"RhythmIssueResponse","description":"Schema representing an arithmetic discrepancy in measure duration."},"ScoreAnnotationCreate":{"properties":{"measure_number":{"type":"integer","minimum":1.0,"title":"Measure Number"},"staff_index":{"type":"integer","minimum":0.0,"title":"Staff Index","default":0},"annotation_type":{"type":"string","maxLength":50,"title":"Annotation Type","default":"comment"},"content":{"type":"string","maxLength":1000,"minLength":1,"title":"Content"},"color":{"type":"string","maxLength":20,"title":"Color","default":"#6366f1"}},"type":"object","required":["measure_number","content"],"title":"ScoreAnnotationCreate"},"ScoreAnnotationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"job_id":{"type":"string","format":"uuid","title":"Job Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"author_name":{"type":"string","title":"Author Name"},"measure_number":{"type":"integer","title":"Measure Number"},"staff_index":{"type":"integer","title":"Staff Index"},"annotation_type":{"type":"string","title":"Annotation Type"},"content":{"type":"string","title":"Content"},"color":{"type":"string","title":"Color"},"is_resolved":{"type":"boolean","title":"Is Resolved"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","job_id","user_id","author_name","measure_number","staff_index","annotation_type","content","color","is_resolved","created_at","updated_at"],"title":"ScoreAnnotationResponse"},"ScoreAnnotationUpdate":{"properties":{"content":{"anyOf":[{"type":"string","maxLength":1000,"minLength":1},{"type":"null"}],"title":"Content"},"annotation_type":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Annotation Type"},"color":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Color"},"is_resolved":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Resolved"}},"type":"object","title":"ScoreAnnotationUpdate"},"ScoreCreate":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"composer":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Composer"},"musicxml":{"type":"string","minLength":10,"title":"Musicxml"}},"type":"object","required":["title","musicxml"],"title":"ScoreCreate","description":"Schema for creating a new score from scratch."},"ScoreForkResponse":{"properties":{"forked_job_id":{"type":"string","format":"uuid","title":"Forked Job Id"},"title":{"type":"string","title":"Title"},"message":{"type":"string","title":"Message"}},"type":"object","required":["forked_job_id","title","message"],"title":"ScoreForkResponse"},"ScoreShareCreate":{"properties":{"allow_playback":{"type":"boolean","title":"Allow Playback","default":true},"allow_fork":{"type":"boolean","title":"Allow Fork","default":true},"expires_days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Expires Days"}},"type":"object","title":"ScoreShareCreate"},"ScoreShareResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"job_id":{"type":"string","format":"uuid","title":"Job Id"},"share_token":{"type":"string","title":"Share Token"},"share_url":{"type":"string","title":"Share Url"},"embed_url":{"type":"string","title":"Embed Url"},"allow_playback":{"type":"boolean","title":"Allow Playback"},"allow_fork":{"type":"boolean","title":"Allow Fork"},"is_active":{"type":"boolean","title":"Is Active"},"view_count":{"type":"integer","title":"View Count"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","job_id","share_token","share_url","embed_url","allow_playback","allow_fork","is_active","view_count","expires_at","created_at"],"title":"ScoreShareResponse"},"ScoreValidationResponse":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"total_measures":{"type":"integer","title":"Total Measures"},"invalid_measures_count":{"type":"integer","title":"Invalid Measures Count"},"issues":{"items":{"$ref":"#/components/schemas/RhythmIssueResponse"},"type":"array","title":"Issues"}},"type":"object","required":["job_id","total_measures","invalid_measures_count","issues"],"title":"ScoreValidationResponse","description":"Schema representing a score rhythm and confidence validation report."},"SubscriptionInfo":{"properties":{"id":{"type":"string","title":"Id"},"tier":{"type":"string","title":"Tier"},"status":{"type":"string","title":"Status"},"current_period_start":{"type":"string","title":"Current Period Start"},"current_period_end":{"type":"string","title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"}},"type":"object","required":["id","tier","status","current_period_start","current_period_end","cancel_at_period_end"],"title":"SubscriptionInfo"},"TierDetail":{"properties":{"id":{"$ref":"#/components/schemas/UserTier"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"tagline":{"type":"string","title":"Tagline"},"storage_limit_mb":{"type":"integer","title":"Storage Limit Mb"},"max_pages_per_score":{"type":"integer","title":"Max Pages Per Score"},"monthly_page_limit":{"type":"integer","title":"Monthly Page Limit"},"price":{"type":"string","title":"Price"},"features":{"items":{"type":"string"},"type":"array","title":"Features"}},"type":"object","required":["id","name","display_name","tagline","storage_limit_mb","max_pages_per_score","monthly_page_limit","price","features"],"title":"TierDetail"},"Token":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"requires_2fa":{"type":"boolean","title":"Requires 2Fa","default":false},"temp_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temp Token"}},"type":"object","required":["access_token","token_type"],"title":"Token"},"TotpDisableRequest":{"properties":{"password":{"type":"string","maxLength":128,"title":"Password"},"code":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"title":"Code"}},"type":"object","required":["password"],"title":"TotpDisableRequest"},"TotpLoginRequest":{"properties":{"temp_token":{"type":"string","title":"Temp Token"},"code":{"type":"string","maxLength":16,"minLength":4,"title":"Code"}},"type":"object","required":["temp_token","code"],"title":"TotpLoginRequest"},"TotpSetupResponse":{"properties":{"secret":{"type":"string","title":"Secret"},"otpauth_uri":{"type":"string","title":"Otpauth Uri"},"backup_codes":{"items":{"type":"string"},"type":"array","title":"Backup Codes"}},"type":"object","required":["secret","otpauth_uri","backup_codes"],"title":"TotpSetupResponse"},"TotpVerifyRequest":{"properties":{"code":{"type":"string","maxLength":12,"minLength":6,"title":"Code"}},"type":"object","required":["code"],"title":"TotpVerifyRequest"},"UpdateTierRequest":{"properties":{"tier":{"$ref":"#/components/schemas/UserTier"}},"type":"object","required":["tier"],"title":"UpdateTierRequest"},"UserCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"title":"Password"},"full_name":{"type":"string","maxLength":255,"minLength":2,"title":"Full Name"},"birthdate":{"type":"string","format":"date","title":"Birthdate"},"terms_accepted":{"type":"boolean","title":"Terms Accepted"},"terms_version":{"type":"string","title":"Terms Version","default":"2026.1-copyright"},"musical_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Musical Role"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},"type":"object","required":["email","password","full_name","birthdate","terms_accepted"],"title":"UserCreate"},"UserProfileResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"birthdate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthdate"},"musical_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Musical Role"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"is_verified":{"type":"boolean","title":"Is Verified","default":false},"oauth_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Provider"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"email_notifications_enabled":{"type":"boolean","title":"Email Notifications Enabled","default":true},"allow_omr_telemetry":{"type":"boolean","title":"Allow Omr Telemetry","default":false},"totp_enabled":{"type":"boolean","title":"Totp Enabled","default":false},"tier":{"$ref":"#/components/schemas/UserTier"},"terms_accepted":{"type":"boolean","title":"Terms Accepted"},"terms_accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Terms Accepted At"},"terms_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"has_billing_customer":{"type":"boolean","title":"Has Billing Customer","default":false},"billing_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Name"},"billing_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Country"}},"type":"object","required":["id","email","full_name","tier","terms_accepted","created_at"],"title":"UserProfileResponse"},"UserProfileUpdate":{"properties":{"full_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":2},{"type":"null"}],"title":"Full Name"},"birthdate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthdate"},"musical_role":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Musical Role"},"country":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Country"},"bio":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Bio"},"avatar_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Avatar Url"},"email_notifications_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Notifications Enabled"},"allow_omr_telemetry":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Omr Telemetry"}},"type":"object","title":"UserProfileUpdate"},"UserQuotaResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"tier":{"$ref":"#/components/schemas/UserTier"},"tier_name":{"type":"string","title":"Tier Name"},"storage":{"$ref":"#/components/schemas/QuotaStorageInfo"},"pages":{"$ref":"#/components/schemas/QuotaPagesInfo"},"available_tiers":{"items":{"$ref":"#/components/schemas/TierDetail"},"type":"array","title":"Available Tiers"}},"type":"object","required":["user_id","email","tier","tier_name","storage","pages","available_tiers"],"title":"UserQuotaResponse"},"UserTier":{"type":"string","enum":["starter","pro","virtuoso","maestro"],"title":"UserTier"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyEmailRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"VerifyEmailRequest"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/token"}}}}}}