{"openapi":"3.1.0","info":{"title":"Forbidden Peach","summary":"Prototype API for accounts, story-video generation (Wan 2.1 with per-video character LoRAs), and a topic catalog.","version":"0.1.0"},"paths":{"/api/v1/health":{"get":{"tags":["health"],"summary":"Health","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Api V1 Health Get"}}}}}}},"/health":{"get":{"tags":["health"],"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Health Get"}}}}}}},"/api/v1/auth/guest":{"post":{"tags":["auth"],"summary":"Start Guest Session","description":"Create a guest account and return its token. The guest can use the site like anyone else.","operationId":"start_guest_session_api_v1_auth_guest_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSession"}}}}}}},"/api/v1/auth/register":{"post":{"tags":["auth"],"summary":"Register","description":"Create an account and sign it in.\n\nA guest who registers keeps their videos, likes, and comments.","operationId":"register_api_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSession"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/auth/token":{"post":{"tags":["auth"],"summary":"Login","description":"Exchange an email and password for a bearer token. The username field is the email.","operationId":"login_api_v1_auth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_api_v1_auth_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/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Revoke the caller's bearer token. Later requests with that token are rejected.\n\nLogging out needs no proof of work: it only takes access away.","operationId":"logout_api_v1_auth_logout_post","responses":{"204":{"description":"Successful Response"}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/users/me":{"get":{"tags":["users"],"summary":"Me","operationId":"me_api_v1_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/users/{user_id}":{"get":{"tags":["users"],"summary":"Profile","description":"A user's public profile: name, whether they are a guest, and how many videos they posted.","operationId":"profile_api_v1_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfile"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{user_id}/videos":{"get":{"tags":["users"],"summary":"User Videos","description":"The ready videos a user posted, newest first.","operationId":"user_videos_api_v1_users__user_id__videos_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":24,"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/UserVideos"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/topics":{"get":{"tags":["topics"],"summary":"List Topics","operationId":"list_topics_api_v1_topics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TopicRead"},"type":"array","title":"Response List Topics Api V1 Topics Get"}}}}}},"post":{"tags":["topics"],"summary":"Create Topic","operationId":"create_topic_api_v1_topics_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/v1/topics/{slug}":{"get":{"tags":["topics"],"summary":"Topic Page","operationId":"topic_page_api_v1_topics__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":24,"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/TopicPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos":{"post":{"tags":["videos"],"summary":"Create Video","description":"Start a video. Guests and signed-in users both have a token, so both can.","operationId":"create_video_api_v1_videos_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["videos"],"summary":"List Videos","operationId":"list_videos_api_v1_videos_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/VideoStatus"},{"type":"null"}],"title":"Status"}},{"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/VideoList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_id}/progress":{"get":{"tags":["videos"],"summary":"Video Progress","operationId":"video_progress_api_v1_videos__video_id__progress_get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProgress"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_id}":{"get":{"tags":["videos"],"summary":"Get Video","operationId":"get_video_api_v1_videos__video_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Video Id"}}],"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"}}}}}}},"/api/v1/videos/{video_id}/transitions":{"get":{"tags":["videos"],"summary":"List Transitions","operationId":"list_transitions_api_v1_videos__video_id__transitions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VideoTransitionRead"},"title":"Response List Transitions Api V1 Videos  Video Id  Transitions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_id}/events":{"post":{"tags":["videos"],"summary":"Apply Event","operationId":"apply_event_api_v1_videos__video_id__events_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Video Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoEventRequest"}}}},"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"}}}}}}},"/api/v1/home":{"get":{"tags":["catalog"],"summary":"Home","operationId":"home_api_v1_home_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HomeFeed"}}}}}}},"/api/v1/popular":{"get":{"tags":["catalog"],"summary":"Popular","description":"Ready videos, most viewed first. This is the home page's Trending now rail.","operationId":"popular_api_v1_popular_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":12,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PopularVideos"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/search":{"get":{"tags":["catalog"],"summary":"Search","description":"Ready videos that match the words in ``q``. A title hit ranks above a description hit.","operationId":"search_api_v1_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"default":"","title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":24,"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/SearchResults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/watch/{video_id}":{"get":{"tags":["catalog"],"summary":"Watch","description":"Play a ready video. Pass ``count_view=false`` to read it without adding a view.","operationId":"watch_api_v1_watch__video_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Video Id"}},{"name":"count_view","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Count View"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchVideo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_id}/like":{"post":{"tags":["catalog"],"summary":"Like","operationId":"like_api_v1_videos__video_id__like_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LikeResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_id}/dislike":{"post":{"tags":["catalog"],"summary":"Dislike","operationId":"dislike_api_v1_videos__video_id__dislike_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DislikeResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_id}/download":{"get":{"tags":["catalog"],"summary":"Download","description":"Stream the finished mp4 as an attachment so the browser saves it.","operationId":"download_api_v1_videos__video_id__download_get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_id}/subtitles.vtt":{"get":{"tags":["catalog"],"summary":"Subtitles","description":"Serve the captions the worker wrote next to the final video.\n\nThe player reads them from here, not from the bucket, so it needs no CORS\nrules on the bucket. Videos made before captions existed answer 404.","operationId":"subtitles_api_v1_videos__video_id__subtitles_vtt_get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_id}/comments":{"get":{"tags":["comments"],"summary":"List Comments","operationId":"list_comments_api_v1_videos__video_id__comments_get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Video Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"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/CommentList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["comments"],"summary":"Create Comment","description":"Post a comment, or a reply to a top-level comment with ``parent_id``.\n\nGuests and signed-in users can both comment.","operationId":"create_comment_api_v1_videos__video_id__comments_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Video Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_id}/comments/{comment_id}/replies":{"get":{"tags":["comments"],"summary":"List Replies","operationId":"list_replies_api_v1_videos__video_id__comments__comment_id__replies_get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Video Id"}},{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Comment Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"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/ReplyList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/pow/challenge":{"get":{"tags":["pow"],"summary":"Challenge","description":"Return a proof-of-work challenge for one kind of write.\n\nFind the string of ``hex_chars`` lowercase hex characters whose SHA-1 is ``hash``.\nSend the token in ``X-PoW-Token`` and the string in ``X-PoW-Solution`` with the write.\nThe actions are listed in ``app.pow.ACTIONS``.","operationId":"challenge_api_v1_pow_challenge_get","parameters":[{"name":"action","in":"query","required":true,"schema":{"type":"string","maxLength":32,"title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp":{"post":{"tags":["mcp"],"summary":"Model Context Protocol server","description":"MCP over Streamable HTTP. POST a JSON-RPC request, get the JSON-RPC response.\n\nAgents can do everything people can here, including creating videos, for free. Every\nwrite needs a proof of work (tool ``get_pow_challenge``). Videos are public. The guide\nis at ``/llms-full.txt``.","operationId":"mcp_endpoint_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"202":{"description":"Notification accepted. No body."}}}},"/api/v1/processing/graph":{"get":{"tags":["processing"],"summary":"Graph","operationId":"graph_api_v1_processing_graph_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateMachineGraph"}}}}}}}},"components":{"schemas":{"AccountSession":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"display_name":{"type":"string","title":"Display Name"},"is_guest":{"type":"boolean","title":"Is Guest"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["id","email","display_name","is_guest","is_active","created_at","access_token"],"title":"AccountSession","description":"An account together with a token that signs it in."},"Body_login_api_v1_auth_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_api_v1_auth_token_post"},"ChallengeRead":{"properties":{"token":{"type":"string","title":"Token"},"action":{"type":"string","title":"Action"},"algorithm":{"type":"string","title":"Algorithm"},"hex_chars":{"type":"integer","title":"Hex Chars"},"hash":{"type":"string","title":"Hash"},"expires_at":{"type":"string","title":"Expires At"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["token","action","algorithm","hex_chars","hash","expires_at","expires_in"],"title":"ChallengeRead"},"CharacterImageInput":{"properties":{"object_key":{"type":"string","maxLength":1024,"minLength":1,"title":"Object Key"},"content_type":{"type":"string","title":"Content Type","default":"image/png"},"byte_size":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Byte Size"},"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"}},"type":"object","required":["object_key","name"],"title":"CharacterImageInput"},"CharacterInput":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"prompt":{"type":"string","maxLength":4000,"minLength":1,"title":"Prompt"}},"type":"object","required":["name","prompt"],"title":"CharacterInput"},"CharacterLoraInput":{"properties":{"object_key":{"type":"string","maxLength":1024,"minLength":1,"title":"Object Key"},"content_type":{"type":"string","title":"Content Type","default":"application/x-safetensors"},"byte_size":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Byte Size"},"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"trigger_token":{"type":"string","maxLength":64,"minLength":2,"pattern":"^[A-Za-z0-9_]+$","title":"Trigger Token"}},"type":"object","required":["object_key","name","trigger_token"],"title":"CharacterLoraInput"},"CharacterRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"position":{"type":"integer","title":"Position"},"name":{"type":"string","title":"Name"},"prompt":{"type":"string","title":"Prompt"},"trigger_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Token"},"image":{"anyOf":[{"$ref":"#/components/schemas/S3Location"},{"type":"null"}]},"lora":{"anyOf":[{"$ref":"#/components/schemas/S3Location"},{"type":"null"}]}},"type":"object","required":["id","position","name","prompt","image"],"title":"CharacterRead"},"CommentAuthor":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"is_guest":{"type":"boolean","title":"Is Guest"}},"type":"object","required":["id","display_name","is_guest"],"title":"CommentAuthor"},"CommentCreate":{"properties":{"body":{"type":"string","maxLength":4000,"title":"Body"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"}},"type":"object","required":["body"],"title":"CommentCreate","description":"A comment or a reply. Text only: there is no field for a file, image, or link preview."},"CommentList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CommentRead"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total","description":"Top-level comments on the video."},"total_with_replies":{"type":"integer","title":"Total With Replies","description":"Every comment and reply on the video."}},"type":"object","required":["items","total","total_with_replies"],"title":"CommentList"},"CommentRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"video_id":{"type":"string","format":"uuid","title":"Video Id"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"body":{"type":"string","title":"Body"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"author":{"$ref":"#/components/schemas/CommentAuthor"},"reply_count":{"type":"integer","title":"Reply Count","default":0},"replies":{"items":{"$ref":"#/components/schemas/CommentRead"},"type":"array","title":"Replies","default":[]}},"type":"object","required":["id","video_id","parent_id","body","created_at","author"],"title":"CommentRead","description":"Plain text. Clients must show ``body`` as text, never as HTML."},"DislikeResult":{"properties":{"disliked":{"type":"boolean","title":"Disliked"},"dislike_count":{"type":"integer","title":"Dislike Count"},"liked":{"type":"boolean","title":"Liked"},"like_count":{"type":"integer","title":"Like Count"}},"type":"object","required":["disliked","dislike_count","liked","like_count"],"title":"DislikeResult"},"FinalVideoInput":{"properties":{"object_key":{"type":"string","maxLength":1024,"minLength":1,"title":"Object Key"},"content_type":{"type":"string","title":"Content Type","default":"video/mp4"},"byte_size":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Byte Size"},"thumbnail_object_key":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Thumbnail Object Key"},"thumbnail_content_type":{"type":"string","title":"Thumbnail Content Type","default":"image/jpeg"},"duration_seconds":{"type":"number","maximum":86400.0,"exclusiveMinimum":0.0,"title":"Duration Seconds"},"width":{"type":"integer","maximum":7680.0,"exclusiveMinimum":0.0,"title":"Width"},"height":{"type":"integer","maximum":4320.0,"exclusiveMinimum":0.0,"title":"Height"},"codec":{"type":"string","maxLength":32,"minLength":1,"title":"Codec","default":"h264"}},"type":"object","required":["object_key","duration_seconds","width","height"],"title":"FinalVideoInput"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HomeFeed":{"properties":{"shelves":{"items":{"$ref":"#/components/schemas/TopicShelf"},"type":"array","title":"Shelves"}},"type":"object","required":["shelves"],"title":"HomeFeed"},"LikeResult":{"properties":{"liked":{"type":"boolean","title":"Liked"},"like_count":{"type":"integer","title":"Like Count"},"disliked":{"type":"boolean","title":"Disliked"},"dislike_count":{"type":"integer","title":"Dislike Count"}},"type":"object","required":["liked","like_count","disliked","dislike_count"],"title":"LikeResult"},"PopularVideos":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VideoCard"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"PopularVideos"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"display_name":{"type":"string","maxLength":120,"minLength":1,"title":"Display Name"}},"type":"object","required":["email","password","display_name"],"title":"RegisterRequest"},"ReplyList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CommentRead"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"ReplyList"},"S3Location":{"properties":{"bucket":{"type":"string","title":"Bucket"},"object_key":{"type":"string","title":"Object Key"},"content_type":{"type":"string","title":"Content Type"},"byte_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Byte Size"},"url":{"type":"string","title":"Url"}},"type":"object","required":["bucket","object_key","content_type","url"],"title":"S3Location"},"SceneClipInput":{"properties":{"scene_id":{"type":"string","format":"uuid","title":"Scene Id"},"clip_object_key":{"type":"string","maxLength":1024,"minLength":1,"title":"Clip Object Key"},"clip_content_type":{"type":"string","title":"Clip Content Type","default":"video/mp4"},"clip_byte_size":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Clip Byte Size"},"audio_object_key":{"type":"string","maxLength":1024,"minLength":1,"title":"Audio Object Key"},"audio_content_type":{"type":"string","title":"Audio Content Type","default":"audio/wav"},"audio_byte_size":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Audio Byte Size"}},"type":"object","required":["scene_id","clip_object_key","audio_object_key"],"title":"SceneClipInput"},"SceneInput":{"properties":{"timestamp_seconds":{"type":"integer","minimum":0.0,"title":"Timestamp Seconds"},"start_image_prompt":{"type":"string","maxLength":4000,"title":"Start Image Prompt","default":""},"video_prompt":{"type":"string","maxLength":4000,"minLength":1,"title":"Video Prompt"},"narrator_script":{"type":"string","maxLength":2000,"minLength":1,"title":"Narrator Script"},"character_names":{"items":{"type":"string"},"type":"array","maxItems":3,"minItems":1,"title":"Character Names"}},"type":"object","required":["timestamp_seconds","video_prompt","narrator_script","character_names"],"title":"SceneInput"},"SceneRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"position":{"type":"integer","title":"Position"},"timestamp_seconds":{"type":"integer","title":"Timestamp Seconds"},"start_image_prompt":{"type":"string","title":"Start Image Prompt"},"video_prompt":{"type":"string","title":"Video Prompt"},"narrator_script":{"type":"string","title":"Narrator Script"},"character_names":{"items":{"type":"string"},"type":"array","title":"Character Names"},"start_image":{"anyOf":[{"$ref":"#/components/schemas/S3Location"},{"type":"null"}]},"clip":{"anyOf":[{"$ref":"#/components/schemas/S3Location"},{"type":"null"}]},"audio":{"anyOf":[{"$ref":"#/components/schemas/S3Location"},{"type":"null"}]}},"type":"object","required":["id","position","timestamp_seconds","start_image_prompt","video_prompt","narrator_script","character_names","start_image","clip","audio"],"title":"SceneRead"},"ScriptInput":{"properties":{"characters":{"items":{"$ref":"#/components/schemas/CharacterInput"},"type":"array","maxItems":20,"minItems":1,"title":"Characters"},"scenes":{"items":{"$ref":"#/components/schemas/SceneInput"},"type":"array","maxItems":40,"minItems":1,"title":"Scenes"}},"type":"object","required":["characters","scenes"],"title":"ScriptInput"},"SearchResults":{"properties":{"query":{"type":"string","title":"Query"},"items":{"items":{"$ref":"#/components/schemas/VideoCard"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["query","items","total"],"title":"SearchResults"},"StateMachineGraph":{"properties":{"states":{"items":{"$ref":"#/components/schemas/VideoStatus"},"type":"array","title":"States"},"terminal_states":{"items":{"$ref":"#/components/schemas/VideoStatus"},"type":"array","title":"Terminal States"},"transitions":{"items":{"$ref":"#/components/schemas/TransitionRuleRead"},"type":"array","title":"Transitions"}},"type":"object","required":["states","terminal_states","transitions"],"title":"StateMachineGraph"},"Token":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token"],"title":"Token"},"TopicCreate":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":2000,"title":"Description","default":""},"slug":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Slug"}},"type":"object","required":["name"],"title":"TopicCreate"},"TopicPage":{"properties":{"topic":{"$ref":"#/components/schemas/TopicRead"},"items":{"items":{"$ref":"#/components/schemas/VideoCard"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["topic","items","total"],"title":"TopicPage"},"TopicRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","slug","name","description","created_at"],"title":"TopicRead"},"TopicShelf":{"properties":{"topic":{"$ref":"#/components/schemas/TopicRead"},"items":{"items":{"$ref":"#/components/schemas/VideoCard"},"type":"array","title":"Items"}},"type":"object","required":["topic","items"],"title":"TopicShelf"},"TransitionRuleRead":{"properties":{"from_status":{"$ref":"#/components/schemas/VideoStatus"},"event":{"$ref":"#/components/schemas/VideoEvent"},"to_status":{"anyOf":[{"$ref":"#/components/schemas/VideoStatus"},{"type":"null"}]}},"type":"object","required":["from_status","event"],"title":"TransitionRuleRead"},"UserProfile":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"is_guest":{"type":"boolean","title":"Is Guest"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"video_count":{"type":"integer","title":"Video Count"}},"type":"object","required":["id","display_name","is_guest","created_at","video_count"],"title":"UserProfile","description":"What anyone may see about a user. No email."},"UserRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"display_name":{"type":"string","title":"Display Name"},"is_guest":{"type":"boolean","title":"Is Guest"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","display_name","is_guest","is_active","created_at"],"title":"UserRead","description":"The signed-in user's own account."},"UserVideos":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VideoCard"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"UserVideos"},"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"},"VideoCard":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"creator_id":{"type":"string","format":"uuid","title":"Creator Id"},"creator_name":{"type":"string","title":"Creator Name"},"creator_is_guest":{"type":"boolean","title":"Creator Is Guest","default":false},"topic_slug":{"type":"string","title":"Topic Slug"},"topic_name":{"type":"string","title":"Topic Name"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"view_count":{"type":"integer","title":"View Count"},"ready_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ready At"}},"type":"object","required":["id","title","creator_id","creator_name","topic_slug","topic_name","thumbnail_url","duration_seconds","view_count","ready_at"],"title":"VideoCard"},"VideoCreate":{"properties":{"topic_id":{"type":"string","format":"uuid","title":"Topic Id"},"title":{"type":"string","maxLength":120,"minLength":1,"title":"Title"},"prompt":{"type":"string","maxLength":8000,"minLength":1,"title":"Prompt"},"description":{"type":"string","maxLength":5000,"title":"Description","default":""}},"type":"object","required":["topic_id","title","prompt"],"title":"VideoCreate"},"VideoDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"prompt":{"type":"string","title":"Prompt"},"status":{"$ref":"#/components/schemas/VideoStatus"},"resume_status":{"anyOf":[{"$ref":"#/components/schemas/VideoStatus"},{"type":"null"}]},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"attempt_count":{"type":"integer","title":"Attempt Count"},"view_count":{"type":"integer","title":"View Count"},"like_count":{"type":"integer","title":"Like Count"},"dislike_count":{"type":"integer","title":"Dislike Count"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"video_codec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Codec"},"allowed_events":{"items":{"$ref":"#/components/schemas/VideoEvent"},"type":"array","title":"Allowed Events"},"topic":{"$ref":"#/components/schemas/TopicRead"},"characters":{"items":{"$ref":"#/components/schemas/CharacterRead"},"type":"array","title":"Characters"},"scenes":{"items":{"$ref":"#/components/schemas/SceneRead"},"type":"array","title":"Scenes"},"final_video":{"anyOf":[{"$ref":"#/components/schemas/S3Location"},{"type":"null"}]},"thumbnail":{"anyOf":[{"$ref":"#/components/schemas/S3Location"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"status_changed_at":{"type":"string","format":"date-time","title":"Status Changed At"},"ready_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ready At"},"queue_ahead":{"type":"integer","title":"Queue Ahead","default":0},"remaining_low_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining Low Seconds"},"remaining_high_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining High Seconds"},"overdue":{"type":"boolean","title":"Overdue","default":false},"progress_ratio":{"type":"number","title":"Progress Ratio","default":0}},"type":"object","required":["id","owner_id","title","description","prompt","status","resume_status","failure_reason","attempt_count","view_count","like_count","dislike_count","duration_seconds","width","height","video_codec","allowed_events","topic","characters","scenes","final_video","thumbnail","created_at","updated_at","status_changed_at","ready_at"],"title":"VideoDetail"},"VideoEvent":{"type":"string","enum":["start","succeed","fail","retry","cancel"],"title":"VideoEvent"},"VideoEventRequest":{"properties":{"event":{"$ref":"#/components/schemas/VideoEvent","description":"Event to apply. The next stage depends on the current one."},"reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason"},"script":{"anyOf":[{"$ref":"#/components/schemas/ScriptInput"},{"type":"null"}]},"character_images":{"anyOf":[{"items":{"$ref":"#/components/schemas/CharacterImageInput"},"type":"array","minItems":1},{"type":"null"}],"title":"Character Images"},"character_loras":{"anyOf":[{"items":{"$ref":"#/components/schemas/CharacterLoraInput"},"type":"array","minItems":1},{"type":"null"}],"title":"Character Loras"},"scene_clips":{"anyOf":[{"items":{"$ref":"#/components/schemas/SceneClipInput"},"type":"array","minItems":1},{"type":"null"}],"title":"Scene Clips"},"final_video":{"anyOf":[{"$ref":"#/components/schemas/FinalVideoInput"},{"type":"null"}]}},"type":"object","required":["event"],"title":"VideoEventRequest"},"VideoList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VideoSummary"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"VideoList"},"VideoProgress":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"prompt":{"type":"string","title":"Prompt"},"status":{"$ref":"#/components/schemas/VideoStatus"},"resume_status":{"anyOf":[{"$ref":"#/components/schemas/VideoStatus"},{"type":"null"}]},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"characters":{"items":{"$ref":"#/components/schemas/CharacterRead"},"type":"array","title":"Characters"},"scenes":{"items":{"$ref":"#/components/schemas/SceneRead"},"type":"array","title":"Scenes"},"queue_ahead":{"type":"integer","title":"Queue Ahead","default":0},"remaining_low_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining Low Seconds"},"remaining_high_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining High Seconds"},"overdue":{"type":"boolean","title":"Overdue","default":false},"progress_ratio":{"type":"number","title":"Progress Ratio","default":0}},"type":"object","required":["id","title","prompt","status","resume_status","failure_reason","characters","scenes"],"title":"VideoProgress"},"VideoStatus":{"type":"string","enum":["prompt","scripting","character_images","character_loras","scene_clips","concatenating","ready","failed","cancelled"],"title":"VideoStatus"},"VideoSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"prompt":{"type":"string","title":"Prompt"},"status":{"$ref":"#/components/schemas/VideoStatus"},"topic":{"$ref":"#/components/schemas/TopicRead"},"allowed_events":{"items":{"$ref":"#/components/schemas/VideoEvent"},"type":"array","title":"Allowed Events"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"view_count":{"type":"integer","title":"View Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"ready_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ready At"}},"type":"object","required":["id","title","prompt","status","topic","allowed_events","thumbnail_url","view_count","created_at","ready_at"],"title":"VideoSummary"},"VideoTransitionRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"video_id":{"type":"string","format":"uuid","title":"Video Id"},"from_status":{"$ref":"#/components/schemas/VideoStatus"},"to_status":{"$ref":"#/components/schemas/VideoStatus"},"event":{"$ref":"#/components/schemas/VideoEvent"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"actor_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","video_id","from_status","to_status","event","reason","actor_user_id","created_at"],"title":"VideoTransitionRead"},"WatchScene":{"properties":{"position":{"type":"integer","title":"Position"},"timestamp_seconds":{"type":"integer","title":"Timestamp Seconds"},"narrator_script":{"type":"string","title":"Narrator Script"}},"type":"object","required":["position","timestamp_seconds","narrator_script"],"title":"WatchScene"},"WatchVideo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"prompt":{"type":"string","title":"Prompt"},"topic":{"$ref":"#/components/schemas/TopicRead"},"creator_id":{"type":"string","format":"uuid","title":"Creator Id"},"creator_name":{"type":"string","title":"Creator Name"},"creator_is_guest":{"type":"boolean","title":"Creator Is Guest","default":false},"playback":{"$ref":"#/components/schemas/S3Location"},"thumbnail":{"anyOf":[{"$ref":"#/components/schemas/S3Location"},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"view_count":{"type":"integer","title":"View Count"},"like_count":{"type":"integer","title":"Like Count"},"dislike_count":{"type":"integer","title":"Dislike Count"},"liked_by_me":{"type":"boolean","title":"Liked By Me"},"disliked_by_me":{"type":"boolean","title":"Disliked By Me"},"ready_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ready At"},"scenes":{"items":{"$ref":"#/components/schemas/WatchScene"},"type":"array","title":"Scenes"},"related":{"items":{"$ref":"#/components/schemas/VideoCard"},"type":"array","title":"Related"}},"type":"object","required":["id","title","description","prompt","topic","creator_id","creator_name","playback","thumbnail","duration_seconds","width","height","view_count","like_count","dislike_count","liked_by_me","disliked_by_me","ready_at","scenes","related"],"title":"WatchVideo"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/auth/token"}}}}}}