{"openapi":"3.1.0","info":{"title":"YT Summaries API","version":"0.1"},"paths":{"/v1/videos/{youtube_id}":{"get":{"tags":["canonical"],"summary":"Get Video","operationId":"get_video_v1_videos__youtube_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"youtube_id","in":"path","required":true,"schema":{"type":"string","title":"Youtube Id"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","pattern":"^(es|en)$","default":"es","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search":{"get":{"tags":["canonical"],"summary":"Search","operationId":"search_v1_search_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"Q"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","pattern":"^(es|en)$","default":"es","title":"Lang"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/entities/{slug}":{"get":{"tags":["canonical"],"summary":"Get Entities By Slug","operationId":"get_entities_by_slug_v1_entities__slug__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/videos":{"get":{"tags":["videos"],"summary":"List Videos","operationId":"list_videos_v1_videos_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(es|en)$"},{"type":"null"}],"title":"Lang"}},{"name":"topic","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"}},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_VideoSummary_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/videos/by-slug/{slug}":{"get":{"tags":["videos"],"summary":"Get Video","operationId":"get_video_v1_videos_by_slug__slug__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/podcast/{lang}.rss":{"get":{"tags":["podcast"],"summary":"Podcast Feed","operationId":"podcast_feed_v1_podcast__lang__rss_get","parameters":[{"name":"lang","in":"path","required":true,"schema":{"type":"string","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/topics":{"get":{"tags":["topics"],"summary":"List Topics","operationId":"list_topics_v1_topics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Topic"},"type":"array","title":"Response List Topics V1 Topics Get"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/channels":{"get":{"tags":["channels"],"summary":"List Channels","operationId":"list_channels_v1_channels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Channel"},"type":"array","title":"Response List Channels V1 Channels Get"}}}}},"security":[{"APIKeyHeader":[]}]}},"/admin/pipeline":{"get":{"tags":["admin"],"summary":"Pipeline Board","operationId":"pipeline_board_admin_pipeline_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}},"security":[{"HTTPBasic":[]}]}},"/admin/video-requests":{"get":{"tags":["admin"],"summary":"Public Video Requests","description":"Demand signal and URLs for editorial review and host metadata ingestion.","operationId":"public_video_requests_admin_video_requests_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/pipeline/{item_id}/classify":{"post":{"tags":["admin"],"summary":"Classify","description":"Asigna categoría + prompt_version y mueve la fila a `classified`.\n\n`prompt_version` es opcional: si el panel no lo manda, se compone como\n`<category>.v1` (la única versión que existe ahora mismo en prompts/).","operationId":"classify_admin_pipeline__item_id__classify_post","security":[{"HTTPBasic":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_classify_admin_pipeline__item_id__classify_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/pipeline/{item_id}/queue":{"post":{"tags":["admin"],"summary":"Queue","description":"Promueve la fila a `queued`. Solo desde discovered/classified.","operationId":"queue_admin_pipeline__item_id__queue_post","security":[{"HTTPBasic":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/session":{"post":{"summary":"Start","operationId":"start_v1_analytics_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Start"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Withdraw","description":"Withdraw consent and erase session. Works even if analytics is disabled (required by privacy law).","operationId":"withdraw_v1_analytics_session_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/tutor/analytics/events":{"post":{"summary":"View","operationId":"view_v1_tutor_analytics_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/View"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/purge":{"post":{"summary":"Maintenance","operationId":"maintenance_admin_analytics_purge_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBasic":[]}]}},"/admin/analytics/accounts/{account_id}":{"get":{"summary":"Export Account","operationId":"export_account_admin_analytics_accounts__account_id__get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Erase Account","operationId":"erase_account_admin_analytics_accounts__account_id__delete","security":[{"HTTPBasic":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/daily":{"get":{"summary":"Daily","operationId":"daily_admin_analytics_daily_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"day","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Day"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics":{"get":{"summary":"Dashboard","operationId":"dashboard_admin_analytics_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Day"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/security/daily":{"get":{"summary":"Daily","operationId":"daily_admin_security_daily_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"day","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Day"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/security":{"get":{"summary":"Dashboard","operationId":"dashboard_admin_security_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Day"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/answer":{"post":{"tags":["tutor"],"summary":"Answer Tutor","operationId":"answer_tutor_v1_tutor_answer_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TutorRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TutorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/tutor/demo":{"get":{"tags":["tutor"],"summary":"Tutor Demo","operationId":"tutor_demo_v1_tutor_demo_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"v","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"V"}},{"name":"lang","in":"query","required":false,"schema":{"enum":["es","en"],"type":"string","default":"es","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/chat":{"post":{"tags":["tutor"],"summary":"Tutor Chat","operationId":"tutor_chat_v1_tutor_chat_post","security":[{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TutorChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tutor"],"summary":"Tutor Chat Embed","description":"Página aislada para incrustar en WordPress; nunca recibe ni expone API keys.","operationId":"tutor_chat_embed_v1_tutor_chat_get","parameters":[{"name":"v","in":"query","required":true,"schema":{"type":"string","title":"V"}},{"name":"lang","in":"query","required":false,"schema":{"enum":["es","en"],"type":"string","default":"es","title":"Lang"}},{"name":"start","in":"query","required":false,"schema":{"type":"number","default":0,"title":"Start"}},{"name":"shared_player","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Shared Player"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/chat-demo":{"get":{"tags":["tutor"],"summary":"Tutor Chat Demo","operationId":"tutor_chat_demo_v1_tutor_chat_demo_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"v","in":"query","required":true,"schema":{"type":"string","title":"V"}},{"name":"lang","in":"query","required":false,"schema":{"enum":["es","en"],"type":"string","default":"es","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/availability":{"get":{"tags":["tutor"],"summary":"Tutor Availability","operationId":"tutor_availability_v1_tutor_availability_get","parameters":[{"name":"v","in":"query","required":true,"schema":{"type":"string","title":"V"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/embed":{"get":{"tags":["tutor"],"summary":"Tutor Chat Embed","description":"Página aislada para incrustar en WordPress; nunca recibe ni expone API keys.","operationId":"tutor_chat_embed_v1_tutor_embed_get","parameters":[{"name":"v","in":"query","required":true,"schema":{"type":"string","title":"V"}},{"name":"lang","in":"query","required":false,"schema":{"enum":["es","en"],"type":"string","default":"es","title":"Lang"}},{"name":"start","in":"query","required":false,"schema":{"type":"number","default":0,"title":"Start"}},{"name":"shared_player","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Shared Player"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/frames/{video_id}/{seconds}.jpg":{"get":{"tags":["tutor"],"summary":"Tutor Frame Thumbnail","operationId":"tutor_frame_thumbnail_v1_tutor_frames__video_id___seconds__jpg_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","title":"Video Id"}},{"name":"seconds","in":"path","required":true,"schema":{"type":"string","title":"Seconds"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/account/media/{video_id}":{"get":{"tags":["tutor accounts"],"summary":"Account Private Media","operationId":"account_private_media_v1_tutor_account_media__video_id__get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/account/library":{"get":{"tags":["tutor accounts"],"summary":"Account Library","operationId":"account_library_v1_tutor_account_library_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/v1/tutor/account/library/{video_id}":{"get":{"tags":["tutor accounts"],"summary":"Account Private Video","operationId":"account_private_video_v1_tutor_account_library__video_id__get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/register":{"post":{"tags":["tutor accounts"],"summary":"Register","operationId":"register_v1_tutor_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Registration"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/verify-email":{"post":{"tags":["tutor accounts"],"summary":"Verify Email","operationId":"verify_email_v1_tutor_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Verification"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/resend-verification":{"post":{"tags":["tutor accounts"],"summary":"Resend Verification","operationId":"resend_verification_v1_tutor_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Challenge"},{"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/tutor/login":{"post":{"tags":["tutor accounts"],"summary":"Login","operationId":"login_v1_tutor_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/logout":{"post":{"tags":["tutor accounts"],"summary":"Logout","operationId":"logout_v1_tutor_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/tutor/recover":{"post":{"tags":["tutor accounts"],"summary":"Recover","operationId":"recover_v1_tutor_recover_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recovery"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/reset":{"post":{"tags":["tutor accounts"],"summary":"Reset","operationId":"reset_v1_tutor_reset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reset"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/account-security":{"get":{"tags":["tutor accounts"],"summary":"Account Security","operationId":"account_security_v1_tutor_account_security_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/tutor/account":{"get":{"tags":["tutor accounts"],"summary":"Account","operationId":"account_v1_tutor_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/tutor/account/video-requests":{"post":{"tags":["tutor accounts"],"summary":"Video Request","operationId":"video_request_v1_tutor_account_video_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/account/keys":{"get":{"tags":["tutor accounts"],"summary":"List Keys","operationId":"list_keys_v1_tutor_account_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["tutor accounts"],"summary":"Create Key","operationId":"create_key_v1_tutor_account_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyName"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/account/keys/{key_id}":{"delete":{"tags":["tutor accounts"],"summary":"Revoke Key","operationId":"revoke_key_v1_tutor_account_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/ask":{"post":{"tags":["tutor accounts"],"summary":"Ask","operationId":"ask_v1_tutor_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TutorRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TutorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/account/chat":{"post":{"tags":["tutor accounts"],"summary":"Account Chat","description":"Chat SSE autenticado por sesión; la API key no identifica ni cobra cuentas.","operationId":"account_chat_v1_tutor_account_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TutorChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/account/frames/{video_id}/{seconds}.jpg":{"get":{"tags":["tutor accounts"],"summary":"Account Frame","description":"Fotogramas del chat de cuenta: basta la sesión; /frames sigue siendo solo admin o dev local.","operationId":"account_frame_v1_tutor_account_frames__video_id___seconds__jpg_get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","title":"Video Id"}},{"name":"seconds","in":"path","required":true,"schema":{"type":"string","title":"Seconds"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/access":{"get":{"tags":["tutor accounts"],"summary":"Access","operationId":"access_v1_tutor_access_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/profile/settings":{"get":{"tags":["tutor"],"summary":"Get Settings","description":"Obtiene configuración de memoria e historial del usuario.","operationId":"get_settings_v1_tutor_profile_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["tutor"],"summary":"Configure Settings","description":"Configura memoria e historial. Ambos parámetros son opcionales.","operationId":"configure_settings_v1_tutor_profile_settings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/profile":{"get":{"tags":["tutor"],"summary":"Get Profile","description":"Obtiene el perfil de aprendizaje (conceptos, evidencias, estado).","operationId":"get_profile_v1_tutor_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"delete":{"tags":["tutor"],"summary":"Delete Data","description":"Borra todos los datos personales, cancela trabajos pendientes e desactiva memoria e historial.","operationId":"delete_data_v1_tutor_profile_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/tutor/profile/evidence":{"post":{"tags":["tutor"],"summary":"Add Evidence","description":"Añade evidencia de comprensión o respuesta de trabajo.","operationId":"add_evidence_v1_tutor_profile_evidence_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/profile/correction":{"post":{"tags":["tutor"],"summary":"Correct Concept","description":"Registra una corrección de concepto, invalidando trabajos previos.","operationId":"correct_concept_v1_tutor_profile_correction_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrectionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/profile/history":{"post":{"tags":["tutor"],"summary":"Save History","description":"Guarda conversación/historial si está habilitado.","operationId":"save_history_v1_tutor_profile_history_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutor/profile/export":{"get":{"tags":["tutor"],"summary":"Export Data","description":"Exporta todos los datos personales del usuario (perfil, evidencia, historial).","operationId":"export_data_v1_tutor_profile_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/tutor/profile/job/start":{"post":{"tags":["tutor"],"summary":"Start Job","description":"Inicia un trabajo de generación si memoria está habilitada.","operationId":"start_job_v1_tutor_profile_job_start_post","parameters":[{"name":"job_id","in":"query","required":true,"schema":{"type":"string","maxLength":120,"title":"Job Id"}},{"name":"concept_id","in":"query","required":true,"schema":{"type":"string","maxLength":191,"title":"Concept Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/health":{"get":{"tags":["meta"],"summary":"Health","operationId":"health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Body_classify_admin_pipeline__item_id__classify_post":{"properties":{"category":{"type":"string","title":"Category"},"prompt_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Version"}},"type":"object","required":["category"],"title":"Body_classify_admin_pipeline__item_id__classify_post"},"Challenge":{"properties":{"turnstile_token":{"type":"string","maxLength":2048,"title":"Turnstile Token","default":""}},"type":"object","title":"Challenge"},"Channel":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["name","count"],"title":"Channel"},"ChatHistoryItem":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"content":{"type":"string","maxLength":12000,"minLength":1,"title":"Content"}},"additionalProperties":false,"type":"object","required":["role","content"],"title":"ChatHistoryItem"},"Citation":{"properties":{"segment_id":{"type":"string","minLength":1,"title":"Segment Id"},"quote":{"type":"string","minLength":1,"title":"Quote"}},"additionalProperties":false,"type":"object","required":["segment_id","quote"],"title":"Citation"},"ContextSegment":{"properties":{"segment_id":{"type":"string","minLength":1,"title":"Segment Id"},"start_seconds":{"type":"number","minimum":0.0,"title":"Start Seconds"},"end_seconds":{"type":"number","minimum":0.0,"title":"End Seconds"},"partially_heard":{"type":"boolean","title":"Partially Heard"}},"additionalProperties":false,"type":"object","required":["segment_id","start_seconds","end_seconds","partially_heard"],"title":"ContextSegment"},"CorrectionRequest":{"properties":{"concept_id":{"type":"string","maxLength":191,"title":"Concept Id"},"note":{"type":"string","maxLength":10000,"title":"Note"},"observed_at":{"type":"string","maxLength":30,"title":"Observed At"},"response_generation":{"type":"integer","title":"Response Generation"}},"type":"object","required":["concept_id","note","observed_at","response_generation"],"title":"CorrectionRequest"},"Credentials":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"},"turnstile_token":{"type":"string","maxLength":2048,"title":"Turnstile Token","default":""}},"type":"object","required":["email","password"],"title":"Credentials"},"EvidenceRequest":{"properties":{"concept_id":{"type":"string","maxLength":191,"title":"Concept Id"},"kind":{"type":"string","maxLength":30,"title":"Kind"},"note":{"type":"string","maxLength":10000,"title":"Note"},"observed_at":{"type":"string","maxLength":30,"title":"Observed At"},"job_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Job Id"},"response_generation":{"type":"integer","title":"Response Generation"},"correction_id":{"type":"integer","minimum":0.0,"title":"Correction Id","default":0}},"type":"object","required":["concept_id","kind","note","observed_at","response_generation"],"title":"EvidenceRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HistoryRequest":{"properties":{"payload":{"type":"object","title":"Payload"},"created_at":{"type":"string","maxLength":30,"title":"Created At"},"history_generation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"History Generation"}},"type":"object","required":["payload","created_at"],"title":"HistoryRequest"},"KeyName":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"KeyName"},"Paginated_VideoSummary_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VideoSummary"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"Paginated[VideoSummary]"},"Provenance":{"properties":{"provider":{"type":"string","minLength":1,"title":"Provider"},"model":{"type":"string","minLength":1,"title":"Model"},"selector_version":{"type":"string","minLength":1,"title":"Selector Version"},"prompt_version":{"type":"string","minLength":1,"title":"Prompt Version"},"synthetic":{"type":"boolean","title":"Synthetic"}},"additionalProperties":false,"type":"object","required":["provider","model","selector_version","prompt_version","synthetic"],"title":"Provenance"},"ReasoningStep":{"properties":{"text":{"type":"string","minLength":1,"title":"Text"},"basis":{"type":"string","enum":["author_explicit","tutor_inference","general_background"],"title":"Basis"},"segment_ids":{"items":{"type":"string","minLength":1},"type":"array","title":"Segment Ids"}},"additionalProperties":false,"type":"object","required":["text","basis","segment_ids"],"title":"ReasoningStep"},"Recovery":{"properties":{"email":{"type":"string","title":"Email"},"turnstile_token":{"type":"string","maxLength":2048,"title":"Turnstile Token","default":""}},"type":"object","required":["email"],"title":"Recovery"},"Registration":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"},"turnstile_token":{"type":"string","maxLength":2048,"title":"Turnstile Token","default":""}},"type":"object","required":["email","password"],"title":"Registration"},"Reset":{"properties":{"token":{"type":"string","maxLength":128,"minLength":1,"title":"Token"},"password":{"type":"string","maxLength":256,"minLength":12,"title":"Password"},"turnstile_token":{"type":"string","maxLength":2048,"title":"Turnstile Token","default":""}},"type":"object","required":["token","password"],"title":"Reset"},"SettingsRequest":{"properties":{"memory_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Memory Enabled"},"history_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"History Enabled"},"memory_generation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Memory Generation"},"history_generation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"History Generation"}},"type":"object","title":"SettingsRequest"},"Start":{"properties":{"source":{"type":"string","title":"Source","default":"direct"}},"additionalProperties":false,"type":"object","title":"Start"},"Topic":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["slug","name","count"],"title":"Topic"},"TutorChatRequest":{"properties":{"video_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{11}$","title":"Video Id"},"transcript_revision":{"type":"string","maxLength":200,"minLength":1,"title":"Transcript Revision"},"playback_seconds":{"type":"number","maximum":172800.0,"minimum":0.0,"title":"Playback Seconds"},"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"},"history":{"items":{"$ref":"#/components/schemas/ChatHistoryItem"},"type":"array","maxItems":40,"title":"History"},"depth":{"type":"string","enum":["short","normal","deep"],"title":"Depth","default":"normal"},"simpler":{"type":"boolean","title":"Simpler","default":false},"reformulation":{"anyOf":[{"type":"string","enum":["short","deep","simple"]},{"type":"null"}],"title":"Reformulation"},"language":{"type":"string","enum":["es","en"],"title":"Language","default":"es"},"include_frame":{"type":"boolean","title":"Include Frame","default":false},"use_profile":{"type":"boolean","title":"Use Profile","description":"Solo /account/chat: usa el perfil de la cuenta autenticada si su memoria está activa. El chat con API key ignora este campo.","default":false},"request_id":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Request Id"}},"additionalProperties":false,"type":"object","required":["video_id","transcript_revision","playback_seconds","message"],"title":"TutorChatRequest"},"TutorRequest":{"properties":{"schema_version":{"type":"integer","enum":[1],"const":1,"title":"Schema Version"},"request_id":{"type":"string","minLength":1,"title":"Request Id"},"session_id":{"type":"string","minLength":1,"title":"Session Id"},"video_id":{"type":"string","minLength":1,"title":"Video Id"},"transcript_revision":{"type":"string","minLength":1,"title":"Transcript Revision"},"asked_at":{"type":"string","format":"date-time","title":"Asked At"},"playback_seconds":{"type":"number","minimum":0.0,"title":"Playback Seconds"},"question":{"type":"string","maxLength":4000,"minLength":1,"title":"Question"},"intent":{"type":"string","enum":["explain_recent","foundations","reasoning","custom"],"title":"Intent"},"selected_segment_ids":{"items":{"type":"string","minLength":1},"type":"array","maxItems":20,"title":"Selected Segment Ids"},"language":{"type":"string","enum":["es","en"],"title":"Language"},"memory_mode":{"type":"string","enum":["session_only","persistent_profile"],"title":"Memory Mode"},"depth":{"type":"string","enum":["brief","standard","detailed"],"title":"Depth"}},"additionalProperties":false,"type":"object","required":["schema_version","request_id","session_id","video_id","transcript_revision","asked_at","playback_seconds","question","intent","selected_segment_ids","language","memory_mode","depth"],"title":"TutorRequest"},"TutorResponse":{"properties":{"schema_version":{"type":"integer","enum":[1],"const":1,"title":"Schema Version"},"request_id":{"type":"string","minLength":1,"title":"Request Id"},"video_id":{"type":"string","minLength":1,"title":"Video Id"},"transcript_revision":{"type":"string","minLength":1,"title":"Transcript Revision"},"anchor_seconds":{"type":"number","minimum":0.0,"title":"Anchor Seconds"},"language":{"type":"string","enum":["es","en"],"title":"Language"},"status":{"type":"string","enum":["answered","needs_clarification","context_unavailable"],"title":"Status"},"author_statement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Statement"},"explanation":{"type":"string","minLength":1,"title":"Explanation"},"reasoning_steps":{"items":{"$ref":"#/components/schemas/ReasoningStep"},"type":"array","title":"Reasoning Steps"},"assumptions":{"items":{"type":"string","minLength":1},"type":"array","title":"Assumptions"},"example":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Example"},"concept_ids":{"items":{"type":"string","minLength":1},"type":"array","title":"Concept Ids"},"citations":{"items":{"$ref":"#/components/schemas/Citation"},"type":"array","title":"Citations"},"context_used":{"items":{"$ref":"#/components/schemas/ContextSegment"},"type":"array","title":"Context Used"},"limitations":{"items":{"type":"string","minLength":1},"type":"array","title":"Limitations"},"follow_up":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Follow Up"},"provenance":{"$ref":"#/components/schemas/Provenance"},"usage":{"$ref":"#/components/schemas/Usage"}},"additionalProperties":false,"type":"object","required":["schema_version","request_id","video_id","transcript_revision","anchor_seconds","language","status","author_statement","explanation","reasoning_steps","assumptions","example","concept_ids","citations","context_used","limitations","follow_up","provenance","usage"],"title":"TutorResponse"},"Usage":{"properties":{"input_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Output Tokens"},"cost_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Cost Usd"},"latency_ms":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Latency Ms"}},"additionalProperties":false,"type":"object","required":["input_tokens","output_tokens","cost_usd","latency_ms"],"title":"Usage"},"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"},"Verification":{"properties":{"token":{"type":"string","maxLength":128,"minLength":1,"title":"Token"}},"type":"object","required":["token"],"title":"Verification"},"VideoDetail":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"lang":{"type":"string","title":"Lang"},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"},"duration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duration"},"youtube_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Youtube Id"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"tldr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tldr"},"topics":{"items":{"type":"string"},"type":"array","title":"Topics","default":[]},"permalink":{"type":"string","title":"Permalink"},"published_at":{"type":"string","title":"Published At"},"tldr_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tldr Html"},"summary_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary Html"},"transcript":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript"}},"type":"object","required":["id","slug","title","lang","permalink","published_at"],"title":"VideoDetail"},"VideoRequest":{"properties":{"url":{"type":"string","maxLength":2048,"minLength":1,"title":"Url"}},"type":"object","required":["url"],"title":"VideoRequest"},"VideoSummary":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"lang":{"type":"string","title":"Lang"},"channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"},"duration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duration"},"youtube_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Youtube Id"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"tldr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tldr"},"topics":{"items":{"type":"string"},"type":"array","title":"Topics","default":[]},"permalink":{"type":"string","title":"Permalink"},"published_at":{"type":"string","title":"Published At"}},"type":"object","required":["id","slug","title","lang","permalink","published_at"],"title":"VideoSummary"},"View":{"properties":{"event_name":{"type":"string","title":"Event Name"},"video_id":{"type":"string","title":"Video Id","default":""},"locale":{"type":"string","title":"Locale","default":"es"}},"additionalProperties":false,"type":"object","required":["event_name"],"title":"View"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"},"HTTPBasic":{"type":"http","scheme":"basic"}}}}