{"openapi":"3.1.0","info":{"title":"Toast API","version":"1.0.0","description":"The `/v1` server API (epic #762). `/v1/ai/*` are the reasoning endpoints — each the server-side relocation of one client Call, exchanging only edit-decision metadata. `/v1/audio/*` are the thin pre-processing endpoints (denoise, transcribe) — the only steps that touch a paid external service; they take AUDIO (never video, which stays on-device)."},"servers":[{"url":"https://api.toast.video/v1"}],"components":{"securitySchemes":{"clerkJwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Clerk-issued JWT. Send as `Authorization: Bearer <token>`."}},"schemas":{"ErrorEnvelope":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_input","unauthenticated","forbidden","not_found","rate_limit_exceeded","user_quota_exhausted","platform_budget_exhausted","ai_upstream_failed","internal","idempotency_conflict","job_not_cancellable","plan_in_progress","asset_bytes_missing"]},"message":{"type":"string"},"status":{"type":"integer"},"request_id":{"type":"string"},"retry_after":{"type":"integer"},"details":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"string"}},"startedAt":{"type":"string"}}}},"required":["code","message","status","request_id"]}},"required":["error"]},"AiDegraded":{"type":"object","properties":{"status":{"type":"string","enum":["degraded"]},"call":{"type":"string","enum":["segment","broll","effects","viral-clips","music-mood","transitions","converse","beats","roman-captions","translate"]},"reason":{"type":"string","enum":["invalid_input","unauthenticated","forbidden","not_found","rate_limit_exceeded","user_quota_exhausted","platform_budget_exhausted","ai_upstream_failed","internal","idempotency_conflict","job_not_cancellable","plan_in_progress","asset_bytes_missing"]},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"promptVersion":{"type":"string"},"promptFlags":{"type":"object","properties":{"editorialPreamble":{"type":"boolean"},"textIntentV2":{"type":"boolean"},"effectLayerMeta":{"type":"boolean"},"catalogOverlayAi":{"type":"boolean"}},"required":["editorialPreamble","textIntentV2","effectLayerMeta","catalogOverlayAi"]},"model":{"type":"string"},"cache":{"type":"string","enum":["hit","miss"]}}}},"required":["status","call","reason"]},"aiSegmentResponseOk":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["keep","removed"]},"quality_score":{"type":"number","minimum":0,"maximum":10},"removal_reason":{"type":["string","null"]},"ai_confidence":{"type":"number","minimum":0,"maximum":1},"editorial_role":{"type":"string","enum":["hook","setup","context","example","story","proof","stat","objection","resolution","summary","cta"]}},"required":["id","type","quality_score","removal_reason","ai_confidence"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_ms":{"type":"integer","minimum":0}},"required":["id","title","start_ms"]}},"highlight_ids":{"type":"array","items":{"type":"string"}},"intra_sentence_cuts":{"type":"array","items":{"type":"object","properties":{"sentence_id":{"type":"string"},"cut_start_ms":{"type":"integer","minimum":0},"cut_end_ms":{"type":"integer","minimum":0}},"required":["sentence_id","cut_start_ms","cut_end_ms"]}},"cultural_context":{"type":"object","properties":{"region":{"type":"string"},"audience_region":{"type":"string"},"scope":{"type":"string","enum":["subject","speaker"]},"language":{"type":"string"},"confidence":{"type":"string","enum":["low","medium","high"]},"user_declared":{"type":"boolean"},"signals":{"type":"object","properties":{"places":{"type":"array","items":{"type":"string"}},"public_figures":{"type":"array","items":{"type":"string"}},"foods":{"type":"array","items":{"type":"string"}},"garments":{"type":"array","items":{"type":"string"}},"holidays":{"type":"array","items":{"type":"string"}},"code_switch_tokens":{"type":"array","items":{"type":"string"}},"time_periods":{"type":"array","items":{"type":"string"}}},"required":["places","public_figures","foods","garments","holidays","code_switch_tokens","time_periods"]},"inferred_at":{"type":"string"},"rationale":{"type":"string"},"named_entities":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["brand","person","place","product","app","number","stat"]},"text":{"type":"string"},"word_start_ms":{"type":"integer","minimum":0},"word_end_ms":{"type":"integer","minimum":0},"segment_id":{"type":"string"},"salience":{"type":"number","minimum":0,"maximum":1},"canonical_name":{"type":"string","minLength":1,"maxLength":200},"context":{"type":"string","minLength":1,"maxLength":80},"speaker_own":{"type":"boolean","enum":[true]}},"required":["type","text","word_start_ms","word_end_ms"]}}},"required":["named_entities"]},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"promptVersion":{"type":"string"},"promptFlags":{"type":"object","properties":{"editorialPreamble":{"type":"boolean"},"textIntentV2":{"type":"boolean"},"effectLayerMeta":{"type":"boolean"},"catalogOverlayAi":{"type":"boolean"}},"required":["editorialPreamble","textIntentV2","effectLayerMeta","catalogOverlayAi"]},"model":{"type":"string"},"cache":{"type":"string","enum":["hit","miss"]}},"required":["requestId","promptVersion"]}},"required":["status","segments","chapters","highlight_ids","intra_sentence_cuts"]},"aiSegmentResponse":{"oneOf":[{"$ref":"#/components/schemas/aiSegmentResponseOk"},{"$ref":"#/components/schemas/AiDegraded"}],"discriminator":{"propertyName":"status","mapping":{"ok":"#/components/schemas/aiSegmentResponseOk","degraded":"#/components/schemas/AiDegraded"}}},"aiSegmentRequest":{"type":"object","properties":{"projectId":{"type":"string"},"transcript":{"type":"object","properties":{"language_code":{"type":"string"},"duration_ms":{"type":"integer","minimum":0},"speakers":{"type":"array","items":{"type":"string"}},"sentences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":0},"speaker_id":{"type":"string"},"quality_score":{"type":"number","minimum":0,"maximum":10},"words":{"type":"array","items":{"type":"object","properties":{"word":{"type":"string"},"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":0},"speaker_id":{"type":"string"},"confidence":{"type":"number"}},"required":["word","start_ms","end_ms","speaker_id","confidence"]}},"fillers":{"type":"array","items":{"type":"string"}},"is_protected":{"type":"boolean"}},"required":["id","text","start_ms","end_ms","speaker_id","quality_score","words","fillers","is_protected"]}}},"required":["language_code","duration_ms","speakers","sentences"]},"contentType":{"type":"string"},"options":{"type":"object","properties":{"editorial_role":{"type":"boolean","default":false},"style_prior":{}}}}},"aiBrollResponseOk":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"suggestions":{"type":"array","items":{"type":"object","properties":{"segment_id":{"type":"string"},"keywords":{"type":"array","items":{"type":"string"},"minItems":1},"rationale":{"type":"string"},"placement":{"type":"string","enum":["cutaway","pip"]},"topic_region":{"type":"string"},"topic_rationale":{"type":"string"},"media_type":{"type":"string","enum":["video","image","gif"],"default":"video"},"flash_kind":{"type":"string","enum":["entity","concept","stat","app_ui","cutaway"]}},"required":["segment_id","keywords","rationale","placement"]}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"promptVersion":{"type":"string"},"promptFlags":{"type":"object","properties":{"editorialPreamble":{"type":"boolean"},"textIntentV2":{"type":"boolean"},"effectLayerMeta":{"type":"boolean"},"catalogOverlayAi":{"type":"boolean"}},"required":["editorialPreamble","textIntentV2","effectLayerMeta","catalogOverlayAi"]},"model":{"type":"string"},"cache":{"type":"string","enum":["hit","miss"]}},"required":["requestId","promptVersion"]}},"required":["status","suggestions"]},"aiBrollResponse":{"oneOf":[{"$ref":"#/components/schemas/aiBrollResponseOk"},{"$ref":"#/components/schemas/AiDegraded"}],"discriminator":{"propertyName":"status","mapping":{"ok":"#/components/schemas/aiBrollResponseOk","degraded":"#/components/schemas/AiDegraded"}}},"aiBrollRequest":{"type":"object","properties":{"projectId":{"type":"string"},"languageCode":{"type":"string"},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"description":"The OUTPUT shape of the video. POST /ai/beats plans a talking-head video FOR this shape (#1898): 9:16, 4:5 and 1:1 get fewer, shorter, bigger cards (graphics at least 3.5-4 s apart, no `supporting` emphasis, the opening card a hero); 16:9 is planned as before. A client keeps one plan per shape and asks again only for a shape it has no plan for. A faceless plan ignores it."},"contentType":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"in_ms":{"type":"integer","minimum":0},"out_ms":{"type":"integer","minimum":0},"transcript":{"type":"string"},"speaker_id":{"type":"string"},"quality_score":{"type":"number","minimum":0,"maximum":10},"editorial_role":{"type":"string","enum":["hook","setup","context","example","story","proof","stat","objection","resolution","summary","cta"]}},"required":["id","in_ms","out_ms","transcript","speaker_id","quality_score"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_ms":{"type":"integer","minimum":0}},"required":["id","title","start_ms"]}},"highlights":{"type":"array","items":{"type":"string"}},"stylePrior":{},"broll_density":{"type":"string","enum":["light","medium","heavy","full"],"default":"medium"},"cultural_context":{}},"required":["languageCode","aspectRatio","segments","chapters","highlights"]},"aiEffectsResponseOk":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"effects":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"segment_id":{"type":"string"},"rationale":{"type":"string"},"params":{"type":"object","additionalProperties":{}},"keyframes":{"type":"array","items":{},"default":[]}},"required":["type","segment_id","params"]}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"promptVersion":{"type":"string"},"promptFlags":{"type":"object","properties":{"editorialPreamble":{"type":"boolean"},"textIntentV2":{"type":"boolean"},"effectLayerMeta":{"type":"boolean"},"catalogOverlayAi":{"type":"boolean"}},"required":["editorialPreamble","textIntentV2","effectLayerMeta","catalogOverlayAi"]},"model":{"type":"string"},"cache":{"type":"string","enum":["hit","miss"]}},"required":["requestId","promptVersion"]}},"required":["status","effects"]},"aiEffectsResponse":{"oneOf":[{"$ref":"#/components/schemas/aiEffectsResponseOk"},{"$ref":"#/components/schemas/AiDegraded"}],"discriminator":{"propertyName":"status","mapping":{"ok":"#/components/schemas/aiEffectsResponseOk","degraded":"#/components/schemas/AiDegraded"}}},"aiEffectsRequest":{"type":"object","properties":{"projectId":{"type":"string"},"languageCode":{"type":"string"},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"description":"The OUTPUT shape of the video. POST /ai/beats plans a talking-head video FOR this shape (#1898): 9:16, 4:5 and 1:1 get fewer, shorter, bigger cards (graphics at least 3.5-4 s apart, no `supporting` emphasis, the opening card a hero); 16:9 is planned as before. A client keeps one plan per shape and asks again only for a shape it has no plan for. A faceless plan ignores it."},"contentType":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"in_ms":{"type":"integer","minimum":0},"out_ms":{"type":"integer","minimum":0},"transcript":{"type":"string"},"speaker_id":{"type":"string"},"quality_score":{"type":"number","minimum":0,"maximum":10},"editorial_role":{"type":"string","enum":["hook","setup","context","example","story","proof","stat","objection","resolution","summary","cta"]}},"required":["id","in_ms","out_ms","transcript","speaker_id","quality_score"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_ms":{"type":"integer","minimum":0}},"required":["id","title","start_ms"]}},"highlights":{"type":"array","items":{"type":"string"}},"stylePrior":{},"broll_segment_ids":{"type":"array","items":{"type":"string"}}},"required":["languageCode","aspectRatio","segments","chapters","highlights","broll_segment_ids"]},"aiBeatsResponseOk":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"beats":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["card","zoom","text","transition"],"description":"card: an hf_card effect (cardId + slots from GET /v1/cards/catalog). zoom: a punch-in on the speaker (scale). text: words drawn on screen (text). transition: reserved."},"start_ms":{"type":"number","description":"Source ms: the first anchor word’s start."},"end_ms":{"type":"number","description":"Source ms. A zoom never runs past the end of the segment its words are in. A card or text stays ON SCREEN for the longest of: its default; its reading time (1.5 s + its words at the SPEAKER'S OWN PACE, read off the word timings, at most 8 s); and, when it shows words that are said, until they have been said + 0.5 s. Removed spans are skipped when kept_ranges was sent, and it may run into the next segment. The next overlay in its region still cuts it short; none is dropped for it."},"anchor":{"type":"string","description":"The spoken words the beat lands on, as the model quoted them."},"segment_id":{"type":"string"},"cardId":{"type":"string"},"slots":{"type":"object","additionalProperties":{"type":"string"}},"emphasis":{"type":"string","enum":["hero","normal","supporting"],"description":"kind=card: how much the words matter, as the planner judged them. A client draws the card at CARD_EMPHASIS_FACTOR of its box (hero 1.35, normal 1, supporting 0.8; @toast/shared cardSizeFactor), still capped by the room above the speaker's head. Absent = normal. A size the user set wins."},"mode":{"type":"string","enum":["frame"],"description":"kind=card: `frame` when the catalog row is drawn FULL SCREEN by default (its `modes` lists `frame` first — a code window, a terminal): send it as `mode` on POST /v1/cards/render at the full output size and draw it over the whole picture. Absent = an overlay, as every card before."},"backdrop":{"type":"string","enum":["aurora","grid","pulse","dots","mesh","blobs","flow","swirl","rays","plasma","strands"],"description":"kind=card with mode=frame, FACELESS only (session 97): the moving ground to draw the frame on, the same for every frame card of the video, chosen from its drawing style. Send it as `backdrop` on POST /v1/cards/render. Absent = the default dark ground."},"scale":{"type":"number"},"shake":{"type":"boolean","description":"kind=zoom (session 100): an IMPACT punch-in that also shakes. A client adds a camera_shake effect (DEFAULT_CAMERA_SHAKE, @toast/shared) from start_ms for SHAKE_MS (700 ms, @toast/ai-core beatsToEffects) alongside the zoom. At most one per 30 s. Absent = a plain punch-in."},"text":{"type":"string"},"rationale":{"type":"string"}},"required":["kind","start_ms","end_ms","anchor","segment_id"]},"description":"Sorted by start. At least 1.2 s apart, and at most one card or text on screen at a time."},"dropped":{"type":"array","items":{"type":"object","properties":{"anchor":{"type":"string"},"kind":{"type":"string"},"reason":{"type":"string"},"cardId":{"type":"string","description":"The catalog item a dropped card named, when it named one."}},"required":["anchor","kind","reason"]},"description":"Beats the model planned that could not be placed, each with the reason. For logs and review; a client need not show them."},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"promptVersion":{"type":"string"},"promptFlags":{"type":"object","properties":{"editorialPreamble":{"type":"boolean"},"textIntentV2":{"type":"boolean"},"effectLayerMeta":{"type":"boolean"},"catalogOverlayAi":{"type":"boolean"}},"required":["editorialPreamble","textIntentV2","effectLayerMeta","catalogOverlayAi"]},"model":{"type":"string"},"cache":{"type":"string","enum":["hit","miss"]}},"required":["requestId","promptVersion"]}},"required":["status","beats","dropped"]},"aiBeatsResponse":{"oneOf":[{"$ref":"#/components/schemas/aiBeatsResponseOk"},{"$ref":"#/components/schemas/AiDegraded"}],"discriminator":{"propertyName":"status","mapping":{"ok":"#/components/schemas/aiBeatsResponseOk","degraded":"#/components/schemas/AiDegraded"}}},"aiBeatsRequest":{"type":"object","properties":{"projectId":{"type":"string"},"languageCode":{"type":"string"},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"description":"The OUTPUT shape of the video. POST /ai/beats plans a talking-head video FOR this shape (#1898): 9:16, 4:5 and 1:1 get fewer, shorter, bigger cards (graphics at least 3.5-4 s apart, no `supporting` emphasis, the opening card a hero); 16:9 is planned as before. A client keeps one plan per shape and asks again only for a shape it has no plan for. A faceless plan ignores it."},"contentType":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"in_ms":{"type":"integer","minimum":0},"out_ms":{"type":"integer","minimum":0},"transcript":{"type":"string"},"speaker_id":{"type":"string"},"quality_score":{"type":"number","minimum":0,"maximum":10},"editorial_role":{"type":"string","enum":["hook","setup","context","example","story","proof","stat","objection","resolution","summary","cta"]}},"required":["id","in_ms","out_ms","transcript","speaker_id","quality_score"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_ms":{"type":"integer","minimum":0}},"required":["id","title","start_ms"]}},"highlights":{"type":"array","items":{"type":"string"}},"stylePrior":{},"words":{"type":"array","items":{"type":"object","properties":{"word":{"type":"string"},"start_ms":{"type":"number"},"end_ms":{"type":"number"}},"required":["word","start_ms","end_ms"]},"maxItems":40000,"description":"Word timings of the transcript (source ms). Words outside the kept segments are ignored."},"kept_ranges":{"type":"array","items":{"type":"object","properties":{"in_ms":{"type":"number"},"out_ms":{"type":"number"}},"required":["in_ms","out_ms"]},"maxItems":20000,"description":"What the export KEEPS, in source ms (the web client sends buildExportPlan(manifest).ranges): everything between two ranges is removed (intra-sentence cuts, silences, word cuts). With it, a card is timed in ON-SCREEN time, so one whose window crosses a cut is extended past it. Timings only; not sent to the model. Omit it and windows are measured in source time, as before."},"hand_placed":{"type":"array","items":{"type":"object","properties":{"card_id":{"type":"string","maxLength":120},"start_ms":{"type":"number"},"end_ms":{"type":"number"}},"required":["card_id","start_ms","end_ms"]},"maxItems":500,"description":"The cards the USER placed by hand (effects with user_authored), in source ms: the catalog id and the window, never the words. A re-analyze keeps them, so the plan must not fight them: an AI TRANSITION that would land on a hand-placed transition is dropped (#1053 E11; IMG_2932 drew the AI flash over the user's scribble and the export memory budget dropped the scribble). Timings and ids only; not sent to the model. Omit it and nothing is reserved, as before."},"pictures":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":24,"description":"TALKING-HEAD only (session 101): the library asset ids of the pictures already in this video (the web client sends each image B-roll overlay's `asset_id`: the licensed photos of the people and companies it names). The server checks each is the caller's and may go on a card, writes a short caption for it itself (the asset's stored caption), and lists it for the planner as a ref (\"P1\") with that caption, so a picture card can gather them. Ids only from the client; never the picture, its id or its URL to the model. Ignored for a faceless project, whose pictures the server reads from its scene plan. Omit it and no picture card is offered, as before."}},"required":["languageCode","aspectRatio","segments","chapters","highlights","words"]},"aiRomanCaptionsResponseOk":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"words":{"type":"array","items":{"type":"string"}},"romanized":{"type":"integer","minimum":0},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"promptVersion":{"type":"string"},"promptFlags":{"type":"object","properties":{"editorialPreamble":{"type":"boolean"},"textIntentV2":{"type":"boolean"},"effectLayerMeta":{"type":"boolean"},"catalogOverlayAi":{"type":"boolean"}},"required":["editorialPreamble","textIntentV2","effectLayerMeta","catalogOverlayAi"]},"model":{"type":"string"},"cache":{"type":"string","enum":["hit","miss"]}},"required":["requestId","promptVersion"]}},"required":["status","words","romanized"]},"aiRomanCaptionsResponse":{"oneOf":[{"$ref":"#/components/schemas/aiRomanCaptionsResponseOk"},{"$ref":"#/components/schemas/AiDegraded"}],"discriminator":{"propertyName":"status","mapping":{"ok":"#/components/schemas/aiRomanCaptionsResponseOk","degraded":"#/components/schemas/AiDegraded"}}},"aiRomanCaptionsRequest":{"type":"object","properties":{"projectId":{"type":"string"},"languageCode":{"type":"string","minLength":1,"maxLength":16},"words":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":300}},"required":["languageCode","words"]},"aiTranslateResponseOk":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"lines":{"type":"array","items":{"type":"string"}},"cards":{"type":"array","items":{"type":"object","properties":{"slots":{"type":"object","additionalProperties":{"type":"string"}}},"required":["slots"]}},"translated":{"type":"integer","minimum":0},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"promptVersion":{"type":"string"},"promptFlags":{"type":"object","properties":{"editorialPreamble":{"type":"boolean"},"textIntentV2":{"type":"boolean"},"effectLayerMeta":{"type":"boolean"},"catalogOverlayAi":{"type":"boolean"}},"required":["editorialPreamble","textIntentV2","effectLayerMeta","catalogOverlayAi"]},"model":{"type":"string"},"cache":{"type":"string","enum":["hit","miss"]}},"required":["requestId","promptVersion"]}},"required":["status","lines","cards","translated"]},"aiTranslateResponse":{"oneOf":[{"$ref":"#/components/schemas/aiTranslateResponseOk"},{"$ref":"#/components/schemas/AiDegraded"}],"discriminator":{"propertyName":"status","mapping":{"ok":"#/components/schemas/aiTranslateResponseOk","degraded":"#/components/schemas/AiDegraded"}}},"aiTranslateRequest":{"type":"object","properties":{"projectId":{"type":"string"},"sourceLanguage":{"type":"string","minLength":1,"maxLength":16},"targetLanguage":{"type":"string","minLength":2,"maxLength":16},"lines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":600},"maxItems":80,"default":[]},"cards":{"type":"array","items":{"type":"object","properties":{"slots":{"type":"object","additionalProperties":{"type":"string","maxLength":400}}},"required":["slots"]},"maxItems":40,"default":[]}},"required":["sourceLanguage","targetLanguage"]},"aiViralClipsResponseOk":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"clips":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"start_segment_id":{"type":"string"},"end_segment_id":{"type":"string"},"hook_segment_id":{"type":"string"},"virality_score":{"type":"number","minimum":0,"maximum":10},"platform_fit":{"type":"string","enum":["tiktok","reels","shorts"]},"rationale":{"type":"string"}},"required":["title","start_segment_id","end_segment_id","hook_segment_id","virality_score","platform_fit","rationale"]},"maxItems":10},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"promptVersion":{"type":"string"},"promptFlags":{"type":"object","properties":{"editorialPreamble":{"type":"boolean"},"textIntentV2":{"type":"boolean"},"effectLayerMeta":{"type":"boolean"},"catalogOverlayAi":{"type":"boolean"}},"required":["editorialPreamble","textIntentV2","effectLayerMeta","catalogOverlayAi"]},"model":{"type":"string"},"cache":{"type":"string","enum":["hit","miss"]}},"required":["requestId","promptVersion"]}},"required":["status","clips"]},"aiViralClipsResponse":{"oneOf":[{"$ref":"#/components/schemas/aiViralClipsResponseOk"},{"$ref":"#/components/schemas/AiDegraded"}],"discriminator":{"propertyName":"status","mapping":{"ok":"#/components/schemas/aiViralClipsResponseOk","degraded":"#/components/schemas/AiDegraded"}}},"aiViralClipsRequest":{"type":"object","properties":{"projectId":{"type":"string"},"languageCode":{"type":"string"},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"description":"The OUTPUT shape of the video. POST /ai/beats plans a talking-head video FOR this shape (#1898): 9:16, 4:5 and 1:1 get fewer, shorter, bigger cards (graphics at least 3.5-4 s apart, no `supporting` emphasis, the opening card a hero); 16:9 is planned as before. A client keeps one plan per shape and asks again only for a shape it has no plan for. A faceless plan ignores it."},"contentType":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"in_ms":{"type":"integer","minimum":0},"out_ms":{"type":"integer","minimum":0},"transcript":{"type":"string"},"speaker_id":{"type":"string"},"quality_score":{"type":"number","minimum":0,"maximum":10},"editorial_role":{"type":"string","enum":["hook","setup","context","example","story","proof","stat","objection","resolution","summary","cta"]}},"required":["id","in_ms","out_ms","transcript","speaker_id","quality_score"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_ms":{"type":"integer","minimum":0}},"required":["id","title","start_ms"]}},"highlights":{"type":"array","items":{"type":"string"}},"stylePrior":{},"duration_ms":{"type":"integer","minimum":0}},"required":["languageCode","aspectRatio","segments","chapters","highlights","duration_ms"]},"aiMusicMoodResponseOk":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"overall_mood":{"type":"string"},"genre":{"type":"string"},"energy":{"type":"string","enum":["verylow","low","medium","high","veryhigh"]},"keywords":{"type":"array","items":{"type":"string"}},"rationale":{"type":"string"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"promptVersion":{"type":"string"},"promptFlags":{"type":"object","properties":{"editorialPreamble":{"type":"boolean"},"textIntentV2":{"type":"boolean"},"effectLayerMeta":{"type":"boolean"},"catalogOverlayAi":{"type":"boolean"}},"required":["editorialPreamble","textIntentV2","effectLayerMeta","catalogOverlayAi"]},"model":{"type":"string"},"cache":{"type":"string","enum":["hit","miss"]}},"required":["requestId","promptVersion"]}},"required":["status","overall_mood","genre","energy","keywords","rationale"]},"aiMusicMoodResponse":{"oneOf":[{"$ref":"#/components/schemas/aiMusicMoodResponseOk"},{"$ref":"#/components/schemas/AiDegraded"}],"discriminator":{"propertyName":"status","mapping":{"ok":"#/components/schemas/aiMusicMoodResponseOk","degraded":"#/components/schemas/AiDegraded"}}},"aiMusicMoodRequest":{"type":"object","properties":{"projectId":{"type":"string"},"languageCode":{"type":"string"},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"description":"The OUTPUT shape of the video. POST /ai/beats plans a talking-head video FOR this shape (#1898): 9:16, 4:5 and 1:1 get fewer, shorter, bigger cards (graphics at least 3.5-4 s apart, no `supporting` emphasis, the opening card a hero); 16:9 is planned as before. A client keeps one plan per shape and asks again only for a shape it has no plan for. A faceless plan ignores it."},"contentType":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"in_ms":{"type":"integer","minimum":0},"out_ms":{"type":"integer","minimum":0},"transcript":{"type":"string"},"speaker_id":{"type":"string"},"quality_score":{"type":"number","minimum":0,"maximum":10},"editorial_role":{"type":"string","enum":["hook","setup","context","example","story","proof","stat","objection","resolution","summary","cta"]}},"required":["id","in_ms","out_ms","transcript","speaker_id","quality_score"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_ms":{"type":"integer","minimum":0}},"required":["id","title","start_ms"]}},"highlights":{"type":"array","items":{"type":"string"}},"stylePrior":{}},"required":["languageCode","aspectRatio","segments","chapters","highlights"]},"aiTransitionsResponseOk":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"transitions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"boundary_index":{"type":"number"},"rationale":{"type":"string"},"duration_ms":{"type":"number"},"params":{"type":"object","additionalProperties":{}},"alternative":{"type":"string"},"taste_swapped_from":{"type":"string"}},"required":["type","boundary_index","params"]}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"promptVersion":{"type":"string"},"promptFlags":{"type":"object","properties":{"editorialPreamble":{"type":"boolean"},"textIntentV2":{"type":"boolean"},"effectLayerMeta":{"type":"boolean"},"catalogOverlayAi":{"type":"boolean"}},"required":["editorialPreamble","textIntentV2","effectLayerMeta","catalogOverlayAi"]},"model":{"type":"string"},"cache":{"type":"string","enum":["hit","miss"]}},"required":["requestId","promptVersion"]}},"required":["status","transitions"]},"aiTransitionsResponse":{"oneOf":[{"$ref":"#/components/schemas/aiTransitionsResponseOk"},{"$ref":"#/components/schemas/AiDegraded"}],"discriminator":{"propertyName":"status","mapping":{"ok":"#/components/schemas/aiTransitionsResponseOk","degraded":"#/components/schemas/AiDegraded"}}},"aiTransitionsRequest":{"type":"object","properties":{"projectId":{"type":"string"},"languageCode":{"type":"string"},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"description":"The OUTPUT shape of the video. POST /ai/beats plans a talking-head video FOR this shape (#1898): 9:16, 4:5 and 1:1 get fewer, shorter, bigger cards (graphics at least 3.5-4 s apart, no `supporting` emphasis, the opening card a hero); 16:9 is planned as before. A client keeps one plan per shape and asks again only for a shape it has no plan for. A faceless plan ignores it."},"contentType":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"in_ms":{"type":"integer","minimum":0},"out_ms":{"type":"integer","minimum":0},"transcript":{"type":"string"},"speaker_id":{"type":"string"},"quality_score":{"type":"number","minimum":0,"maximum":10},"editorial_role":{"type":"string","enum":["hook","setup","context","example","story","proof","stat","objection","resolution","summary","cta"]}},"required":["id","in_ms","out_ms","transcript","speaker_id","quality_score"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"start_ms":{"type":"integer","minimum":0}},"required":["id","title","start_ms"]}},"highlights":{"type":"array","items":{"type":"string"}},"stylePrior":{},"take_joins_ms":{"type":"array","items":{"type":"number"}},"cuts":{"type":"array","items":{"type":"object","properties":{"cut_ms":{"type":"number"},"kept_index":{"type":"integer","minimum":0},"before":{"type":"string","maxLength":200},"after":{"type":"string","maxLength":200}},"required":["cut_ms","kept_index","before","after"]},"maxItems":400}},"required":["languageCode","aspectRatio","segments","chapters","highlights"]},"aiConverseResponseOk":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"reply":{"type":"string"},"operations":{"type":"array","items":{"type":"object","properties":{"op":{"type":"string"},"ids":{"type":"array","items":{"type":"string"}},"segment_id":{"type":"string"},"keyword":{"type":"string"},"placement":{"type":"string"},"scale":{"type":"number"},"anchor":{"type":"string"},"effect_type":{"type":"string"},"params":{"type":"object","additionalProperties":{}},"effect_id":{"type":"string"}},"required":["op"]}},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"promptVersion":{"type":"string"},"promptFlags":{"type":"object","properties":{"editorialPreamble":{"type":"boolean"},"textIntentV2":{"type":"boolean"},"effectLayerMeta":{"type":"boolean"},"catalogOverlayAi":{"type":"boolean"}},"required":["editorialPreamble","textIntentV2","effectLayerMeta","catalogOverlayAi"]},"model":{"type":"string"},"cache":{"type":"string","enum":["hit","miss"]}},"required":["requestId","promptVersion"]}},"required":["status","reply","operations"]},"aiConverseResponse":{"oneOf":[{"$ref":"#/components/schemas/aiConverseResponseOk"},{"$ref":"#/components/schemas/AiDegraded"}],"discriminator":{"propertyName":"status","mapping":{"ok":"#/components/schemas/aiConverseResponseOk","degraded":"#/components/schemas/AiDegraded"}}},"aiConverseRequest":{"type":"object","properties":{"projectId":{"type":"string"},"message":{"type":"string","minLength":1},"manifest_summary":{"type":"object","properties":{"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"in_ms":{"type":"integer","minimum":0},"transcript":{"type":"string"},"user_override":{"type":["string","null"]}},"required":["id","type","in_ms","transcript"]}},"chapters":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"start_ms":{"type":"integer","minimum":0}},"required":["title","start_ms"]}},"highlights":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"transcript":{"type":"string"}},"required":["id","transcript"]}},"effects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":0},"enabled":{"type":"boolean"}},"required":["id","type","start_ms","end_ms","enabled"]}},"broll_overlays":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"segment_id":{"type":"string"},"keyword":{"type":"string"},"placement":{"type":"string"},"enabled":{"type":"boolean"}},"required":["id","segment_id","keyword","placement","enabled"]}}},"required":["segments","chapters","highlights","effects","broll_overlays"]},"template":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"regions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"overlay":{"type":["object","null"],"properties":{"type":{"type":"string"}},"required":["type"]}},"required":["id","name","regions"]}},"required":["projectId","message","manifest_summary"]},"TranscribeResult":{"type":"object","properties":{"words":{"type":"array","items":{"type":"object","properties":{"word":{"type":"string"},"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":0},"speaker_id":{"type":"string"},"confidence":{"type":"number"}},"required":["word","start_ms","end_ms","speaker_id","confidence"]}},"audio_events":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["laughter","music","applause","coughing","noise"]},"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":0}},"required":["type","start_ms","end_ms"]}},"language_code":{"type":"string"},"meta":{"type":"object","properties":{"requestId":{"type":"string"},"promptVersion":{"type":"string"},"promptFlags":{"type":"object","properties":{"editorialPreamble":{"type":"boolean"},"textIntentV2":{"type":"boolean"},"effectLayerMeta":{"type":"boolean"},"catalogOverlayAi":{"type":"boolean"}},"required":["editorialPreamble","textIntentV2","effectLayerMeta","catalogOverlayAi"]},"model":{"type":"string"},"cache":{"type":"string","enum":["hit","miss"]}},"required":["requestId","promptVersion"]}},"required":["words","audio_events","language_code"]},"AsyncJobAccepted":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string","enum":["queued"]},"streamUrl":{"type":"string"},"pollUrl":{"type":"string"},"async":{"type":"boolean","enum":[true]}},"required":["jobId","status","streamUrl","pollUrl","async"]},"DictateResult":{"type":"object","properties":{"text":{"type":"string"},"language_code":{"type":["string","null"]},"duration_s":{"type":"number","minimum":0}},"required":["text","language_code","duration_s"]},"SpeakRequest":{"type":"object","properties":{"script":{"type":"string","minLength":1,"maxLength":50000},"projectId":{"type":"string"},"voiceId":{"type":"string"},"languageCode":{"type":"string"},"ownVoice":{"type":"object","properties":{"profileId":{"type":"string","minLength":1},"sampleBase64":{"type":"string","minLength":100}},"required":["profileId","sampleBase64"]}},"required":["script"]},"SpeakResult":{"type":"object","properties":{"audio_base64":{"type":"string"},"audio_mime":{"type":"string","enum":["audio/mpeg"]},"duration_ms":{"type":"integer","minimum":0},"transcript":{},"model":{"type":"string"},"voice_id":{"type":"string"},"billed_characters":{"type":"integer","minimum":0},"speech_usage_id":{"type":"string"},"own_voice_minutes":{"type":"number","minimum":0}},"required":["audio_base64","audio_mime","duration_ms","model","voice_id","billed_characters"]},"Project":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"aspect":{"type":["string","null"],"enum":["16:9","9:16","1:1","4:5"]},"status":{"type":"string"},"languageCode":{"type":"string"},"detectedLanguageCode":{"type":["string","null"]},"durationMs":{"type":["integer","null"]},"fileSizeBytes":{"type":["number","null"]},"clipCount":{"type":["integer","null"]},"width":{"type":["integer","null"]},"height":{"type":["integer","null"]},"audioQuality":{"type":["string","null"]},"snrDb":{"type":["number","null"]},"neededIsolation":{"type":["boolean","null"]},"silenceRatio":{"type":["number","null"]},"speakerCount":{"type":["integer","null"]},"wordCount":{"type":["integer","null"]},"imageQuality":{"type":["string","null"]},"pictureSource":{"type":["string","null"]},"speakerName":{"type":["string","null"]},"speakerRole":{"type":["string","null"]},"editVersion":{"type":"integer"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","title","kind","aspect","status","languageCode","detectedLanguageCode","durationMs","fileSizeBytes","clipCount","width","height","audioQuality","snrDb","neededIsolation","silenceRatio","speakerCount","wordCount","editVersion","createdAt","updatedAt"]},"Job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"type":{"type":"string","enum":["transcribe","denoise","reason","export","analyze","segment","generate","render_cards","animate"]},"status":{"type":"string","enum":["pending","queued","running","awaiting_input","done","failed","cancelled"]},"webhookState":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"retryCount":{"type":"integer"},"elevenLabsJobId":{"type":["string","null"]},"progress":{"type":"integer"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"result":{}},"required":["id","projectId","type","status","webhookState","errorMessage","retryCount","elevenLabsJobId","progress","createdAt","updatedAt"]},"JobSummary":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"type":{"type":"string","enum":["transcribe","denoise","reason","export","analyze","segment","generate","render_cards","animate"]},"status":{"type":"string","enum":["pending","queued","running","awaiting_input","done","failed","cancelled"]},"webhookState":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"retryCount":{"type":"integer"},"elevenLabsJobId":{"type":["string","null"]},"progress":{"type":"integer"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","type","status","webhookState","errorMessage","retryCount","elevenLabsJobId","progress","createdAt","updatedAt"]},"ManifestVersion":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"summary":{"type":"object","properties":{"segmentCount":{"type":"number"},"keepCount":{"type":"number"},"removeCount":{"type":"number"},"chapterCount":{"type":"number"}},"required":["segmentCount","keepCount","removeCount","chapterCount"]},"createdAt":{"type":"string"},"label":{"type":["string","null"]},"source":{"type":["string","null"],"enum":["analysis","chat","precision","translate","history"]},"restoredFrom":{"type":["integer","null"]},"projectId":{"type":"string"},"data":{}},"required":["id","version","summary","createdAt","label","source","restoredFrom","projectId"]},"ManifestVersionListItem":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"summary":{"type":"object","properties":{"segmentCount":{"type":"number"},"keepCount":{"type":"number"},"removeCount":{"type":"number"},"chapterCount":{"type":"number"}},"required":["segmentCount","keepCount","removeCount","chapterCount"]},"createdAt":{"type":"string"},"label":{"type":["string","null"]},"source":{"type":["string","null"],"enum":["analysis","chat","precision","translate","history"]},"restoredFrom":{"type":["integer","null"]}},"required":["id","version","summary","createdAt","label","source","restoredFrom"]},"ListProjectsResponse":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}},"required":["projects"]},"LibraryResponse":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["project"]},"at":{"type":"string"},"project":{"$ref":"#/components/schemas/Project"}},"required":["type","at","project"]},{"type":"object","properties":{"type":{"type":"string","enum":["motion"]},"at":{"type":"string"},"motion":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]},"progress":{"type":"number"},"step":{"type":["string","null"]},"stepAt":{"type":["string","null"]},"stepPatience":{"type":["string","null"]},"activity":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string"},"n":{"type":["number","null"]},"of":{"type":["number","null"]},"text":{"type":"string"}},"required":["at","kind","n","of","text"]}},"question":{"type":["object","null"],"properties":{"term":{"type":"string"},"line":{"type":"string"},"askedAt":{"type":"string"},"waitS":{"type":"number"}},"required":["term","line","askedAt","waitS"]},"phase":{"type":["string","null"]},"request":{"type":"string"},"format":{"type":"string","enum":["16:9","9:16","1:1"]},"lengthS":{"type":["number","null"]},"voiceId":{"type":["string","null"]},"lang":{"type":["string","null"]},"music":{"type":"boolean"},"source":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["website","pull-request","text"]},"url":{"type":"string"},"name":{"type":"string"},"audience":{"type":"string","enum":["everyone","developer","product"]},"palette":{"type":"boolean"},"purpose":{"type":["string","null"],"enum":["sell","explain","summarise","teach","announce","showcase","invite","compare","recap","recruit","fundraise","celebrate","promote"]},"what":{"type":"string"}},"required":["kind","url","name","audience","palette","purpose","what"]},"material":{"type":["object","null"],"properties":{"texts":{"type":"array","items":{"type":"string"}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"use":{"type":"string","enum":["as-is","styled"]},"note":{"type":["string","null"]},"what":{"type":"string"}},"required":["id","use","note","what"]}},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"note":{"type":["string","null"]},"what":{"type":"string"}},"required":["id","note","what"]}},"brand":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"colours":{"type":"array","items":{"type":"string"}},"fonts":{"type":"array","items":{"type":"string"}},"logo":{"type":"boolean"}},"required":["name","colours","fonts","logo"]}},"required":["texts","images"]},"audio":{"type":["object","null"],"properties":{"id":{"type":"string"},"durationS":{"type":"number"},"rights":{"type":"string","enum":["mine","permission"]}},"required":["id","durationS","rights"]},"direction":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["you-pick"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["card"]},"pitchId":{"type":"string"},"card":{"type":"number"},"title":{"type":["string","null"]}},"required":["kind","pitchId","card","title"]}]},"storyboard":{"type":["object","null"],"properties":{"id":{"type":"string"},"scenes":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number","minimum":0,"maximum":600},"to":{"type":"number","minimum":0,"maximum":600},"picture":{"type":"string","maxLength":400},"said":{"type":"string","maxLength":400},"onScreen":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":6}},"required":["from","to","picture","said","onScreen"]}}},"required":["id","scenes"]},"usdSoFar":{"type":"number"},"hasVideo":{"type":"boolean"},"checks":{"type":["object","null"],"properties":{"pass":{"type":["boolean","null"]},"smallestTextPct":{"type":["number","null"]},"longestStillS":{"type":["number","null"]},"failed":{"type":"array","items":{"type":"string"}},"layoutErrors":{"type":["number","null"]},"material":{"type":["object","null"],"properties":{"pass":{"type":"boolean"},"texts":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"found":{"type":"boolean"}},"required":["text","found"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"used":{"type":"boolean"},"altered":{"type":"boolean"}},"required":["id","used"]}}},"required":["pass","texts","images"]},"storyboard":{"type":["object","null"],"properties":{"pass":{"type":"boolean"},"said":{"type":"array","items":{"type":"object","properties":{"scene":{"type":"integer"},"text":{"type":"string"},"found":{"type":"boolean"}},"required":["scene","text","found"]}},"onScreen":{"type":"array","items":{"type":"object","properties":{"scene":{"type":"integer"},"text":{"type":"string"},"found":{"type":"boolean"}},"required":["scene","text","found"]}}},"required":["pass","said","onScreen"]},"narration":{"type":["object","null"],"properties":{"pass":{"type":"boolean"},"missed":{"type":"array","items":{"type":"string"}}},"required":["pass","missed"]}},"required":["pass","smallestTextPct","longestStillS","material","storyboard"]},"musicCredits":{"type":"array","items":{"type":"object","properties":{"track":{"type":"string"},"artist":{"type":"string"},"license":{"type":"string"},"licenseUrl":{"type":"string"},"url":{"type":"string"},"line":{"type":"string"}},"required":["track","artist","license","licenseUrl","url","line"]}},"thumbnail":{"type":["string","null"]},"posterChoice":{"type":["number","null"]},"posterChoices":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"atS":{"type":"number"},"url":{"type":["string","null"]}},"required":["n","atS","url"]}},"kitOrder":{"type":["object","null"],"properties":{"platforms":{"type":"array","items":{"type":"string","enum":["youtube","shorts","instagram","tiktok","facebook","linkedin","x","other"]}},"sizes":{"type":"array","items":{"type":"string","enum":["1280x720","1080x1920","1080x1350","1200x627"]}},"otherName":{"type":["string","null"]}},"required":["platforms","sizes","otherName"]},"shapeOf":{"type":["string","null"]},"shapes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"format":{"type":"string","enum":["16:9","9:16","1:1"]},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]}},"required":["id","format","status"]}},"reshapable":{"type":"boolean"},"editOf":{"type":["string","null"]},"edit":{"type":["object","null"],"properties":{"fromJobId":{"type":"string"},"atS":{"type":"number"},"note":{"type":"string"},"scene":{"type":["number","null"]},"fromS":{"type":["number","null"]},"toS":{"type":["number","null"]},"also":{"type":"array","items":{"type":"object","properties":{"atS":{"type":"number","minimum":0,"maximum":600},"note":{"type":"string","minLength":3,"maxLength":1000}},"required":["atS","note"]}},"windows":{"type":"array","items":{"type":"object","properties":{"fromS":{"type":"number"},"toS":{"type":"number"}},"required":["fromS","toS"]}}},"required":["fromJobId","atS","note","scene","fromS","toS"]},"edits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]},"fromJobId":{"type":"string"},"atS":{"type":"number"},"note":{"type":"string"},"also":{"type":"array","items":{"type":"object","properties":{"atS":{"type":"number","minimum":0,"maximum":600},"note":{"type":"string","minLength":3,"maxLength":1000}},"required":["atS","note"]}},"createdAt":{"type":"string"}},"required":["id","status","fromJobId","atS","note","createdAt"]}},"editable":{"type":"boolean"},"wordsEditable":{"type":"boolean"},"series":{"type":["object","null"],"properties":{"id":{"type":"string"},"episode":{"type":"number"}},"required":["id","episode"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","status","progress","step","stepAt","stepPatience","activity","question","phase","request","format","lengthS","voiceId","lang","music","source","material","direction","storyboard","usdSoFar","hasVideo","checks","musicCredits","thumbnail","posterChoice","posterChoices","kitOrder","shapeOf","shapes","reshapable","editOf","edit","edits","editable","series","error","createdAt","finishedAt"]}},"required":["type","at","motion"]}]}},"series":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"sourceKind":{"type":"string","enum":["pdf","text"]},"format":{"type":"string","enum":["16:9","9:16","1:1"],"default":"16:9"},"lengthS":{"type":["number","null"]},"voiceId":{"type":["string","null"]},"lang":{"type":["string","null"]},"music":{"type":"boolean"},"look":{"type":["object","null"],"properties":{"fromJobId":{"type":"string"},"text":{"type":"string"}},"required":["fromJobId","text"]},"usdSoFar":{"type":"number"},"capUsd":{"type":"number"},"episodeEstimateUsd":{"type":"number"},"canMake":{"type":"object","properties":{"ok":{"type":"boolean"},"reason":{"type":["string","null"],"enum":["busy","cap"]}},"required":["ok","reason"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"at":{"type":"string"},"chapterCount":{"type":"number"},"episodesDone":{"type":"number"},"making":{"type":"boolean"},"thumbnail":{"type":["string","null"]}},"required":["id","title","sourceKind","lengthS","voiceId","lang","music","look","usdSoFar","capUsd","episodeEstimateUsd","canMake","createdAt","updatedAt","at","chapterCount","episodesDone","making","thumbnail"]}}},"required":["items","series"]},"CreateProjectRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"fileSizeBytes":{"type":"number","exclusiveMinimum":0},"durationMs":{"type":"number","exclusiveMinimum":0},"kind":{"type":"string","enum":["talking-head","faceless"]},"speechUsageId":{"type":"string"},"imageQuality":{"type":"string","enum":["standard","best"]},"pictureSource":{"type":"string","enum":["drawn","stock"]},"showcaseSlug":{"type":"string","maxLength":80}},"required":["title","fileSizeBytes"]},"CreateProjectResponse":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"]},"ProjectLimitError":{"type":"object","properties":{"error":{"type":"string"},"reason":{"type":"string","enum":["project_limit"]}},"required":["error","reason"]},"GetProjectResponse":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"]},"PatchProjectRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string"},"languageCode":{"type":"string"},"detectedLanguageCode":{"type":"string"},"audioQuality":{"type":"string","enum":["clean","noisy"]},"snrDb":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"clipCount":{"type":"integer","minimum":1,"maximum":100},"durationMs":{"type":"number","exclusiveMinimum":0},"imageQuality":{"type":"string","enum":["standard","best"]},"pictureSource":{"type":"string","enum":["drawn","stock"]},"speakerName":{"type":"string","maxLength":120},"speakerRole":{"type":"string","maxLength":120}}},"PatchProjectResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"ListManifestVersionsResponse":{"type":"object","properties":{"versions":{"type":"array","items":{"$ref":"#/components/schemas/ManifestVersionListItem"}}},"required":["versions"]},"CreateManifestVersionRequest":{"type":"object","properties":{"summary":{"type":"object","properties":{"segmentCount":{"type":"number"},"keepCount":{"type":"number"},"removeCount":{"type":"number"},"chapterCount":{"type":"number"}},"required":["segmentCount","keepCount","removeCount","chapterCount"]},"data":{"type":"object","additionalProperties":{}},"label":{"type":"string","maxLength":120},"source":{"type":"string","enum":["analysis","chat","precision","translate"]}},"required":["summary"]},"CreateManifestVersionResponse":{"type":"object","properties":{"version":{"$ref":"#/components/schemas/ManifestVersion"}},"required":["version"]},"TransitionFeedbackRequest":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"transitionId":{"type":"string","minLength":1,"maxLength":100},"aiType":{"type":["string","null"],"maxLength":64},"finalType":{"type":["string","null"],"maxLength":64},"outcome":{"type":"string","enum":["kept","swapped","removed","added"]}},"required":["transitionId","aiType","finalType","outcome"]},"minItems":1,"maxItems":50}},"required":["items"]},"TransitionFeedbackResponse":{"type":"object","properties":{"recorded":{"type":"integer"}},"required":["recorded"]},"JudgeChunkBody":{"type":"object","properties":{"vertical":{"type":"string","enum":["story","talking-head"]},"durationMs":{"type":"integer","minimum":0},"chunk":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"count":{"type":"integer","exclusiveMinimum":0},"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0}},"required":["index","count","startMs","endMs"]},"frameWidth":{"type":"integer","exclusiveMinimum":0,"maximum":540},"frameHeight":{"type":"integer","exclusiveMinimum":0},"frames":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"jpeg":{"type":"string","minLength":1,"maxLength":400000,"pattern":"^[A-Za-z0-9+/]+={0,2}$"}},"required":["atMs","jpeg"]},"minItems":1,"maxItems":90},"shown":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"text":{"type":"string","minLength":1,"maxLength":400},"kind":{"type":"string","enum":["caption","card"]}},"required":["atMs","endMs","text","kind"]},"maxItems":2000},"spoken":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"text":{"type":"string","minLength":1,"maxLength":400}},"required":["atMs","endMs","text"]},"maxItems":2000},"facts":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,63}$"},"maxItems":64}},"required":["vertical","durationMs","chunk","frameWidth","frameHeight","frames","shown","spoken","facts"]},"ProjectJudgePartResponse":{"type":"object","properties":{"part":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"count":{"type":"integer","exclusiveMinimum":0},"verdicts":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"pass":{"type":"boolean"},"atMs":{"type":["integer","null"],"minimum":0},"why":{"type":"string"},"endMs":{"type":["integer","null"],"minimum":0},"fix":{"type":"string"}},"required":["item","pass","atMs","why"]}}},"required":["index","count","verdicts"]},"judge":{"type":["object","null"],"properties":{"vertical":{"type":"string"},"durationMs":{"type":"integer","minimum":0},"parts":{"type":"integer","minimum":0},"of":{"type":"integer","exclusiveMinimum":0},"complete":{"type":"boolean"},"model":{"type":"string"},"frames":{"type":"integer","minimum":0},"usd":{"type":["number","null"]},"verdicts":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"pass":{"type":"boolean"},"atMs":{"type":["integer","null"],"minimum":0},"why":{"type":"string"},"endMs":{"type":["integer","null"],"minimum":0},"fix":{"type":"string"}},"required":["item","pass","atMs","why"]}},"judgedAt":{"type":"string"}},"required":["vertical","durationMs","parts","of","complete","model","frames","usd","verdicts","judgedAt"]}},"required":["part","judge"]},"ProjectJudgeResponse":{"type":"object","properties":{"judge":{"type":["object","null"],"properties":{"vertical":{"type":"string"},"durationMs":{"type":"integer","minimum":0},"parts":{"type":"integer","minimum":0},"of":{"type":"integer","exclusiveMinimum":0},"complete":{"type":"boolean"},"model":{"type":"string"},"frames":{"type":"integer","minimum":0},"usd":{"type":["number","null"]},"verdicts":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"pass":{"type":"boolean"},"atMs":{"type":["integer","null"],"minimum":0},"why":{"type":"string"},"endMs":{"type":["integer","null"],"minimum":0},"fix":{"type":"string"}},"required":["item","pass","atMs","why"]}},"judgedAt":{"type":"string"}},"required":["vertical","durationMs","parts","of","complete","model","frames","usd","verdicts","judgedAt"]},"rounds":{"type":"array","items":{"type":"object","properties":{"round":{"type":"integer","exclusiveMinimum":0},"keepNew":{"type":"boolean"},"score":{"type":"integer"},"why":{"type":"string"},"fixes":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"kind":{"type":"string"}},"required":["item","kind"]}},"usd":{"type":["number","null"]},"at":{"type":"string"}},"required":["round","keepNew","score","why","fixes","usd","at"]}},"canFix":{"type":"boolean"},"canFixTh":{"type":"boolean"},"canFixPictures":{"type":"boolean"},"fixes":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"atMs":{"type":["integer","null"],"minimum":0},"fix":{"type":"string"},"action":{"type":"string"},"round":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string"},"at":{"type":"string"}},"required":["item","atMs","fix","action","round","status","at"]}}},"required":["judge","rounds","canFix"]},"JudgePairBody":{"type":"object","properties":{"vertical":{"type":"string","enum":["story","talking-head"]},"round":{"type":"integer","minimum":1,"maximum":2},"stretch":{"type":"object","properties":{"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0}},"required":["startMs","endMs"]},"frameWidth":{"type":"integer","exclusiveMinimum":0,"maximum":540},"frameHeight":{"type":"integer","exclusiveMinimum":0},"fixes":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,63}$"},"kind":{"type":"string","enum":["redraw","restock","drop_card"]}},"required":["item","kind"]},"minItems":1,"maxItems":6},"a":{"type":"object","properties":{"frames":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"jpeg":{"type":"string","minLength":1,"maxLength":400000,"pattern":"^[A-Za-z0-9+/]+={0,2}$"}},"required":["atMs","jpeg"]},"minItems":1,"maxItems":45},"shown":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"text":{"type":"string","minLength":1,"maxLength":400},"kind":{"type":"string","enum":["caption","card"]}},"required":["atMs","endMs","text","kind"]},"maxItems":2000},"spoken":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"text":{"type":"string","minLength":1,"maxLength":400}},"required":["atMs","endMs","text"]},"maxItems":2000}},"required":["frames","shown","spoken"]},"b":{"type":"object","properties":{"frames":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"jpeg":{"type":"string","minLength":1,"maxLength":400000,"pattern":"^[A-Za-z0-9+/]+={0,2}$"}},"required":["atMs","jpeg"]},"minItems":1,"maxItems":45},"shown":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"text":{"type":"string","minLength":1,"maxLength":400},"kind":{"type":"string","enum":["caption","card"]}},"required":["atMs","endMs","text","kind"]},"maxItems":2000},"spoken":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"text":{"type":"string","minLength":1,"maxLength":400}},"required":["atMs","endMs","text"]},"maxItems":2000}},"required":["frames","shown","spoken"]}},"required":["vertical","round","stretch","frameWidth","frameHeight","fixes","a","b"]},"JudgePairResponse":{"type":"object","properties":{"round":{"type":"object","properties":{"round":{"type":"integer","exclusiveMinimum":0},"keepNew":{"type":"boolean"},"score":{"type":"integer"},"why":{"type":"string"},"fixes":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"kind":{"type":"string"}},"required":["item","kind"]}},"usd":{"type":["number","null"]},"at":{"type":"string"}},"required":["round","keepNew","score","why","fixes","usd","at"]},"rounds":{"type":"array","items":{"type":"object","properties":{"round":{"type":"integer","exclusiveMinimum":0},"keepNew":{"type":"boolean"},"score":{"type":"integer"},"why":{"type":"string"},"fixes":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"kind":{"type":"string"}},"required":["item","kind"]}},"usd":{"type":["number","null"]},"at":{"type":"string"}},"required":["round","keepNew","score","why","fixes","usd","at"]}},"roundsLeft":{"type":"integer","minimum":0}},"required":["round","rounds","roundsLeft"]},"ThFixBody":{"type":"object","properties":{"judgedAt":{"type":"string","format":"date-time"},"round":{"type":"integer","minimum":1,"maximum":2},"status":{"type":"string","enum":["applied","undone"]},"fixes":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,63}$"},"atMs":{"type":["integer","null"],"minimum":0},"fix":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,63}$"},"action":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,63}$"}},"required":["item","atMs","fix","action"]},"minItems":1,"maxItems":6}},"required":["judgedAt","round","status","fixes"]},"ThFixResponse":{"type":"object","properties":{"fixes":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"atMs":{"type":["integer","null"],"minimum":0},"fix":{"type":"string"},"action":{"type":"string"},"round":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string"},"at":{"type":"string"}},"required":["item","atMs","fix","action","round","status","at"]}},"roundsLeft":{"type":"integer","minimum":0}},"required":["fixes","roundsLeft"]},"ThFixVisualBody":{"type":"object","properties":{"judgedAt":{"type":"string","format":"date-time"},"round":{"type":"integer","minimum":1,"maximum":2},"item":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,63}$"},"atMs":{"type":"integer","minimum":0},"sourceMs":{"type":"integer","minimum":0},"aspect":{"type":"string","enum":["16:9","9:16","1:1","4:5"]}},"required":["judgedAt","round","item","atMs","sourceMs","aspect"]},"ThFixVisualResponse":{"type":"object","properties":{"fix":{"type":["object","null"],"properties":{"item":{"type":"string"},"atMs":{"type":["integer","null"],"minimum":0},"fix":{"type":"string"},"action":{"type":"string"},"round":{"type":"integer","exclusiveMinimum":0},"status":{"type":"string"},"at":{"type":"string"}},"required":["item","atMs","fix","action","round","status","at"]},"picture":{"type":["object","null"],"properties":{"assetId":{"type":"string"},"url":{"type":"string"}},"required":["assetId","url"]},"capped":{"type":["string","null"]},"line":{"type":["string","null"]}},"required":["fix","picture","capped","line"]},"DirectorPlanRequest":{"type":"object","properties":{"sentences":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":1},"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":0},"text":{"type":"string","minLength":1,"maxLength":2000},"words":{"type":"array","items":{"type":"object","properties":{"word":{"type":"string","maxLength":200},"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":0}},"required":["word","start_ms","end_ms"]},"maxItems":600}},"required":["n","start_ms","end_ms","text"]},"minItems":1,"maxItems":600},"languageCode":{"type":"string","maxLength":16},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"]},"context":{"type":"string","maxLength":600}},"required":["sentences"]},"DirectorPlanResponse":{"type":"object","properties":{"plan":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"model":{"type":"string","maxLength":120},"created_at":{"type":"string"},"updated_at":{"type":"string"},"look":{"type":"object","properties":{"colours":{"type":"string","maxLength":400},"type":{"type":"string","maxLength":400},"drawing":{"type":"string","maxLength":400},"words":{"type":"string","maxLength":400},"cut":{"type":"string","maxLength":400},"palette":{"type":"object","properties":{"paper":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"ink":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accent":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accent2":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["paper","ink","accent"]},"fonts":{"type":"object","properties":{"display":{"type":"string","enum":["Inter","Montserrat","Outfit","Nunito","Oswald","League Gothic","Archivo Black","Space Mono","IBM Plex Mono","JetBrains Mono","EB Garamond","Playfair Display","Source Code Pro","Roboto","Open Sans","Lato","Poppins"]},"label":{"type":"string","enum":["Inter","Montserrat","Outfit","Nunito","Oswald","League Gothic","Archivo Black","Space Mono","IBM Plex Mono","JetBrains Mono","EB Garamond","Playfair Display","Source Code Pro","Roboto","Open Sans","Lato","Poppins"]}},"required":["display","label"]},"source":{"type":"string","enum":["director","brand_kit","user"]}},"required":["colours","type","drawing","words","cut"]},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"sentence":{"type":"integer","minimum":1},"ask":{"type":"string","maxLength":400},"answer":{"type":["string","null"],"maxLength":400}},"required":["id","sentence","ask","answer"]},"maxItems":20},"sentences":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":1},"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":0},"picks":{"type":"array","items":{"type":"object","properties":{"from_ms":{"type":"integer","minimum":0},"medium":{"type":"string","enum":["speaker","speaker_words","graphic","kinetic_text","photo_logo","stock","ai_image","ai_clip"]},"what":{"type":"string","maxLength":600},"on_screen":{"type":"string","maxLength":300},"reason":{"type":"string","maxLength":400},"name":{"type":"string","maxLength":200},"changed_by_user":{"type":"boolean"},"depicts":{"type":"object","properties":{"realPerson":{"type":["boolean","null"]},"child":{"type":["boolean","null"]},"words":{"type":["boolean","null"]},"map":{"type":["boolean","null"]}},"required":["realPerson","child","words","map"]},"own":{"type":"object","properties":{"kind":{"type":"string","enum":["image","video"]}},"required":["kind"]}},"required":["from_ms","medium","what","on_screen","reason"]},"minItems":1,"maxItems":2}},"required":["n","start_ms","end_ms","picks"]},"maxItems":600}},"required":["version","model","created_at","updated_at","look","questions","sentences"]}},"required":["plan"]},"DirectorEstimateResponse":{"type":"object","properties":{"estimate":{"type":"object","properties":{"minutes":{"type":"number"},"capUsd":{"type":"number"},"capUsdPerMinute":{"type":"number"},"costUsd":{"type":"number"},"priceUsd":{"type":"number"},"overCap":{"type":"boolean"},"perSentence":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"costUsd":{"type":"number"}},"required":["n","costUsd"]}},"stepDowns":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"pick":{"type":"integer"},"from":{"type":"string","enum":["speaker","speaker_words","graphic","kinetic_text","photo_logo","stock","ai_image","ai_clip"]},"to":{"type":"string","enum":["speaker","speaker_words","graphic","kinetic_text","photo_logo","stock","ai_image","ai_clip"]}},"required":["n","pick","from","to"]}},"fittedCostUsd":{"type":"number"},"stillOverCap":{"type":"boolean"},"wallet":{"type":["object","null"],"properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 code, e.g. \"INR\", \"JPY\". Any code: do not switch on a fixed list."},"priceMinor":{"type":"integer","description":"What it will probably cost. 0 for something free (a pitch)."},"requiredMinor":{"type":"integer","description":"What the wallet must hold to start: also what is held while it runs."},"balanceMinor":{"type":"integer","description":"Spendable now (running jobs’ holds already out)."},"allowed":{"type":"boolean","description":"False: it would be refused now. Nothing was started or spent."},"shortfallMinor":{"type":"integer","description":"How much more the wallet needs. 0 when allowed."},"topUpMinor":{"type":"integer","description":"What an \"Add money\" button should offer: the shortfall, or the minimum top-up if that is more. 0 when allowed."},"settlesAtActualCost":{"type":"boolean","description":"True when the final charge is the job’s measured cost (motion), so it may differ from `priceMinor`; false when the price is fixed by the input (minutes of takes)."}},"required":["currency","priceMinor","requiredMinor","balanceMinor","allowed","shortfallMinor","topUpMinor","settlesAtActualCost"]}},"required":["minutes","capUsd","capUsdPerMinute","costUsd","priceUsd","overCap","perSentence","stepDowns","fittedCostUsd","stillOverCap","wallet"]}},"required":["estimate"]},"DirectorMakeRequest":{"type":"object","properties":{"sentences":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":1},"text":{"type":"string","minLength":1,"maxLength":2000}},"required":["n","text"]},"minItems":1,"maxItems":600},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"default":"9:16"}},"required":["sentences"]},"DirectorMakeResponse":{"type":"object","properties":{"make":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"status":{"type":"string","enum":["making","done","failed"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"plan_at":{"type":"string"},"motionJobId":{"type":["string","null"]},"items":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"pick":{"type":"integer"},"medium":{"type":"string","enum":["speaker","speaker_words","graphic","kinetic_text","photo_logo","stock","ai_image","ai_clip"]},"maker":{"type":"string","enum":["moments","entity","stock","ai_image","device"]},"status":{"type":"string","enum":["nothing","queued","making","ready","failed"]},"from_ms":{"type":"number"},"to_ms":{"type":"number"},"moment":{"type":"integer"},"assetId":{"type":"string"},"clipAssetId":{"type":"string"},"entity":{"type":"object","properties":{"role":{"type":"string","enum":["photo","logo"]},"source":{"type":"string","enum":["wikimedia","brandfetch"]},"credit":{"type":"string"},"sourceUrl":{"type":"string"}},"required":["role","source","credit","sourceUrl"]},"stock":{"type":"object","properties":{"url":{"type":"string"},"mediaType":{"type":"string","enum":["video","image"]},"credit":{"type":"string"},"sourceUrl":{"type":"string"}},"required":["url","mediaType","credit","sourceUrl"]},"note":{"type":"string"},"own":{"type":"boolean"}},"required":["n","pick","medium","maker","status","from_ms","to_ms"]}},"costUsd":{"type":"number"},"settled":{"type":"boolean"},"live":{"type":["object","null"],"properties":{"expectedS":{"type":"number"},"step":{"type":["string","null"]},"stepAt":{"type":["string","null"]}},"required":["expectedS","step","stepAt"]}},"required":["id","key","status","created_at","updated_at","plan_at","motionJobId","items","costUsd","settled"]}},"required":["make"]},"DirectorMakeMaybeResponse":{"type":"object","properties":{"make":{"type":["object","null"],"properties":{"id":{"type":"string"},"key":{"type":"string"},"status":{"type":"string","enum":["making","done","failed"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"plan_at":{"type":"string"},"motionJobId":{"type":["string","null"]},"items":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"pick":{"type":"integer"},"medium":{"type":"string","enum":["speaker","speaker_words","graphic","kinetic_text","photo_logo","stock","ai_image","ai_clip"]},"maker":{"type":"string","enum":["moments","entity","stock","ai_image","device"]},"status":{"type":"string","enum":["nothing","queued","making","ready","failed"]},"from_ms":{"type":"number"},"to_ms":{"type":"number"},"moment":{"type":"integer"},"assetId":{"type":"string"},"clipAssetId":{"type":"string"},"entity":{"type":"object","properties":{"role":{"type":"string","enum":["photo","logo"]},"source":{"type":"string","enum":["wikimedia","brandfetch"]},"credit":{"type":"string"},"sourceUrl":{"type":"string"}},"required":["role","source","credit","sourceUrl"]},"stock":{"type":"object","properties":{"url":{"type":"string"},"mediaType":{"type":"string","enum":["video","image"]},"credit":{"type":"string"},"sourceUrl":{"type":"string"}},"required":["url","mediaType","credit","sourceUrl"]},"note":{"type":"string"},"own":{"type":"boolean"}},"required":["n","pick","medium","maker","status","from_ms","to_ms"]}},"costUsd":{"type":"number"},"settled":{"type":"boolean"},"live":{"type":["object","null"],"properties":{"expectedS":{"type":"number"},"step":{"type":["string","null"]},"stepAt":{"type":["string","null"]}},"required":["expectedS","step","stepAt"]}},"required":["id","key","status","created_at","updated_at","plan_at","motionJobId","items","costUsd","settled"]}},"required":["make"]},"DirectorPlanMaybeResponse":{"type":"object","properties":{"plan":{"type":["object","null"],"properties":{"version":{"type":"number","enum":[1]},"model":{"type":"string","maxLength":120},"created_at":{"type":"string"},"updated_at":{"type":"string"},"look":{"type":"object","properties":{"colours":{"type":"string","maxLength":400},"type":{"type":"string","maxLength":400},"drawing":{"type":"string","maxLength":400},"words":{"type":"string","maxLength":400},"cut":{"type":"string","maxLength":400},"palette":{"type":"object","properties":{"paper":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"ink":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accent":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accent2":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["paper","ink","accent"]},"fonts":{"type":"object","properties":{"display":{"type":"string","enum":["Inter","Montserrat","Outfit","Nunito","Oswald","League Gothic","Archivo Black","Space Mono","IBM Plex Mono","JetBrains Mono","EB Garamond","Playfair Display","Source Code Pro","Roboto","Open Sans","Lato","Poppins"]},"label":{"type":"string","enum":["Inter","Montserrat","Outfit","Nunito","Oswald","League Gothic","Archivo Black","Space Mono","IBM Plex Mono","JetBrains Mono","EB Garamond","Playfair Display","Source Code Pro","Roboto","Open Sans","Lato","Poppins"]}},"required":["display","label"]},"source":{"type":"string","enum":["director","brand_kit","user"]}},"required":["colours","type","drawing","words","cut"]},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"sentence":{"type":"integer","minimum":1},"ask":{"type":"string","maxLength":400},"answer":{"type":["string","null"],"maxLength":400}},"required":["id","sentence","ask","answer"]},"maxItems":20},"sentences":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":1},"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":0},"picks":{"type":"array","items":{"type":"object","properties":{"from_ms":{"type":"integer","minimum":0},"medium":{"type":"string","enum":["speaker","speaker_words","graphic","kinetic_text","photo_logo","stock","ai_image","ai_clip"]},"what":{"type":"string","maxLength":600},"on_screen":{"type":"string","maxLength":300},"reason":{"type":"string","maxLength":400},"name":{"type":"string","maxLength":200},"changed_by_user":{"type":"boolean"},"depicts":{"type":"object","properties":{"realPerson":{"type":["boolean","null"]},"child":{"type":["boolean","null"]},"words":{"type":["boolean","null"]},"map":{"type":["boolean","null"]}},"required":["realPerson","child","words","map"]},"own":{"type":"object","properties":{"kind":{"type":"string","enum":["image","video"]}},"required":["kind"]}},"required":["from_ms","medium","what","on_screen","reason"]},"minItems":1,"maxItems":2}},"required":["n","start_ms","end_ms","picks"]},"maxItems":600}},"required":["version","model","created_at","updated_at","look","questions","sentences"]}},"required":["plan"]},"DirectorPlanPatch":{"type":"object","properties":{"changes":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":1},"pick":{"type":"integer","minimum":0,"maximum":1,"default":0},"medium":{"type":"string","enum":["speaker","speaker_words","graphic","kinetic_text","photo_logo","stock","ai_image","ai_clip"]},"what":{"type":"string","maxLength":600},"on_screen":{"type":"string","maxLength":300},"own":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["image","video"]}},"required":["kind"]}},"required":["n"]},"maxItems":600},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"answer":{"type":"string","maxLength":400}},"required":["id","answer"]},"maxItems":20},"look":{"type":"object","properties":{"colours":{"type":"string","maxLength":400},"type":{"type":"string","maxLength":400},"drawing":{"type":"string","maxLength":400},"words":{"type":"string","maxLength":400},"cut":{"type":"string","maxLength":400},"palette":{"type":"object","properties":{"paper":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"ink":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accent":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accent2":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["paper","ink","accent"]},"fonts":{"type":"object","properties":{"display":{"type":"string","enum":["Inter","Montserrat","Outfit","Nunito","Oswald","League Gothic","Archivo Black","Space Mono","IBM Plex Mono","JetBrains Mono","EB Garamond","Playfair Display","Source Code Pro","Roboto","Open Sans","Lato","Poppins"]},"label":{"type":"string","enum":["Inter","Montserrat","Outfit","Nunito","Oswald","League Gothic","Archivo Black","Space Mono","IBM Plex Mono","JetBrains Mono","EB Garamond","Playfair Display","Source Code Pro","Roboto","Open Sans","Lato","Poppins"]}},"required":["display","label"]}}}}},"PostTextRequest":{"type":"object","properties":{"platforms":{"type":"array","items":{"type":"string","enum":["instagram","shorts","youtube","linkedin","x"]},"minItems":1,"maxItems":5},"words":{"type":"string","minLength":1,"maxLength":60000},"title":{"type":"string","maxLength":200},"lang":{"type":"string","maxLength":16}},"required":["platforms","words"]},"PostTextResponse":{"type":"object","properties":{"texts":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["youtube","shorts","instagram","tiktok","facebook","linkedin","x","other"]},"label":{"type":"string"},"title":{"type":["string","null"]},"text":{"type":"string"},"hashtags":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"full":{"type":"string"},"limits":{"type":"object","properties":{"title":{"type":["number","null"]},"text":{"type":"number"},"hashtags":{"type":"number"},"tagsChars":{"type":["number","null"]}},"required":["title","text","hashtags","tagsChars"]},"trimmed":{"type":"boolean"}},"required":["platform","label","title","text","hashtags","tags","full","limits","trimmed"]}}},"required":["texts"]},"GetManifestVersionResponse":{"type":"object","properties":{"version":{"$ref":"#/components/schemas/ManifestVersion"}},"required":["version"]},"RestoreManifestVersionResponse":{"type":"object","properties":{"version":{"$ref":"#/components/schemas/ManifestVersion"}},"required":["version"]},"CreditPricing":{"type":"object","properties":{"currency":{"type":"string","enum":["INR","USD"]},"currencySymbol":{"type":"string","description":"Symbol for `currency`, e.g. \"₹\"."},"creditPrice":{"type":["number","null"],"description":"Price of ONE credit in MAJOR units (₹750). Null when not sold in this currency."},"minutesPerCredit":{"type":"integer","description":"Minutes one credit buys. 30."},"freeTrialMinutes":{"type":"integer","description":"Free minutes granted ONCE per account, ever. Not a monthly allowance."},"maxCreditsPerPurchase":{"type":"integer","description":"Upper bound on a single purchase. 100."}},"required":["currency","currencySymbol","creditPrice","minutesPerCredit","freeTrialMinutes","maxCreditsPerPurchase"]},"CreditLedgerEntry":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["grant","purchase","consume","refund","adjust"],"description":"What happened. `consume` rows are negative; `grant`/`purchase` are positive."},"deltaMinutes":{"type":"number","description":"SIGNED minutes. Negative means spent."},"projectId":{"type":["string","null"],"description":"Set on `consume` rows — which project spent it."},"credits":{"type":["integer","null"],"description":"Set on `purchase` rows."},"amountMinor":{"type":["integer","null"],"description":"Amount paid in MINOR units (paise). Set on `purchase` rows."},"currency":{"type":["string","null"],"enum":["INR","USD"]},"note":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO-8601."}},"required":["id","kind","deltaMinutes","projectId","credits","amountMinor","currency","note","createdAt"]},"WalletCurrencyOffer":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 code, e.g. \"INR\", \"JPY\". Any code: do not switch on a fixed list."},"currencySymbol":{"type":"string"},"name":{"type":"string","description":"In English, for a picker’s search: \"Japanese yen\"."},"decimals":{"type":"integer","description":"ISO 4217 exponent: minor units per major unit are 10^decimals (2 for ₹ and $, 0 for ¥)."},"enabled":{"type":"boolean","description":"False while Toast cannot collect this currency (USD until Razorpay International Payments is approved). Show it greyed, never as a price."},"minTopUpMinor":{"type":"integer","description":"Smallest top-up, MINOR units. A server setting: never hardcode it."},"maxTopUpMinor":{"type":"integer","description":"Largest top-up in one payment, MINOR units."}},"required":["currency","currencySymbol","name","decimals","enabled","minTopUpMinor","maxTopUpMinor"]},"CreditWallet":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"The one currency this wallet holds."},"currencySymbol":{"type":"string"},"currencyDecimals":{"type":"integer","description":"ISO 4217 exponent of `currency`: every *Minor amount here is in 10^-decimals of a major unit."},"balanceMinor":{"type":"integer","description":"What the user can spend now. Running jobs’ holds are already taken out of it."},"heldMinor":{"type":"integer","description":"Held by running jobs: comes back, or is spent, when each job ends. Show it beside the balance, never add it to it."},"canSwitchCurrency":{"type":"boolean","description":"True while the wallet holds only its free trial: a top-up in another enabled currency moves the wallet to it. False after the first top-up or job."},"suggestedCurrency":{"type":"string","pattern":"^[A-Z]{3}$","description":"The currency the top-up screen should open in, from the visitor’s country (read on Toast’s server)."},"country":{"type":["string","null"],"pattern":"^[A-Z]{2}$","description":"The country (ISO 3166 alpha-2) Toast’s server read for THIS request, from its IP address in a table on the server; null when unknown. Only defaults the currency; never stored. A client may say \"Prices in your currency (Japan)\"."},"currencies":{"type":"array","items":{"$ref":"#/components/schemas/WalletCurrencyOffer"},"description":"₹ and $ always (enabled or not), and any other currency once it is switched on."},"ratePerMinuteMinor":{"type":"integer","description":"Talking-head and faceless price per minute of takes, MINOR units of `currency`."},"startBufferFraction":{"type":"number","description":"A job needs price × (1 + this) to start, at most `startBufferCapMinor` more. 0.3."},"startBufferCapMinor":{"type":"integer","description":"The most the start buffer adds, MINOR units. ₹500 / $5."},"motionMinPriceMinor":{"type":"integer","description":"A motion video costs at least this, MINOR units. US$4.00."}},"required":["currency","currencySymbol","currencyDecimals","balanceMinor","heldMinor","canSwitchCurrency","suggestedCurrency","currencies","ratePerMinuteMinor","startBufferFraction","startBufferCapMinor","motionMinPriceMinor"],"description":"The money wallet (epic #1505). Absent until the wallet is switched on. When present, it is what bills, and `balanceMinutes` is its talking-head equivalent for clients that only know minutes."},"CreditBalance":{"type":"object","properties":{"balanceMinutes":{"type":"number","description":"Minutes remaining. THE UNIT OF ACCOUNT — fractional, and can go slightly negative when a project was metered by the server-side transcription backstop after the fact."},"balanceCredits":{"type":"number","description":"balanceMinutes / minutesPerCredit. Display only — never round this for accounting."},"hasEverPurchased":{"type":"boolean","description":"True once the user has bought at least one credit, ever. Such a user bypasses the platform capacity kill-switch even at a zero balance."},"watermark":{"type":"boolean","description":"True when this user's next video must carry the toast.video mark: an account created on or after the launch date that has never topped up. False for everyone while the mark is switched off. Read it when an export starts."},"pricing":{"$ref":"#/components/schemas/CreditPricing"},"wallet":{"$ref":"#/components/schemas/CreditWallet"}},"required":["balanceMinutes","balanceCredits","hasEverPurchased","watermark","pricing"]},"CreditLedgerResponse":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/CreditLedgerEntry"},"description":"Newest first."}},"required":["entries"]},"CreditEstimateRequest":{"type":"object","properties":{"durationMs":{"type":"number","minimum":0,"description":"RAW INGESTED duration, summed across takes for a multi-take project — not the expected export length. This is what bills."}},"required":["durationMs"]},"CreditEstimateResponse":{"type":"object","properties":{"allowed":{"type":"boolean","description":"False means this ingest would be REFUSED. Charging is all-or-nothing: the video is not partially processed."},"balanceMinutes":{"type":"number"},"chargeMinutes":{"type":"number","description":"What this video will cost."},"shortfallMinutes":{"type":"number"},"creditsToBuy":{"type":"integer","description":"Whole credits that clear the shortfall — the number to put on the buy button."},"pricing":{"$ref":"#/components/schemas/CreditPricing"},"wallet":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 code, e.g. \"INR\", \"JPY\". Any code: do not switch on a fixed list."},"priceMinor":{"type":"integer","description":"What it will probably cost. 0 for something free (a pitch)."},"requiredMinor":{"type":"integer","description":"What the wallet must hold to start: also what is held while it runs."},"balanceMinor":{"type":"integer","description":"Spendable now (running jobs’ holds already out)."},"allowed":{"type":"boolean","description":"False: it would be refused now. Nothing was started or spent."},"shortfallMinor":{"type":"integer","description":"How much more the wallet needs. 0 when allowed."},"topUpMinor":{"type":"integer","description":"What an \"Add money\" button should offer: the shortfall, or the minimum top-up if that is more. 0 when allowed."},"settlesAtActualCost":{"type":"boolean","description":"True when the final charge is the job’s measured cost (motion), so it may differ from `priceMinor`; false when the price is fixed by the input (minutes of takes)."}},"required":["currency","priceMinor","requiredMinor","balanceMinor","allowed","shortfallMinor","topUpMinor","settlesAtActualCost"],"description":"Present once the wallet is on (epic #1505): the price in money. Then `allowed` follows it, and the minute fields are its talking-head equivalents."}},"required":["allowed","balanceMinutes","chargeMinutes","pricing"]},"CreditCheckoutRequest":{"type":"object","properties":{"credits":{"type":"integer","minimum":1,"description":"How many credits to buy in ONE payment. 2 credits is a single ₹1,500 charge, not two ₹750 charges. Bounded by `pricing.maxCreditsPerPurchase`."}},"required":["credits"]},"CreditCheckoutResponse":{"type":"object","properties":{"purchaseId":{"type":"string","description":"Toast-side purchase id, for support correlation."},"checkoutUrl":{"type":["string","null"],"description":"Razorpay hosted payment page. Open in a browser/tab; never in an iframe."},"credits":{"type":"integer"},"amountMinor":{"type":"integer","description":"Total charge in MINOR units (paise). 2 credits = 100000."},"currency":{"type":"string","enum":["INR","USD"]}},"required":["purchaseId","checkoutUrl","credits","amountMinor","currency"]},"WalletHistoryEntry":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["topup","grant","converted","job","adjust"],"description":"`topup` money added · `grant` free money (the trial) · `converted` old minutes as money · `job` a video or step · `adjust` a correction."},"amountMinor":{"type":"integer","description":"SIGNED, MINOR units: what this line did to the balance. A running job shows its hold, negative."},"jobRef":{"type":["string","null"],"description":"Jobs only: `motion:<id>`, `project:<id>`, `images:<jobId>`, `ownvoice:<id>`."},"status":{"type":["string","null"],"enum":["running","settled"],"description":"Jobs only. A running job’s amount is its hold; a settled job’s is what it cost the user."},"heldMinor":{"type":["integer","null"],"description":"Jobs only: what was held to start it."},"absorbedMinor":{"type":["integer","null"],"description":"What Toast paid past the balance for this job. Never charged."},"note":{"type":["string","null"],"description":"A sentence for a person, e.g. \"Motion video “Spring launch”\"."},"createdAt":{"type":"string","description":"ISO-8601. A job is dated by its latest change."},"balanceAfterMinor":{"type":"integer","description":"The balance just after this line."}},"required":["id","kind","amountMinor","jobRef","status","heldMinor","absorbedMinor","note","createdAt","balanceAfterMinor"]},"CreditTopUpRequest":{"type":"object","properties":{"amountMinor":{"type":"integer","exclusiveMinimum":0,"description":"MINOR units of `currency` (paise / cents; ¥ has none): ₹500 = 50000, ¥500 = 500. At least `wallet.currencies[].minTopUpMinor`, at most its `maxTopUpMinor`."},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"One of `wallet.currencies` that is enabled, and the wallet’s own currency unless `wallet.canSwitchCurrency`. Anything else is 400."}},"required":["amountMinor","currency"]},"CreditTopUpResponse":{"type":"object","properties":{"purchaseId":{"type":"string","description":"Toast-side purchase id, for support correlation."},"checkoutUrl":{"type":["string","null"],"description":"Razorpay hosted payment page. Open in a browser/tab; never in an iframe."},"amountMinor":{"type":"integer"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 code, e.g. \"INR\", \"JPY\". Any code: do not switch on a fixed list."}},"required":["purchaseId","checkoutUrl","amountMinor","currency"]},"WalletHistoryResponse":{"type":"object","properties":{"currency":{"type":["string","null"],"pattern":"^[A-Z]{3}$","description":"Null when the wallet is not open."},"entries":{"type":"array","items":{"$ref":"#/components/schemas/WalletHistoryEntry"},"description":"Newest first."}},"required":["currency","entries"]},"GetJobResponse":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/Job"}},"required":["job"]},"ListJobsResponse":{"type":"object","properties":{"jobs":{"type":"array","items":{"$ref":"#/components/schemas/JobSummary"}}},"required":["jobs"]},"StyleContract":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"channelId":{"type":"string"},"presetId":{"type":["string","null"]},"name":{"type":"string"},"register":{"type":"string","enum":["schematic","stylised","naturalistic","photoreal"]},"medium":{"type":"string"},"lineWork":{"type":"string"},"colorRule":{"type":"string"},"palette":{"type":"array","items":{"type":"string"}},"background":{"type":"string"},"subjectGrammar":{"type":"string"},"textInImage":{"type":"string","enum":["none","hand-lettered","clean-overlay"]},"negatives":{"type":"array","items":{"type":"string"}},"composition":{"type":"object","properties":{"aspect":{"type":"string","enum":["16:9","9:16","1:1","4:5"]},"rules":{"type":"array","items":{"type":"string"}}},"required":["aspect","rules"]},"preferredModel":{"type":"string","enum":["flux-schnell","flux-2-pro"]},"seedStrategy":{"type":"string","enum":["per-channel","per-scene","random"]},"channelSeed":{"type":["integer","null"]},"createdAt":{"type":"string"}},"required":["id","version","channelId","presetId","name","register","medium","lineWork","colorRule","palette","background","subjectGrammar","textInImage","negatives","composition","preferredModel","seedStrategy","channelSeed","createdAt"]},"Channel":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string"},"defaultStyleContractId":{"type":["string","null"]},"defaultStyleContractVersion":{"type":["integer","null"]},"defaultStyleContract":{"allOf":[{"$ref":"#/components/schemas/StyleContract"},{"type":["object","null"]}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","name","defaultStyleContractId","defaultStyleContractVersion","defaultStyleContract","createdAt","updatedAt"]},"StyleSample":{"type":"object","properties":{"beatId":{"type":"string"},"url":{"type":"string"},"aspect":{"type":"string","enum":["16:9","9:16","1:1","4:5"]}},"required":["beatId","url","aspect"]},"StyleSampleBeat":{"type":"object","properties":{"id":{"type":"string"},"subject":{"type":"string"},"tests":{"type":"string"}},"required":["id","subject","tests"]},"StylePreset":{"type":"object","properties":{"id":{"type":"string"},"blurb":{"type":"string"},"goodFor":{"type":"array","items":{"type":"string"}},"sampleUrl":{"type":["string","null"]},"samples":{"type":"array","items":{"$ref":"#/components/schemas/StyleSample"}},"name":{"type":"string"},"register":{"type":"string","enum":["schematic","stylised","naturalistic","photoreal"]},"medium":{"type":"string"},"lineWork":{"type":"string"},"colorRule":{"type":"string"},"palette":{"type":"array","items":{"type":"string"}},"background":{"type":"string"},"subjectGrammar":{"type":"string"},"textInImage":{"type":"string","enum":["none","hand-lettered","clean-overlay"]},"negatives":{"type":"array","items":{"type":"string"}},"composition":{"type":"object","properties":{"aspect":{"type":"string","enum":["16:9","9:16","1:1","4:5"]},"rules":{"type":"array","items":{"type":"string"}}},"required":["aspect","rules"]},"preferredModel":{"type":"string","enum":["flux-schnell","flux-2-pro"]},"seedStrategy":{"type":"string","enum":["per-channel","per-scene","random"]},"channelSeed":{"type":["integer","null"]}},"required":["id","blurb","goodFor","sampleUrl","samples","name","register","medium","lineWork","colorRule","palette","background","subjectGrammar","textInImage","negatives","composition","preferredModel","seedStrategy","channelSeed"]},"ListChannelsResponse":{"type":"object","properties":{"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}}},"required":["channels"]},"CreateChannelRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"stylePresetId":{"type":"string","minLength":1,"maxLength":80},"aspect":{"type":"string","enum":["16:9","9:16","1:1","4:5"]}},"required":["name"]},"CreateChannelResponse":{"type":"object","properties":{"channel":{"$ref":"#/components/schemas/Channel"},"styleContract":{"allOf":[{"$ref":"#/components/schemas/StyleContract"},{"type":["object","null"]}]}},"required":["channel","styleContract"]},"GetChannelResponse":{"type":"object","properties":{"channel":{"$ref":"#/components/schemas/Channel"}},"required":["channel"]},"PatchChannelRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"defaultStyleContractId":{"type":"string"},"defaultStyleContractVersion":{"type":"integer","exclusiveMinimum":0}}},"PatchChannelResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"ListStyleContractsResponse":{"type":"object","properties":{"styleContracts":{"type":"array","items":{"$ref":"#/components/schemas/StyleContract"}}},"required":["styleContracts"]},"CreateStyleContractRequest":{"anyOf":[{"type":"object","properties":{"presetId":{"type":"string","minLength":1,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":120},"aspect":{"type":"string","enum":["16:9","9:16","1:1","4:5"]}},"required":["presetId"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"register":{"type":"string","enum":["schematic","stylised","naturalistic","photoreal"]},"medium":{"type":"string"},"lineWork":{"type":"string"},"colorRule":{"type":"string"},"palette":{"type":"array","items":{"type":"string"}},"background":{"type":"string"},"subjectGrammar":{"type":"string"},"textInImage":{"type":"string","enum":["none","hand-lettered","clean-overlay"]},"negatives":{"type":"array","items":{"type":"string"}},"composition":{"type":"object","properties":{"aspect":{"type":"string","enum":["16:9","9:16","1:1","4:5"]},"rules":{"type":"array","items":{"type":"string"}}},"required":["aspect","rules"]},"preferredModel":{"type":"string","enum":["flux-schnell","flux-2-pro"]},"seedStrategy":{"type":"string","enum":["per-channel","per-scene","random"]},"channelSeed":{"type":["integer","null"]}},"required":["name","register","medium","lineWork","colorRule","palette","background","subjectGrammar","textInImage","negatives","composition","preferredModel","seedStrategy","channelSeed"]}]},"CreateStyleContractResponse":{"type":"object","properties":{"styleContract":{"$ref":"#/components/schemas/StyleContract"}},"required":["styleContract"]},"GetStyleContractResponse":{"type":"object","properties":{"styleContract":{"$ref":"#/components/schemas/StyleContract"}},"required":["styleContract"]},"PatchStyleContractRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"register":{"type":"string","enum":["schematic","stylised","naturalistic","photoreal"]},"medium":{"type":"string"},"lineWork":{"type":"string"},"colorRule":{"type":"string"},"palette":{"type":"array","items":{"type":"string"}},"background":{"type":"string"},"subjectGrammar":{"type":"string"},"textInImage":{"type":"string","enum":["none","hand-lettered","clean-overlay"]},"negatives":{"type":"array","items":{"type":"string"}},"composition":{"type":"object","properties":{"aspect":{"type":"string","enum":["16:9","9:16","1:1","4:5"]},"rules":{"type":"array","items":{"type":"string"}}},"required":["aspect","rules"]},"preferredModel":{"type":"string","enum":["flux-schnell","flux-2-pro"]},"seedStrategy":{"type":"string","enum":["per-channel","per-scene","random"]},"channelSeed":{"type":["integer","null"]}}},"ListStylePresetsResponse":{"type":"object","properties":{"presets":{"type":"array","items":{"$ref":"#/components/schemas/StylePreset"}},"sampleBeats":{"type":"array","items":{"$ref":"#/components/schemas/StyleSampleBeat"}},"sampleSeed":{"type":"integer"}},"required":["presets","sampleBeats","sampleSeed"]},"StoryLook":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","saved"]},"words":{"type":"string"},"aspect":{"type":"string","enum":["16:9","9:16","1:1","4:5"]},"fields":{"type":"object","properties":{"medium":{"type":"string"},"lineWork":{"type":"string"},"colorRule":{"type":"string"},"palette":{"type":"array","items":{"type":"string"}},"background":{"type":"string"},"subjectGrammar":{"type":"string"},"textInImage":{"type":"string","enum":["none","hand-lettered","clean-overlay"]},"negatives":{"type":"array","items":{"type":"string"}}},"required":["medium","lineWork","colorRule","palette","background","subjectGrammar","textInImage","negatives"]},"recipe":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"]}},"samples":{"type":"array","items":{"type":"object","properties":{"beatId":{"type":"string"},"url":{"type":["string","null"]},"assetId":{"type":["string","null"]}},"required":["beatId","url","assetId"]}},"fromId":{"type":["string","null"]},"createdAt":{"type":"string"},"savedAt":{"type":["string","null"]}},"required":["id","name","status","words","aspect","fields","recipe","samples","fromId","createdAt","savedAt"]},"StoryLookList":{"type":"object","properties":{"looks":{"type":"array","items":{"$ref":"#/components/schemas/StoryLook"}},"triesLeft":{"type":"integer","minimum":0}},"required":["looks","triesLeft"]},"CreateStoryLookRequest":{"type":"object","properties":{"words":{"type":"string","minLength":1,"maxLength":600},"aspect":{"type":"string","enum":["16:9","9:16","1:1","4:5"]},"from":{"type":"string","format":"uuid"}},"required":["words"]},"SaveStoryLookRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40}}},"RenameStoryLookRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40}},"required":["name"]},"UseStoryLookRequest":{"type":"object","properties":{"channelId":{"type":"string"},"aspect":{"type":"string","enum":["16:9","9:16","1:1","4:5"]}},"required":["channelId","aspect"]},"UseStoryLookResponse":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer","exclusiveMinimum":0}},"required":["id","version"]},"GeneratedAsset":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"channelId":{"type":["string","null"]},"projectId":{"type":["string","null"]},"provider":{"type":"string","enum":["replicate"]},"model":{"type":"string"},"prompt":{"type":"string"},"negativePrompt":{"type":["string","null"]},"seed":{"type":["integer","null"]},"costMinorUnits":{"type":"integer"},"generatedAt":{"type":"string"},"styleContractId":{"type":["string","null"]},"styleContractVersion":{"type":["integer","null"]},"characterIds":{"type":"array","items":{"type":"string"}},"width":{"type":"integer"},"height":{"type":"integer"},"aspect":{"type":"string"},"mimeType":{"type":"string"},"bytes":{"type":"integer"},"sha256":{"type":"string"},"sceneText":{"type":["string","null"]},"caption":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"consistencyScore":{"type":["number","null"]},"approved":{"type":"boolean"},"rejected":{"type":"boolean"},"usageCount":{"type":"integer"},"lastUsedAt":{"type":["string","null"]},"supersededBy":{"type":["string","null"]},"visibility":{"type":"string","enum":["private","channel"]},"url":{"type":["string","null"]},"urlExpiresAt":{"type":["string","null"]}},"required":["id","userId","channelId","projectId","provider","model","prompt","negativePrompt","seed","costMinorUnits","generatedAt","styleContractId","styleContractVersion","characterIds","width","height","aspect","mimeType","bytes","sha256","sceneText","caption","tags","consistencyScore","approved","rejected","usageCount","lastUsedAt","supersededBy","visibility","url","urlExpiresAt"]},"ListAssetsResponse":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/GeneratedAsset"}},"nextCursor":{"type":["string","null"]}},"required":["assets","nextCursor"]},"Subject":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["character","creature","object","place","motif"]},"scope":{"type":"string","enum":["video","channel"]},"channelId":{"type":["string","null"]},"originProjectId":{"type":"string"},"name":{"type":"string"},"appearance":{"type":"string"},"invariants":{"type":"array","items":{"type":"string"}},"observedAppearance":{"type":["string","null"]},"observedAt":{"type":["string","null"]},"portraitStyleMatch":{"type":["number","null"]},"portraitSceneMatch":{"type":["number","null"]},"portraitScoredAt":{"type":["string","null"]},"portraitBelowFloor":{"type":"boolean"},"portraitWorstAxis":{"type":["string","null"],"enum":["style","scene"]},"portraitFactsBroken":{"type":"array","items":{"type":"string"}},"portraitFacts":{"type":"array","items":{"type":"string"}},"lockedBy":{"type":["string","null"],"enum":["uploaded","described","picked","auto"]},"referenceAssetId":{"type":["string","null"]},"variantAssetIds":{"type":"array","items":{"type":"string"}},"referenceUrl":{"type":["string","null"]},"variantUrls":{"type":"array","items":{"type":["string","null"]}},"styleContractId":{"type":["string","null"]},"styleContractVersion":{"type":["integer","null"]},"seed":{"type":["integer","null"]},"sceneCount":{"type":"integer"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","scope","channelId","originProjectId","name","appearance","invariants","observedAppearance","observedAt","portraitStyleMatch","portraitSceneMatch","portraitScoredAt","portraitBelowFloor","portraitWorstAxis","portraitFactsBroken","portraitFacts","lockedBy","referenceAssetId","variantAssetIds","referenceUrl","variantUrls","styleContractId","styleContractVersion","seed","sceneCount","createdAt","updatedAt"]},"LockGate":{"type":"object","properties":{"ceremony":{"type":"string","enum":["silent","review","choose","required"]},"total":{"type":"integer"},"locked":{"type":"integer"},"pending":{"type":"array","items":{"type":"string"}},"blocking":{"type":"boolean"}},"required":["ceremony","total","locked","pending","blocking"]},"ExtractSubjectsRequest":{"type":"object","properties":{"transcript":{"type":"string","minLength":1,"maxLength":200000},"durationSec":{"type":"integer","exclusiveMinimum":0},"styleContractId":{"type":"string","minLength":1},"styleContractVersion":{"type":"integer","exclusiveMinimum":0},"channelId":{"type":"string","minLength":1},"authored":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["character","creature","object","place","motif"]},"appearance":{"type":"string","minLength":1,"maxLength":2000}},"required":["name","kind","appearance"]},"maxItems":24},"authoredDirection":{"type":"object","properties":{"styleNote":{"type":"string","minLength":1,"maxLength":4000},"pictures":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000},"maxItems":400}}}},"required":["transcript","durationSec","styleContractId","styleContractVersion"]},"ExtractSubjectsResponse":{"type":"object","properties":{"subjects":{"type":"array","items":{"$ref":"#/components/schemas/Subject"}},"gate":{"$ref":"#/components/schemas/LockGate"},"binding":{"type":["object","null"],"properties":{"styleContractId":{"type":"string"},"styleContractVersion":{"type":"integer"},"channelId":{"type":["string","null"]}},"required":["styleContractId","styleContractVersion","channelId"]},"replaced":{"type":"boolean"},"setting":{"type":["string","null"]}},"required":["subjects","gate","binding","replaced","setting"]},"ListSubjectsResponse":{"type":"object","properties":{"subjects":{"type":"array","items":{"$ref":"#/components/schemas/Subject"}},"gate":{"$ref":"#/components/schemas/LockGate"},"binding":{"type":["object","null"],"properties":{"styleContractId":{"type":"string"},"styleContractVersion":{"type":"integer"},"channelId":{"type":["string","null"]}},"required":["styleContractId","styleContractVersion","channelId"]}},"required":["subjects","gate","binding"]},"GetSubjectResponse":{"type":"object","properties":{"subject":{"$ref":"#/components/schemas/Subject"}},"required":["subject"]},"PatchSubjectRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["character","creature","object","place","motif"]},"scope":{"type":"string","enum":["video","channel"]},"appearance":{"type":"string","maxLength":2000},"invariants":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300},"maxItems":5},"lockedBy":{"type":"string","enum":["uploaded","described","picked","auto"]},"referenceAssetId":{"type":"string","minLength":1},"variantAssetIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":12},"seed":{"type":"integer"}}},"PatchSubjectResponse":{"type":"object","properties":{"subject":{"$ref":"#/components/schemas/Subject"},"gate":{"$ref":"#/components/schemas/LockGate"}},"required":["subject","gate"]},"GenerateSubjectReferenceRequest":{"type":"object","properties":{"recheck":{"type":"boolean"},"variants":{"type":"integer","minimum":1,"maximum":4},"regenerate":{"type":"boolean"}}},"GenerateSubjectReferenceResponse":{"type":"object","properties":{"subject":{"$ref":"#/components/schemas/Subject"},"gate":{"$ref":"#/components/schemas/LockGate"},"assetIds":{"type":"array","items":{"type":"string"}},"reused":{"type":"boolean"},"autoLocked":{"type":"boolean"},"letteringRedraws":{"type":"integer","minimum":0},"letteringDefect":{"type":["object","null"],"properties":{"text":{"type":"boolean"},"border":{"type":"boolean"},"where":{"type":"string"}},"required":["text","border","where"]}},"required":["subject","gate","assetIds","reused","autoLocked"]},"UploadSubjectReferenceQuery":{"type":"object","properties":{"isSelf":{"type":["boolean","null"]},"hasPermission":{"type":["boolean","null"]}}},"UploadSubjectReferenceResponse":{"type":"object","properties":{"subject":{"$ref":"#/components/schemas/Subject"},"gate":{"$ref":"#/components/schemas/LockGate"},"assetId":{"type":"string"},"deduplicated":{"type":"boolean"},"appearance":{"type":["string","null"]}},"required":["subject","gate","assetId","deduplicated","appearance"]},"DeleteSubjectResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"gate":{"$ref":"#/components/schemas/LockGate"}},"required":["ok","gate"]},"SceneDepth":{"type":"object","properties":{"assetId":{"type":"string"},"assetUrl":{"type":["string","null"]},"relief":{"type":"number"}},"required":["assetId","assetUrl","relief"]},"PlannedScene":{"type":"object","properties":{"id":{"type":"string"},"planId":{"type":"string"},"index":{"type":"integer"},"startMs":{"type":"integer"},"endMs":{"type":"integer"},"section":{"type":"string"},"narration":{"type":"string"},"subject":{"type":"string"},"prompt":{"type":["string","null"]},"caption":{"type":"string"},"label":{"type":"string"},"needsText":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"motion":{"type":"string","enum":["hold","push-in","pull-out","pan-left","pan-right","tilt-up","tilt-down"]},"transition":{"type":"string","enum":["cross-dissolve","cut","ridged-burn","light-leak","cinematic-zoom","sdf-iris","chromatic-radial-split","thermal-distortion","ripple-waves","cross-warp-morph","flash-through-white","glitch","whip-pan","push-slide","vertical-push","elastic-push","page-slide","cut-the-curve","gravity-drop","circle-iris","diamond-iris","diagonal-split","clock-wipe","shutter","blur-through","directional-blur","calm-blur-through","focus-pull","color-dip","zoom-through","page-burn","cover-blocks","cover-blinds","grid-dissolve","morph-circle","halftone","squeeze","overexposure","vertical-blinds","directional-wipe","ordered-dither","card-flip","grid-pixelate","zoom-out","parallax-zoom","parallax-unzoom","rubber-band","torn-paper","curtain","paper-collage"]},"subjectIds":{"type":"array","items":{"type":"string"}},"assetId":{"type":["string","null"]},"assetUrl":{"type":["string","null"]},"assetSource":{"type":["string","null"],"enum":["generated","upload","stock"]},"stockMiss":{"type":["string","null"],"enum":["no_fit","limited","error"]},"assetCredit":{"type":["object","null"],"properties":{"provider":{"type":"string","enum":["pexels","pixabay"]},"creator_name":{"type":"string"},"creator_url":{"type":"string"},"source_url":{"type":"string"}},"required":["provider","creator_name","creator_url","source_url"]},"depth":{"allOf":[{"$ref":"#/components/schemas/SceneDepth"},{"type":["object","null"]}]},"entities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["person","organization","product"]},"slot":{"type":"string","enum":["center","left","right"]},"status":{"type":"string","enum":["pending","found","missing"]},"assetId":{"type":["string","null"]},"assetUrl":{"type":["string","null"]},"role":{"type":["string","null"],"enum":["photo","logo"]},"source":{"type":["string","null"],"enum":["wikimedia","brandfetch","upload"]},"licence":{"type":["string","null"]},"licenceUrl":{"type":["string","null"]},"creator":{"type":["string","null"]},"sourcePage":{"type":["string","null"]},"attributionRequired":{"type":"boolean"},"context":{"type":["string","null"]},"miss":{"type":["string","null"],"enum":["not_found","wrong_kind","ambiguous","no_picture","licence","not_stored"]}},"required":["name","kind","slot","status","assetId","assetUrl","role","source","licence","licenceUrl","creator","sourcePage","attributionRequired"]}},"consistencyScore":{"type":["number","null"]},"letteringDefect":{"type":["object","null"],"properties":{"text":{"type":"boolean"},"border":{"type":"boolean"},"where":{"type":"string"}},"required":["text","border","where"]},"belowFloor":{"type":"boolean"},"worstAxis":{"type":["string","null"],"enum":["style","identity","scene"]},"styleMatch":{"type":["number","null"]},"identityMatch":{"type":["number","null"]},"sceneMatch":{"type":["number","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","planId","index","startMs","endMs","section","narration","subject","prompt","caption","label","needsText","tags","motion","transition","subjectIds","assetId","assetUrl","consistencyScore","belowFloor","worstAxis","styleMatch","identityMatch","sceneMatch","createdAt","updatedAt"]},"ScenePlan":{"type":"object","properties":{"aspect":{"type":["string","null"]},"id":{"type":"string"},"projectId":{"type":"string"},"channelId":{"type":["string","null"]},"styleContractId":{"type":"string"},"styleContractVersion":{"type":"integer"},"durationMs":{"type":"integer"},"plannedBy":{"type":"string"},"styleClause":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["aspect","id","projectId","channelId","styleContractId","styleContractVersion","durationMs","plannedBy","styleClause","createdAt","updatedAt"]},"ScenePlanSummary":{"type":"object","properties":{"sceneCount":{"type":"integer"},"durationMs":{"type":"integer"},"scenesPerMinute":{"type":"number"},"meanHoldMs":{"type":"integer"},"shortestHoldMs":{"type":"integer"},"longestHoldMs":{"type":"integer"},"tooShort":{"type":"integer"},"tooLong":{"type":"integer"},"multiSubject":{"type":"integer"},"withoutSubject":{"type":"integer"},"generated":{"type":"integer"},"remaining":{"type":"integer"},"estimatedCostMinorUnits":{"type":"integer"},"imageQuality":{"type":"string","enum":["standard","best"]},"estimateByQuality":{"type":"object","properties":{"standard":{"type":"integer"},"best":{"type":"integer"}},"required":["standard","best"]},"pictureSource":{"type":"string","enum":["drawn","stock"]},"estimatedSeconds":{"type":"integer"}},"required":["sceneCount","durationMs","scenesPerMinute","meanHoldMs","shortestHoldMs","longestHoldMs","tooShort","tooLong","multiSubject","withoutSubject","generated","remaining","estimatedCostMinorUnits","estimatedSeconds"]},"PlanDrops":{"type":"object","properties":{"styleLeak":{"type":"integer"},"unknownSentence":{"type":"integer"},"overCap":{"type":"integer"},"malformed":{"type":"integer"},"unknownSubjects":{"type":"integer"},"textLeak":{"type":"integer"},"textFlagWithoutWords":{"type":"integer"}},"required":["styleLeak","unknownSentence","overCap","malformed","unknownSubjects"]},"PlanScenesRequest":{"type":"object","properties":{"sentences":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":4000},"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0}},"required":["text","startMs","endMs"]},"minItems":1,"maxItems":4000},"durationMs":{"type":"integer","exclusiveMinimum":0,"maximum":900000},"styleContractId":{"type":"string","minLength":1},"styleContractVersion":{"type":"integer","exclusiveMinimum":0},"channelId":{"type":"string","minLength":1},"authoredBeats":{"type":"array","items":{"type":"object","properties":{"sentenceIndex":{"type":"integer","minimum":0},"imagePrompt":{"type":"string","minLength":1,"maxLength":2000}},"required":["sentenceIndex","imagePrompt"]},"maxItems":400},"fresh":{"type":"boolean"}},"required":["sentences","durationMs","styleContractId","styleContractVersion"]},"PlanScenesResponse":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/ScenePlan"},"scenes":{"type":"array","items":{"$ref":"#/components/schemas/PlannedScene"}},"summary":{"$ref":"#/components/schemas/ScenePlanSummary"},"gate":{"$ref":"#/components/schemas/LockGate"},"drops":{"$ref":"#/components/schemas/PlanDrops"},"replaced":{"type":"boolean"},"retainedAssets":{"type":"integer"},"reused":{"type":"boolean"}},"required":["plan","scenes","summary","gate","drops","replaced","retainedAssets","reused"]},"GenerateScenesResponse":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"streamUrl":{"type":"string"},"pollUrl":{"type":"string"},"async":{"type":"boolean","enum":[true]},"resumed":{"type":"boolean"},"pending":{"type":"integer"},"estimatedCostMinorUnits":{"type":"integer"},"estimatedSeconds":{"type":"integer"}},"required":["jobId","status","streamUrl","pollUrl","async","resumed","pending","estimatedCostMinorUnits","estimatedSeconds"]},"StoryClipQuoteRequest":{"type":"object","properties":{"mode":{"type":"string","enum":["key","every","scenes"]},"sceneIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":200}},"required":["mode"]},"StoryClipQuote":{"type":"object","properties":{"scenes":{"type":"array","items":{"type":"object","properties":{"sceneId":{"type":"string"},"index":{"type":"integer"},"eligible":{"type":"boolean"},"reason":{"type":"string","enum":["words","real_person","child","map","not_drawn","no_picture","too_short","not_story","shape"]},"reasonWords":{"type":"string"},"moves":{"type":"boolean"},"seconds":{"type":"integer"},"priceMinor":{"type":"integer"}},"required":["sceneId","index","eligible","moves","seconds","priceMinor"]}},"count":{"type":"integer"},"priceMinor":{"type":"integer"},"currency":{"type":"string"},"maxPerVideo":{"type":"integer"},"capped":{"type":"boolean"},"etaSeconds":{"type":"integer"},"wallet":{"type":["object","null"],"properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 code, e.g. \"INR\", \"JPY\". Any code: do not switch on a fixed list."},"priceMinor":{"type":"integer","description":"What it will probably cost. 0 for something free (a pitch)."},"requiredMinor":{"type":"integer","description":"What the wallet must hold to start: also what is held while it runs."},"balanceMinor":{"type":"integer","description":"Spendable now (running jobs’ holds already out)."},"allowed":{"type":"boolean","description":"False: it would be refused now. Nothing was started or spent."},"shortfallMinor":{"type":"integer","description":"How much more the wallet needs. 0 when allowed."},"topUpMinor":{"type":"integer","description":"What an \"Add money\" button should offer: the shortfall, or the minimum top-up if that is more. 0 when allowed."},"settlesAtActualCost":{"type":"boolean","description":"True when the final charge is the job’s measured cost (motion), so it may differ from `priceMinor`; false when the price is fixed by the input (minutes of takes)."}},"required":["currency","priceMinor","requiredMinor","balanceMinor","allowed","shortfallMinor","topUpMinor","settlesAtActualCost"]}},"required":["scenes","count","priceMinor","currency","maxPerVideo","capped","etaSeconds","wallet"]},"StoryClipAnimateResponse":{"type":"object","properties":{"jobId":{"type":"string"},"streamUrl":{"type":"string"},"pollUrl":{"type":"string"},"sceneIds":{"type":"array","items":{"type":"string"}},"resumed":{"type":"boolean"}},"required":["jobId","streamUrl","pollUrl","sceneIds","resumed"]},"StoryClipSceneRequest":{"type":"object","properties":{"gentler":{"type":"boolean"}}},"SceneClipList":{"type":"object","properties":{"clips":{"type":"array","items":{"type":"object","properties":{"sceneId":{"type":"string"},"status":{"type":"string","enum":["queued","making","checking","ready","kept_still","failed_provider"]},"assetId":{"type":["string","null"]},"jobId":{"type":["string","null"]},"model":{"type":["string","null"]},"attempts":{"type":"integer"},"keptStillReason":{"type":["string","null"]},"message":{"type":"string"},"tries":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"outcome":{"type":"string","enum":["start_failed","clip_failed","check_failed","ready"]},"reason":{"type":["string","null"]},"detail":{"type":["string","null"]},"predictionId":{"type":["string","null"]},"identity":{"type":["number","null"]},"style":{"type":["number","null"]},"stillIdentity":{"type":["number","null"]},"at":{"type":"string"}},"required":["model","outcome","reason","detail","predictionId","at"]}}},"required":["sceneId","status","assetId","jobId","model","attempts","keptStillReason","message"]}}},"required":["clips"]},"ListScenesResponse":{"type":"object","properties":{"plan":{"allOf":[{"$ref":"#/components/schemas/ScenePlan"},{"type":["object","null"]}]},"scenes":{"type":"array","items":{"$ref":"#/components/schemas/PlannedScene"}},"summary":{"$ref":"#/components/schemas/ScenePlanSummary"},"planning":{"type":["object","null"],"properties":{"startedAt":{"type":"string"}},"required":["startedAt"]}},"required":["plan","scenes","summary","planning"]},"PatchSceneRequest":{"type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":2000},"caption":{"type":"string","maxLength":2000},"label":{"type":"string","maxLength":128},"needsText":{"type":"boolean"},"entities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"kind":{"type":"string","enum":["person","organization","product"]},"context":{"type":"string","maxLength":160}},"required":["name","kind"]},"maxItems":2},"tags":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":8},"section":{"type":"string","maxLength":40},"motion":{"type":"string","enum":["hold","push-in","pull-out","pan-left","pan-right","tilt-up","tilt-down"]},"transition":{"type":"string","enum":["cross-dissolve","cut","ridged-burn","light-leak","cinematic-zoom","sdf-iris","chromatic-radial-split","thermal-distortion","ripple-waves","cross-warp-morph","flash-through-white","glitch","whip-pan","push-slide","vertical-push","elastic-push","page-slide","cut-the-curve","gravity-drop","circle-iris","diamond-iris","diagonal-split","clock-wipe","shutter","blur-through","directional-blur","calm-blur-through","focus-pull","color-dip","zoom-through","page-burn","cover-blocks","cover-blinds","grid-dissolve","morph-circle","halftone","squeeze","overexposure","vertical-blinds","directional-wipe","ordered-dither","card-flip","grid-pixelate","zoom-out","parallax-zoom","parallax-unzoom","rubber-band","torn-paper","curtain","paper-collage"]},"subjectIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":4},"startMs":{"type":"integer","minimum":0},"assetId":{"type":["string","null"],"minLength":1}}},"SceneListResponse":{"type":"object","properties":{"scenes":{"type":"array","items":{"$ref":"#/components/schemas/PlannedScene"}},"summary":{"$ref":"#/components/schemas/ScenePlanSummary"}},"required":["scenes","summary"]},"AddSceneRequest":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"atMs":{"type":"integer","minimum":0},"subject":{"type":"string","maxLength":2000}},"required":["index","atMs"]},"AddSceneResponse":{"type":"object","properties":{"scenes":{"type":"array","items":{"$ref":"#/components/schemas/PlannedScene"}},"summary":{"$ref":"#/components/schemas/ScenePlanSummary"}},"required":["scenes","summary"]},"FindStockPhotoResponse":{"type":"object","properties":{"outcome":{"type":"string","enum":["found","no_fit","limited","error"]},"scenes":{"type":"array","items":{"$ref":"#/components/schemas/PlannedScene"}},"summary":{"$ref":"#/components/schemas/ScenePlanSummary"}},"required":["outcome","scenes","summary"]},"RedrawSceneResponse":{"type":"object","properties":{"scenes":{"type":"array","items":{"$ref":"#/components/schemas/PlannedScene"}},"summary":{"$ref":"#/components/schemas/ScenePlanSummary"},"assetId":{"type":"string"},"unchanged":{"type":"boolean"},"costMinorUnits":{"type":"number"},"letteringRedraws":{"type":"integer","minimum":0},"keptPrevious":{"type":"boolean"}},"required":["scenes","summary","assetId","unchanged","costMinorUnits"]},"RewriteSceneResponse":{"type":"object","properties":{"sceneId":{"type":"string"},"subject":{"type":"string"},"change":{"type":"string"},"risksBefore":{"type":"array","items":{"type":"string","enum":["relationship","empty-by-negation","geography"]}},"risksAfter":{"type":"array","items":{"type":"string","enum":["relationship","empty-by-negation","geography"]}},"unchanged":{"type":"boolean"}},"required":["sceneId","subject","change","risksBefore","risksAfter","unchanged"]},"SceneLayoutResponse":{"type":"object","properties":{"scenes":{"type":"array","items":{"type":"object","properties":{"sceneId":{"type":"string"},"cells":{"type":"array","items":{"type":"string"}},"grid":{"type":"object","properties":{"cols":{"type":"integer"},"rows":{"type":"integer"}},"required":["cols","rows"]},"read":{"type":"boolean"}},"required":["sceneId","cells","grid","read"]}},"readNow":{"type":"integer"},"failed":{"type":"integer"}},"required":["scenes","readNow","failed"]},"SceneDepthEntry":{"type":"object","properties":{"sceneId":{"type":"string"},"depth":{"allOf":[{"$ref":"#/components/schemas/SceneDepth"},{"type":["object","null"]}]}},"required":["sceneId","depth"]},"SceneDepthResponse":{"type":"object","properties":{"scenes":{"type":"array","items":{"$ref":"#/components/schemas/SceneDepthEntry"}},"madeNow":{"type":"integer"},"failed":{"type":"integer"}},"required":["scenes","madeNow","failed"]},"UploadSceneImageResponse":{"type":"object","properties":{"scenes":{"type":"array","items":{"$ref":"#/components/schemas/PlannedScene"}},"summary":{"$ref":"#/components/schemas/ScenePlanSummary"},"assetId":{"type":"string"},"deduplicated":{"type":"boolean"}},"required":["scenes","summary","assetId","deduplicated"]},"DeleteSceneResponse":{"type":"object","properties":{"scenes":{"type":"array","items":{"$ref":"#/components/schemas/PlannedScene"}},"summary":{"$ref":"#/components/schemas/ScenePlanSummary"},"ok":{"type":"boolean","enum":[true]}},"required":["scenes","summary","ok"]},"SearchAssetsResponse":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/GeneratedAsset"}}},"required":["assets"]},"GetAssetResponse":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/GeneratedAsset"}},"required":["asset"]},"GenerateAssetRequest":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000},"negativePrompt":{"type":"string","maxLength":2000},"aspect":{"type":"string","enum":["16:9","9:16","1:1","4:5"]},"model":{"type":"string"},"seed":{"type":"integer"},"channelId":{"type":"string"},"projectId":{"type":"string"},"styleContractId":{"type":"string"},"styleContractVersion":{"type":"integer"},"sceneText":{"type":"string","maxLength":4000},"tags":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":32},"caption":{"type":"string","maxLength":2000},"characterIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":8}},"required":["prompt"]},"GenerateAssetResponse":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/GeneratedAsset"},"deduplicated":{"type":"boolean"}},"required":["asset","deduplicated"]},"EditAssetRequest":{"type":"object","properties":{"instruction":{"type":"string","minLength":1,"maxLength":2000},"projectId":{"type":"string"},"tags":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":32},"caption":{"type":"string","maxLength":2000}},"required":["instruction"]},"EditAssetResponse":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/GeneratedAsset"},"unchanged":{"type":"boolean"},"deduplicated":{"type":"boolean"}},"required":["asset","unchanged","deduplicated"]},"PatchAssetRequest":{"type":"object","properties":{"approved":{"type":"boolean"},"rejected":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":32},"caption":{"type":"string","maxLength":2000}}},"PatchAssetResponse":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/GeneratedAsset"}},"required":["asset"]},"DeleteAssetResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"DocumentSpan":{"type":"object","properties":{"fromLine":{"type":"integer","exclusiveMinimum":0},"toLine":{"type":"integer","exclusiveMinimum":0},"text":{"type":"string"}},"required":["fromLine","toLine","text"]},"UnderstoodSubject":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["character","creature","object","place","motif"]},"appearance":{"type":"string"},"fromLine":{"type":"integer","exclusiveMinimum":0},"toLine":{"type":"integer","exclusiveMinimum":0}},"required":["name","kind","appearance","fromLine","toLine"]},"UnderstoodBeat":{"type":"object","properties":{"narrationIndex":{"type":["integer","null"],"minimum":0},"imagePrompt":{"type":"string"},"fromLine":{"type":"integer","exclusiveMinimum":0},"toLine":{"type":"integer","exclusiveMinimum":0}},"required":["narrationIndex","imagePrompt","fromLine","toLine"]},"UnderstoodIgnored":{"type":"object","properties":{"fromLine":{"type":"integer","exclusiveMinimum":0},"toLine":{"type":"integer","exclusiveMinimum":0},"text":{"type":"string"},"reason":{"type":"string"}},"required":["fromLine","toLine","text","reason"]},"StatedRuntime":{"type":"object","properties":{"text":{"type":"string"},"ms":{"type":"integer","exclusiveMinimum":0},"line":{"type":"integer","exclusiveMinimum":0}},"required":["text","ms","line"]},"ScriptCrossCheck":{"type":"object","properties":{"modelNarrationChars":{"type":"integer","minimum":0},"structuralNarrationChars":{"type":"integer","minimum":0},"disagreement":{"type":["object","null"],"properties":{"modelChars":{"type":"integer","minimum":0},"structuralChars":{"type":"integer","minimum":0},"factor":{"type":"number"},"larger":{"type":"string","enum":["model","structure"]}},"required":["modelChars","structuralChars","factor","larger"]}},"required":["modelNarrationChars","structuralNarrationChars","disagreement"]},"ResolveEntitiesRequest":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["person","organization","product"]},"context":{"type":"string","maxLength":160}},"required":["name","kind"]},"minItems":1,"maxItems":10}},"required":["entities"]},"ResolveEntitiesResponse":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["person","organization","product"]},"qid":{"type":["string","null"]},"label":{"type":["string","null"]},"description":{"type":["string","null"]},"domain":{"type":["string","null"]},"status":{"type":"string","enum":["found","missing"]},"miss":{"type":["string","null"],"enum":["not_found","wrong_kind","ambiguous","no_picture","licence","upstream_error","not_stored"]},"assetId":{"type":["string","null"]},"assetUrl":{"type":["string","null"]},"role":{"type":["string","null"],"enum":["photo","logo"]},"source":{"type":["string","null"],"enum":["wikimedia","brandfetch"]},"licence":{"type":["string","null"]},"licenceUrl":{"type":["string","null"]},"creator":{"type":["string","null"]},"sourcePage":{"type":["string","null"]},"attributionRequired":{"type":"boolean"}},"required":["name","kind","qid","label","description","domain","status","miss","assetId","assetUrl","role","source","licence","licenceUrl","creator","sourcePage","attributionRequired"]}}},"required":["entities"]},"CardTheme":{"type":"object","properties":{"fg":{"type":"string","pattern":"^#[0-9a-f]{6}$","description":"Text colour, lower-case 6-digit hex (`#rrggbb`). Dark (`#111111`) over a light frame, white (`#ffffff`) over a dark or mid one."},"brand":{"type":"string","pattern":"^#[0-9a-f]{6}$","description":"Accent colour, lower-case 6-digit hex (`#rrggbb`): the highlight, the underline, the number that pops. Chosen for contrast against the region of the frame behind the card. The renderer derives the secondary accents from it, so one colour restyles the whole card."}},"required":["fg","brand"],"description":"The two colours a card is drawn in. OPTIONAL: omit it and the card is drawn in Toast’s default theme — white text and orange accent — exactly as before this field existed. The browser client derives it FROM THE FRAME behind the card at the card’s start time (`chooseCardTheme` in `@toast/shared`: light frame → dark text, accent picked for contrast and hue distance), and a user may override it per card; a native client is expected to do the same from its own decoder. What crosses the wire is only these two hex strings — never the frame, a histogram or a luminance value — and both change pixels, which is why they are part of the render cache key."},"CaptionWord":{"type":"object","properties":{"t":{"type":"string","minLength":1,"maxLength":64,"description":"One spoken word as it is drawn, sound tags (`[laughs]`) already removed."},"s":{"type":"integer","minimum":0,"description":"When the word starts, in ms FROM THE CLIP’S START."},"e":{"type":"integer","minimum":0,"description":"When it ends, in ms from the clip’s start. `s <= e <= durationMs`."}},"required":["t","s","e"],"description":"One timed word of a caption."},"CardRenderItem":{"type":"object","properties":{"cardId":{"type":"string","minLength":1,"description":"Catalog id, from `GET /cards/catalog`. Example: `toast-stat`."},"styleId":{"type":"string","minLength":1,"description":"A style the card declares. Omit for the card’s own default."},"slots":{"type":"object","additionalProperties":{"type":"string","maxLength":280},"description":"Slot name -> the text to draw, validated against the card’s declared `slots`. An UNKNOWN slot name is a 400, never silently ignored: ignoring it renders a card with a blank where the number should be, and the first anyone knows is a customer watching the export. A slot the catalog row lists in `imageSlots` takes a PICTURE: send the id of a picture in the user’s library (the `/assets` routes), never a URL."},"width":{"type":"integer","minimum":64,"maximum":3840,"description":"Width of the CLIP in pixels — the card’s size, not the frame’s."},"height":{"type":"integer","minimum":64,"maximum":3840,"description":"Height of the CLIP in pixels — the card’s size, not the frame’s."},"durationMs":{"type":"integer","minimum":200,"maximum":15000,"description":"How long the card is on screen. Defaults to the card’s own default."},"theme":{"$ref":"#/components/schemas/CardTheme"},"words":{"type":"array","items":{"$ref":"#/components/schemas/CaptionWord"},"minItems":1,"maxItems":120,"description":"CAPTION STYLES ONLY (catalog rows with `purpose: \"caption\"`): the timed words of one stretch of the KEPT transcript, in speaking order, times in ms from the clip’s start — OUTPUT time, after the edit’s cuts, never source time. Required on a caption; a card with `words` is a 400, and so is a caption that sends them as a `words` slot. A clip is at most 15 s: cut a video’s words into clips at phrase boundaries (one clip never splits a phrase) and send them in batches. The style groups the words into phrases and highlights each on its own start, so send every word, not lines. These are the user’s spoken words, sent to Toast’s own renderer and to no third party."},"lang":{"type":"string","maxLength":16,"pattern":"^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$","description":"The language the card’s or caption’s words are written in, as a BCP-47 tag (`tr`, `ja`, `zh-Hant`): the captions-and-titles language the user picked, else the spoken one. OPTIONAL — omit it and the renderer guesses from the letters (Greek, else English rules). It changes pixels: capital letters follow the language (Turkish `i` → `İ`, Greek drops its accents) and Han characters are drawn in that language’s glyph forms (Japanese, Traditional Chinese, Korean). Part of the render cache key. A language code, never content."},"mode":{"type":"string","enum":["overlay","frame"],"description":"How the card is drawn. `overlay` (the default): a TRANSPARENT clip at the card’s size, which the client lays over its footage at a rect it chose. `frame`: the card IS the picture — an OPAQUE clip with its own background; send the FULL OUTPUT size as `width`/`height` and draw it at 0,0 over the whole frame for its window. The item keeps a safe box inside a frame (a tall frame leaves its bottom quarter for captions), so captions may still be drawn over it. Only a mode the catalog row lists in `modes` is accepted; any other is a 400. Part of the render cache key. A word about drawing, never content."},"backdrop":{"type":"string","enum":["aurora","grid","pulse","dots","mesh","blobs","flow","swirl","rays","plasma","strands"],"description":"FRAME ONLY: the moving ground the card is drawn on. Omit for the default (dark, with a glow in the theme brand colour), exactly as before this field existed. `aurora` three blurred colour fields drifting, `grid` scrolling hairlines, `pulse` a glow swelling on a beat, `dots` a drifting dot grid, `mesh` big soft fields drifting slowly, `blobs` two soft fields. Tinted with `theme.brand`. With `mode` other than `frame` it is a 400. Part of the render cache key. A word about drawing, never content. A client should keep one backdrop for a whole video, so its frames read as one look."},"motionBlur":{"type":"boolean","enum":[true],"description":"SHUTTER MOTION BLUR (session 97): the card is drawn at MOTION_BLUR_SAMPLES (4) times the frame rate and each frame averages a two-frame shutter centred on it, so a fast move smears along its path and a still card is unchanged. Costs about 4x the render time, so ask for it only on a card that moves fast. `true` or omitted; part of the render cache key only when set. A word about drawing, never content."}},"required":["cardId","slots","width","height"]},"CardRenderOutcome":{"type":"object","properties":{"index":{"type":"integer","description":"Index into the `cards` you submitted."},"ok":{"type":"boolean"},"assetId":{"type":"string","description":"The stored clip. Fetch the bytes with `GET /assets/:id/bytes`. Absent when `ok` is false."},"cached":{"type":"boolean","description":"True when this card was already rendered for this user and cost nothing. Renders are content-addressed on the card, style, slots, size and duration."},"error":{"type":"string","description":"Why this one card could not be drawn."}},"required":["index","ok"]},"CardCatalogEntry":{"type":"object","properties":{"id":{"type":"string","description":"Stable catalog id, e.g. `toast-stat`."},"purpose":{"type":"string","description":"What the card is for, e.g. `stat`."},"title":{"type":"string"},"description":{"type":"string"},"styles":{"type":"array","items":{"type":"string"},"description":"The first is the default."},"slots":{"type":"array","items":{"type":"string"},"description":"Every slot this card accepts."},"requiredSlots":{"type":"array","items":{"type":"string"},"description":"Slots that must be present and non-empty, or the render is a 400."},"defaultDurationMs":{"type":"integer"},"aspectHint":{"type":"string","description":"The shape the card was designed in. A hint for a picker, not a constraint."},"attribution":{"type":["string","null"],"description":"A credit this card REQUIRES in any output that contains it, or null. Carried as data rather than documentation so an export’s credits block can be generated rather than maintained by hand."},"revision":{"type":"string","description":"A hash of the card’s design. It changes whenever the card’s template does, and it is part of the render cache key, so a redesigned card is redrawn rather than served from cache in its old look. Never sent back. A client that keeps a drawn clip may store the revision it was drawn at and ask again when the catalog serves a different one — that is how a preview picks up a card design fix (an export that re-asks every card gets it anyway)."},"source":{"type":"string","description":"Where the design comes from when it is not Toast’s own, e.g. `hyperframes:count-up` for an item from the HyperFrames registry drawn in Toast’s theme. Absent on Toast’s own cards."},"slotTypes":{"type":"object","additionalProperties":{"type":"string","enum":["number"]},"description":"Slots that must be NUMBERS. The wire still carries every slot as text; a number slot whose text is not a finite number is a 400. Absent means every slot is free text."},"slotChoices":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Slots that take ONE OF A FEW WORDS (today only `style`): slot name -> the words it accepts. Empty or absent is always allowed and means the card’s default look. Another word is not a 400: the card falls back to its default, so a picker should offer only these."},"whenToUse":{"type":"string","description":"One sentence for a planner (human or model): the moment in a video this card is for, and what goes in each slot."},"cover":{"type":"object","properties":{"fromMs":{"type":"integer"},"toMs":{"type":"integer"},"full":{"type":"boolean"}},"required":["fromMs","toMs","full"],"description":"Overlay transitions only: where the clip COVERS the frame, in ms from its start at `defaultDurationMs`, measured off the rendered alpha. `full: false` is a wash that never fully covers (a light leak) and these are its brightest ms. To hide a cut, start the clip (fromMs + toMs) / 2 of ON-SCREEN time before the cut and play it at `defaultDurationMs`; at another length the window moves by rules that differ per item."},"verticals":{"type":"array","items":{"type":"string"},"description":"The kinds of video this card fits: `talking-head` (a person on camera), `faceless` (a narrator over drawn pictures) and/or `footage` (a property or event video Toast cuts from uploaded footage; its cards are placed by Toast, not offered to a planner). Absent means `talking-head` only — a lower third or a face pointer has nothing to point at in a faceless video. Expect more values later; ignore unknown ones."},"modes":{"type":"array","items":{"type":"string"},"description":"How this card can be drawn (`mode` on a render request): `overlay` over the footage and/or `frame` as the whole picture. The FIRST is the card’s default. Absent means `overlay` only. Expect more values later; ignore unknown ones."},"imageSlots":{"type":"array","items":{"type":"string"},"description":"Slots that take a PICTURE, not text: send the id of a picture in the user’s library (a picture Toast drew, a Wikimedia photo or Brandfetch logo the entity lookup stored, or a picture the user put on a frame). Toast reads it and sends it to its own renderer (no third party). Refused with a 400: another user’s asset, a deleted one, an uploaded reference photo of a cast member, a card clip or a depth map. A Wikimedia or Brandfetch picture needs the same credit on the video that it needs anywhere else. Absent means no picture slots."},"status":{"type":"string","description":"`draft`: the item is in the catalog and can be added BY HAND, but has not passed Toast’s visual review yet, so no planner places it automatically — show it to a person as a draft. Absent or `approved`: reviewed. Clients should expect more values later and treat an unknown one as `draft`."},"preview":{"type":"string","description":"Where a PICTURE of this card is (#1059): a path on this API, `/v1/cards/previews/<id>.webp?r=<revision>`, resolved against the API origin. A 384x216 WebP of the card drawn with example words over a dim ground (a frame card as its whole picture), for a picker. Public, no auth, so an image view can load it as is. Absent means no picture yet: show the title."},"lookPreviews":{"type":"object","additionalProperties":{"type":"string"},"description":"Pictures of this card in each of its LOOKS (#2284), `{ look: path }`, each a path on this API like `preview` (`/v1/cards/previews/<id>--<look>.webp?r=<revision>`), for a picker of looks: today only the property room label (`hf-property-room-label`), whose looks are the studio setting `labelStyle` (glass, minimal, tag, outline, frosted). Absent means none; a look missing from it has no picture yet. Expect more looks later; ignore unknown ones."}},"required":["id","purpose","title","description","styles","slots","requiredSlots","defaultDurationMs","aspectHint","attribution","revision"]},"RenderCardsResult":{"type":"object","properties":{"cards":{"type":"array","items":{"$ref":"#/components/schemas/CardRenderOutcome"}}},"required":["cards"],"description":"The job’s `result`. A card that failed is `ok: false` on ITS entry and does NOT fail the job — the beat is skipped and the export still runs. Read every entry."},"StockResolveResponse":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"A fresh link to the media. Temporary again — fetch it now, do not store it."},"thumbnail":{"type":["string","null"],"format":"uri"}},"required":["url","thumbnail"]},"CardCatalogResponse":{"type":"object","properties":{"cards":{"type":"array","items":{"$ref":"#/components/schemas/CardCatalogEntry"}}},"required":["cards"]},"CaptionStylesResponse":{"type":"object","properties":{"styles":{"type":"array","items":{"$ref":"#/components/schemas/CardCatalogEntry"},"description":"The HyperFrames CAPTION styles (purpose `caption`): never cards, never in the card catalog. Draw one through `POST /cards/render` with its id as `cardId`, `slots` for its options only, and the clip’s timed `words`. A `draft` style has not passed Toast’s visual review: offer it to a person as a draft."}},"required":["styles"]},"RenderCardsRequest":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"description":"The project this render belongs to. Must be the caller’s."},"cards":{"type":"array","items":{"$ref":"#/components/schemas/CardRenderItem"},"minItems":1,"maxItems":40,"description":"Every card in one call. A batch is rendered with bounded concurrency, so asking for a video’s cards together is much faster than one call each. At most 40 per call: a long video plans more than that, so split its cards across several calls."}},"required":["projectId","cards"]},"RenderCardsAccepted":{"type":"object","properties":{"jobId":{"type":"string","description":"Track it through `/jobs/*`."},"status":{"type":"string","enum":["queued"]},"streamUrl":{"type":"string","description":"Resumable SSE — `GET /jobs/:id/events`."},"pollUrl":{"type":"string","description":"Fallback — `GET /jobs/:id`, honour `Retry-After`."}},"required":["jobId","status","streamUrl","pollUrl"]},"UnderstandScriptRequest":{"type":"object","properties":{"document":{"type":"string","minLength":1,"maxLength":60000},"styleContractId":{"type":"string","minLength":1},"styleContractVersion":{"type":"integer","exclusiveMinimum":0}},"required":["document"]},"UnderstandScriptResponse":{"type":"object","properties":{"narration":{"type":"array","items":{"$ref":"#/components/schemas/DocumentSpan"}},"subjects":{"type":"array","items":{"$ref":"#/components/schemas/UnderstoodSubject"}},"beats":{"type":"array","items":{"$ref":"#/components/schemas/UnderstoodBeat"}},"styleNote":{"allOf":[{"$ref":"#/components/schemas/DocumentSpan"},{"type":["object","null"]}]},"ignored":{"type":"array","items":{"$ref":"#/components/schemas/UnderstoodIgnored"}},"statedRuntime":{"allOf":[{"$ref":"#/components/schemas/StatedRuntime"},{"type":["object","null"]}]},"crossCheck":{"$ref":"#/components/schemas/ScriptCrossCheck"},"documentHash":{"type":"string"}},"required":["narration","subjects","beats","styleNote","ignored","statedRuntime","crossCheck","documentHash"]},"CreateVoiceRequest":{"type":"object","properties":{"sampleBase64":{"type":"string","minLength":100},"attestation":{"type":"string","enum":["self","permission"]},"label":{"type":"string","minLength":1,"maxLength":60}},"required":["sampleBase64","attestation"]},"VoiceProfile":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"attestation":{"type":"string","enum":["self","permission"]},"sampleSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"measure":{"type":"object","properties":{"durationMs":{"type":"integer","minimum":0},"loudnessDb":{"type":"number"},"noiseFloorDb":{"type":"number"},"speechRatio":{"type":"number","minimum":0,"maximum":1},"clippedRatio":{"type":"number","minimum":0,"maximum":1}},"required":["durationMs","loudnessDb","noiseFloorDb","speechRatio","clippedRatio"]},"createdAt":{"type":"string"}},"required":["id","label","attestation","sampleSha256","measure","createdAt"]},"VoiceProfileList":{"type":"object","properties":{"voices":{"type":"array","items":{"$ref":"#/components/schemas/VoiceProfile"}},"enabled":{"type":"boolean"}},"required":["voices","enabled"]},"DeleteVoiceResponse":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"]},"ObjectLayerAccess":{"type":"object","properties":{"enabled":{"type":"boolean"},"removal":{"type":"object","properties":{"enabled":{"type":"boolean"},"maxSeconds":{"type":"integer","exclusiveMinimum":0}},"required":["enabled","maxSeconds"]}},"required":["enabled","removal"]},"ObjectLabelChatRequest":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":1000},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","maxLength":200},"start_ms":{"type":"integer","minimum":0},"end_ms":{"type":"integer","minimum":0},"hidden":{"type":"boolean"}},"required":["id","text","start_ms","end_ms"]},"maxItems":100},"pinned":{"type":["object","null"],"properties":{"frame_ms":{"type":"integer","minimum":0}},"required":["frame_ms"]}},"required":["message","labels","pinned"]},"ObjectLabelChatResponse":{"type":"object","properties":{"ops":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","enum":["label"]},"object_id":{"type":"string"},"text":{"type":"string","minLength":1,"maxLength":60}},"required":["op","object_id","text"]},{"type":"object","properties":{"op":{"type":"string","enum":["hide"]},"object_id":{"type":"string"}},"required":["op","object_id"]},{"type":"object","properties":{"op":{"type":"string","enum":["show"]},"object_id":{"type":"string"}},"required":["op","object_id"]},{"type":"object","properties":{"op":{"type":"string","enum":["delete"]},"object_id":{"type":"string"}},"required":["op","object_id"]},{"type":"object","properties":{"op":{"type":"string","enum":["place"]},"object_id":{"type":"string"},"placement":{"type":"string","enum":["above","center","below"]}},"required":["op","object_id","placement"]}]}},"reply":{"type":"string"},"answered":{"type":"boolean"}},"required":["ops","reply","answered"]},"FilmResponse":{"type":"object","properties":{"id":{"type":"string"},"mode":{"type":"string","enum":["product","story"]},"title":{"type":["string","null"]},"brief":{"type":"string"},"seconds":{"type":"integer"},"aspect":{"type":"string","enum":["16:9","9:16","1:1"]},"look":{"type":"string","enum":["cinema","anime"]},"languageCode":{"type":"string"},"status":{"type":"string","enum":["draft","planned","keyframes","making","ready","failed","cancelled"]},"progress":{"type":"object","properties":{"words":{"type":"string"},"percent":{"type":"integer","minimum":0,"maximum":100}},"required":["words","percent"]},"plan":{"type":["object","null"],"properties":{"shots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","enum":["dialogue","multi","action","directed","anime","broll","product"]},"seconds":{"type":"number","minimum":1,"maximum":30},"what":{"type":"string","minLength":1,"maxLength":1000},"camera":{"type":"string","maxLength":200,"default":""},"line":{"type":"string","maxLength":500},"speaker":{"type":"string","maxLength":80},"characters":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":6},"location":{"type":"string","maxLength":200},"performance":{"type":"object","additionalProperties":{"type":"object","properties":{"mode":{"type":"string","enum":["speaking","listening","reacting","still"]},"expression":{"type":"string","maxLength":200},"gaze":{"type":"string","maxLength":100}},"required":["mode"]}},"ambient":{"type":"string","maxLength":200},"continuesPrevious":{"type":"boolean","default":false}},"required":["id","type","seconds","what"]},"minItems":1,"maxItems":150},"source":{"type":"string","enum":["toast","user"]},"version":{"type":"integer","minimum":0},"updatedAt":{"type":"string"},"screenplay":{"type":"object","properties":{"props":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","minLength":1,"maxLength":60},"description":{"type":"string","minLength":1,"maxLength":300},"assetId":{"type":"string"}},"required":["name","kind","description"]},"maxItems":40,"default":[]},"shots":{"type":"array","items":{"type":"object","properties":{"shotId":{"type":"string","minLength":1,"maxLength":64},"sincePrevious":{"type":"array","items":{"type":"object","properties":{"change":{"type":"string","minLength":1,"maxLength":300},"why":{"type":"string","minLength":1,"maxLength":300}},"required":["change","why"]},"maxItems":8,"default":[]},"start":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"where":{"type":"string","maxLength":200,"default":""},"holding":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":4,"default":[]}},"required":["name"]},"maxItems":6,"default":[]},"objects":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":16,"default":[]}}},"during":{"type":"array","items":{"type":"object","properties":{"change":{"type":"string","minLength":1,"maxLength":300},"why":{"type":"string","minLength":1,"maxLength":300}},"required":["change","why"]},"maxItems":8,"default":[]},"end":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"where":{"type":"string","maxLength":200,"default":""},"holding":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":4,"default":[]}},"required":["name"]},"maxItems":6,"default":[]},"objects":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":16,"default":[]}}}},"required":["shotId","start","end"]},"maxItems":150},"planVersion":{"type":"integer","minimum":0},"source":{"type":"string","enum":["toast","user"]},"issues":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":40,"default":[]},"updatedAt":{"type":"string"}},"required":["shots","planVersion","source","updatedAt"]}},"required":["shots","source","version","updatedAt"]},"keyframes":{"type":"array","items":{"type":"object","properties":{"shotId":{"type":"string"},"assetId":{"type":"string"},"draws":{"type":"integer","minimum":1},"approved":{"type":"boolean"},"drawnFrom":{"type":"string"},"check":{"type":"object","properties":{"ok":{"type":"boolean"},"people":{"type":["integer","null"],"minimum":0},"problems":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":10},"checkedAt":{"type":"string"}},"required":["ok","people","problems","checkedAt"]},"autoRedrawn":{"type":"boolean"}},"required":["shotId","assetId","draws","approved","drawnFrom"]}},"make":{"type":["object","null"],"properties":{"id":{"type":"string"},"startedAt":{"type":"string"},"finishedAt":{"type":["string","null"]},"quotedUsd":{"type":"number","minimum":0},"spentUsd":{"type":"number","minimum":0},"shots":{"type":"array","items":{"type":"object","properties":{"shotId":{"type":"string"},"status":{"type":"string","enum":["waiting","making","ready","failed","cancelled"]},"clipAssetId":{"type":["string","null"]},"model":{"type":["string","null"]},"label":{"type":["string","null"],"enum":["exact","partial","absent"]},"tries":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"kind":{"type":"string","enum":["make","reseed","edit"]},"usd":{"type":"number","minimum":0},"outcome":{"type":"string","enum":["pass","local","fail","refused","error"]},"detail":{"type":["string","null"]}},"required":["model","kind","usd","outcome","detail"]}},"usd":{"type":"number","minimum":0},"why":{"type":["string","null"]},"continuity":{"type":"object","properties":{"ok":{"type":"boolean"},"people":{"type":["integer","null"],"minimum":0},"problems":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":10},"checkedAt":{"type":"string"}},"required":["ok","people","problems","checkedAt"]},"pending":{"type":["object","null"],"properties":{"model":{"type":"string"},"kind":{"type":"string","enum":["make","reseed","edit"]},"predictionId":{"type":"string"},"startedAtMs":{"type":"number"},"seed":{"type":"number"},"usd":{"type":"number"}},"required":["model","kind","predictionId","startedAtMs","seed","usd"]}},"required":["shotId","status","clipAssetId","model","label","tries","usd","why","pending"]}},"scenes":{"type":"array","items":{"type":"object","properties":{"shotIds":{"type":"array","items":{"type":"string"}},"costUsd":{"type":"number","minimum":0},"status":{"type":"string","enum":["waiting","held","settled"]}},"required":["shotIds","costUsd","status"]}},"waitingForMoney":{"type":"boolean"}},"required":["id","startedAt","finishedAt","quotedUsd","spentUsd","shots"]},"video":{"type":["object","null"],"properties":{"assetId":{"type":"string"},"shape":{"type":"string","enum":["16:9","9:16","1:1"]},"durMs":{"type":"integer","minimum":0},"width":{"type":"integer"},"height":{"type":"integer"},"musicCredit":{"type":["string","null"]},"endCard":{"type":"boolean","default":false},"renderedAt":{"type":"string"}},"required":["assetId","shape","durMs","width","height","musicCredit","renderedAt"]},"publishKit":{"type":["object","null"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"disclosure":{"type":"string"},"credits":{"type":"array","items":{"type":"string"}}},"required":["title","description","disclosure","credits"]},"product":{"type":["object","null"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"labelWords":{"type":"array","items":{"type":"string"}},"photos":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"angle":{"type":"string","enum":["front","back","side","top","three_quarter","detail","other"]},"labelWords":{"type":"array","items":{"type":"string"}},"labelBox":{"type":["object","null"],"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","exclusiveMinimum":0,"maximum":1},"h":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["x","y","w","h"]},"labelCropAssetId":{"type":["string","null"]},"hands":{"type":"boolean","default":false},"addedAt":{"type":"string"}},"required":["assetId","angle","labelWords","labelBox","labelCropAssetId","addedAt"]},"maxItems":5}},"required":["name","description","labelWords","photos"]},"rightsAttestedAt":{"type":["string","null"]},"cast":{"type":["object","null"],"properties":{"characters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":1000},"voice":{"type":"string","maxLength":200},"sheet":{"type":"array","items":{"type":"object","properties":{"view":{"type":"string","enum":["front","three_quarter","profile","full_body"]},"assetId":{"type":"string"},"draws":{"type":"integer","minimum":1}},"required":["view","assetId","draws"]},"default":[]},"approved":{"type":"boolean","default":false}},"required":["name","description"]},"maxItems":6},"setting":{"type":"string","maxLength":300},"places":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":600},"assetId":{"type":"string"}},"required":["name","description","assetId"]},"maxItems":8}},"required":["characters"]},"shapeOf":{"type":["string","null"]},"shapes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"aspect":{"type":"string","enum":["16:9","9:16","1:1"]},"status":{"type":"string","enum":["draft","planned","keyframes","making","ready","failed","cancelled"]}},"required":["id","aspect","status"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","mode","title","brief","seconds","aspect","look","languageCode","status","progress","plan","keyframes","make","video","publishKit","product","rightsAttestedAt","cast","shapeOf","shapes","createdAt","updatedAt"]},"FilmAccess":{"type":"object","properties":{"enabled":{"type":"boolean"},"modes":{"type":"array","items":{"type":"string","enum":["product","story"]}},"seconds":{"type":"object","properties":{"product":{"type":"object","properties":{"min":{"type":"integer"},"max":{"type":"integer"}},"required":["min","max"]},"story":{"type":"object","properties":{"min":{"type":"integer"},"max":{"type":"integer"}},"required":["min","max"]}},"required":["product","story"]}},"required":["enabled","modes","seconds"]},"CreateFilmRequest":{"type":"object","properties":{"mode":{"type":"string","enum":["product","story"]},"brief":{"type":"string","minLength":1,"maxLength":20000},"title":{"type":"string","minLength":1,"maxLength":120},"seconds":{"type":"integer","exclusiveMinimum":0},"aspect":{"type":"string","enum":["16:9","9:16","1:1"],"default":"16:9"},"look":{"type":"string","enum":["cinema","anime"],"default":"cinema"},"languageCode":{"type":"string","minLength":2,"maxLength":16,"default":"en"},"rightsAttested":{"type":"boolean"}},"required":["mode","brief","seconds"]},"FilmList":{"type":"object","properties":{"films":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"mode":{"type":"string","enum":["product","story"]},"title":{"type":["string","null"]},"seconds":{"type":"integer"},"aspect":{"type":"string","enum":["16:9","9:16","1:1"]},"status":{"type":"string","enum":["draft","planned","keyframes","making","ready","failed","cancelled"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","mode","title","seconds","aspect","status","createdAt","updatedAt"]}}},"required":["films"]},"PutFilmPlanRequest":{"type":"object","properties":{"shots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"type":{"type":"string","enum":["dialogue","multi","action","directed","anime","broll","product"]},"seconds":{"type":"number","minimum":1,"maximum":30},"what":{"type":"string","minLength":1,"maxLength":1000},"camera":{"type":"string","maxLength":200,"default":""},"line":{"type":"string","maxLength":500},"speaker":{"type":"string","maxLength":80},"characters":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":6},"location":{"type":"string","maxLength":200},"performance":{"type":"object","additionalProperties":{"type":"object","properties":{"mode":{"type":"string","enum":["speaking","listening","reacting","still"]},"expression":{"type":"string","maxLength":200},"gaze":{"type":"string","maxLength":100}},"required":["mode"]}},"ambient":{"type":"string","maxLength":200},"continuesPrevious":{"type":"boolean","default":false}},"required":["id","type","seconds","what"]},"minItems":1,"maxItems":150},"baseVersion":{"type":"integer","minimum":0},"screenplay":{"type":"object","properties":{"props":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","minLength":1,"maxLength":60},"description":{"type":"string","minLength":1,"maxLength":300},"assetId":{"type":"string"}},"required":["name","kind","description"]},"maxItems":40,"default":[]},"shots":{"type":"array","items":{"type":"object","properties":{"shotId":{"type":"string","minLength":1,"maxLength":64},"sincePrevious":{"type":"array","items":{"type":"object","properties":{"change":{"type":"string","minLength":1,"maxLength":300},"why":{"type":"string","minLength":1,"maxLength":300}},"required":["change","why"]},"maxItems":8,"default":[]},"start":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"where":{"type":"string","maxLength":200,"default":""},"holding":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":4,"default":[]}},"required":["name"]},"maxItems":6,"default":[]},"objects":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":16,"default":[]}}},"during":{"type":"array","items":{"type":"object","properties":{"change":{"type":"string","minLength":1,"maxLength":300},"why":{"type":"string","minLength":1,"maxLength":300}},"required":["change","why"]},"maxItems":8,"default":[]},"end":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"where":{"type":"string","maxLength":200,"default":""},"holding":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":4,"default":[]}},"required":["name"]},"maxItems":6,"default":[]},"objects":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":16,"default":[]}}}},"required":["shotId","start","end"]},"maxItems":150}},"required":["shots"]}},"required":["shots"]},"DrawFilmKeyframesRequest":{"type":"object","properties":{"shotIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":150}}},"ApproveFilmKeyframesRequest":{"type":"object","properties":{"shotIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":150}}},"DrawFilmCharactersRequest":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":6},"views":{"type":"array","items":{"type":"string","enum":["front","three_quarter","profile","full_body"]},"maxItems":4}}},"ApproveFilmCharactersRequest":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":6}}},"FilmEstimateResponse":{"type":"object","properties":{"shots":{"type":"array","items":{"type":"object","properties":{"shotId":{"type":"string"},"model":{"type":["string","null"]},"modelName":{"type":["string","null"]},"usd":{"type":"number"},"expectedUsd":{"type":"number"},"ceilingUsd":{"type":"number"}},"required":["shotId","model","modelName","usd","expectedUsd","ceilingUsd"]}},"costUsd":{"type":"number"},"worstUsd":{"type":"number"},"wallet":{"type":["object","null"],"properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 code, e.g. \"INR\", \"JPY\". Any code: do not switch on a fixed list."},"priceMinor":{"type":"integer","description":"What it will probably cost. 0 for something free (a pitch)."},"requiredMinor":{"type":"integer","description":"What the wallet must hold to start: also what is held while it runs."},"balanceMinor":{"type":"integer","description":"Spendable now (running jobs’ holds already out)."},"allowed":{"type":"boolean","description":"False: it would be refused now. Nothing was started or spent."},"shortfallMinor":{"type":"integer","description":"How much more the wallet needs. 0 when allowed."},"topUpMinor":{"type":"integer","description":"What an \"Add money\" button should offer: the shortfall, or the minimum top-up if that is more. 0 when allowed."},"settlesAtActualCost":{"type":"boolean","description":"True when the final charge is the job’s measured cost (motion), so it may differ from `priceMinor`; false when the price is fixed by the input (minutes of takes)."}},"required":["currency","priceMinor","requiredMinor","balanceMinor","allowed","shortfallMinor","topUpMinor","settlesAtActualCost"]},"unroutable":{"type":"array","items":{"type":"string"}},"scenes":{"type":"array","items":{"type":"object","properties":{"shotIds":{"type":"array","items":{"type":"string"}},"costUsd":{"type":"number"}},"required":["shotIds","costUsd"]}}},"required":["shots","costUsd","worstUsd","wallet","unroutable"]},"CreateFilmShapeRequest":{"type":"object","properties":{"aspect":{"type":"string","enum":["16:9","9:16","1:1"]}},"required":["aspect"]},"FilmPostTextRequest":{"type":"object","properties":{"platforms":{"type":"array","items":{"type":"string","enum":["instagram","shorts","youtube","linkedin","x"]},"minItems":1,"maxItems":5},"lang":{"type":"string","maxLength":16}},"required":["platforms"]},"FilmSeriesResponse":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"premise":{"type":"string"},"episodeSeconds":{"type":"integer"},"episodeCount":{"type":"integer"},"aspect":{"type":"string","enum":["16:9","9:16","1:1"]},"look":{"type":"string","enum":["cinema","anime"]},"languageCode":{"type":"string"},"status":{"type":"string","enum":["draft","planned"]},"activity":{"type":"string"},"bible":{"type":["object","null"],"properties":{"arc":{"type":"string","minLength":1,"maxLength":2000},"outline":{"type":"array","items":{"type":"object","properties":{"episode":{"type":"integer","minimum":1},"summary":{"type":"string","minLength":1,"maxLength":600}},"required":["episode","summary"]},"minItems":1,"maxItems":20},"rules":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":12,"default":[]},"cast":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":1000},"voice":{"type":"string","maxLength":200},"sheet":{"type":"array","items":{"type":"object","properties":{"view":{"type":"string","enum":["front","three_quarter","profile","full_body"]},"assetId":{"type":"string"},"draws":{"type":"integer","minimum":1}},"required":["view","assetId","draws"]},"default":[]},"approved":{"type":"boolean","default":false},"acting":{"type":"string","maxLength":200},"uploadAssetId":{"type":"string"}},"required":["name","description"]},"minItems":1,"maxItems":6},"places":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":600},"assetId":{"type":["string","null"],"default":null},"draws":{"type":"integer","minimum":0,"default":0},"approved":{"type":"boolean","default":false}},"required":["name","description"]},"maxItems":8,"default":[]},"setting":{"type":"string","maxLength":300},"version":{"type":"integer","minimum":0},"updatedAt":{"type":"string"}},"required":["arc","outline","cast","version","updatedAt"]},"episodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"episode":{"type":"integer"},"status":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","episode","status","title"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","premise","episodeSeconds","episodeCount","aspect","look","languageCode","status","activity","bible","episodes","createdAt","updatedAt"]},"CreateFilmSeriesRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"premise":{"type":"string","minLength":1,"maxLength":8000},"episodeSeconds":{"type":"integer","minimum":60,"maximum":600},"episodeCount":{"type":"integer","minimum":2,"maximum":20},"aspect":{"type":"string","enum":["16:9","9:16","1:1"],"default":"9:16"},"look":{"type":"string","enum":["cinema","anime"],"default":"cinema"},"languageCode":{"type":"string","minLength":2,"maxLength":16,"default":"en"}},"required":["title","premise","episodeSeconds","episodeCount"]},"FilmSeriesList":{"type":"object","properties":{"series":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","planned"]},"episodeCount":{"type":"integer"},"aspect":{"type":"string","enum":["16:9","9:16","1:1"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","status","episodeCount","aspect","createdAt","updatedAt"]}}},"required":["series"]},"PutFilmSeriesBibleRequest":{"type":"object","properties":{"arc":{"type":"string","minLength":1,"maxLength":2000},"outline":{"type":"array","items":{"type":"object","properties":{"episode":{"type":"integer","minimum":1},"summary":{"type":"string","minLength":1,"maxLength":600}},"required":["episode","summary"]},"minItems":1,"maxItems":20},"rules":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":12,"default":[]},"cast":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":1000},"voice":{"type":"string","maxLength":200},"acting":{"type":"string","maxLength":200}},"required":["name","description"]},"minItems":1,"maxItems":6},"places":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","minLength":1,"maxLength":600}},"required":["name","description"]},"maxItems":8,"default":[]},"setting":{"type":"string","maxLength":300},"baseVersion":{"type":"integer","minimum":0}},"required":["arc","outline","cast"]},"DrawFilmSeriesPlacesRequest":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":8}}},"ApproveFilmSeriesPlacesRequest":{"type":"object","properties":{"names":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":8}}},"CreateFilmSeriesEpisodeRequest":{"type":"object","properties":{"episode":{"type":"integer","minimum":1,"maximum":20}},"required":["episode"]},"ObjectRemovalResponse":{"type":"object","properties":{"removal":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["uploading","uploaded","queued","finding","painting","composing","ready","applied","failed"]},"activity":{"type":["string","null"]},"progress":{"type":"integer","minimum":0,"maximum":100},"error":{"type":["string","null"]},"video":{"type":"object","properties":{"name":{"type":"string"},"size":{"type":"integer"},"durationMs":{"type":"integer"}},"required":["name","size","durationMs"]},"cameras":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0},"kind":{"type":"string","enum":["with","without","moving"]},"seconds":{"type":"number","minimum":0},"secondsWith":{"type":"number","minimum":0},"choice":{"type":"string","enum":["remove","leave"]},"outcome":{"type":["string","null"],"enum":["removed","left","moving","no_plate","plate_unreadable","plate_misaligned"]},"traceOnly":{"type":"boolean"},"card":{"type":["string","null"]},"emptySet":{"type":["string","null"]},"redos":{"type":"integer","minimum":0}},"required":["id","kind","seconds","secondsWith","choice","outcome","traceOnly","card","emptySet","redos"]}},"result":{"type":["object","null"],"properties":{"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["url","expiresAt"]},"price":{"type":["object","null"],"properties":{"priceMinor":{"type":"integer","minimum":0},"currency":{"type":"string"},"final":{"type":"boolean"}},"required":["priceMinor","currency","final"]},"expiresAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","activity","progress","error","video","cameras","result","price","expiresAt","createdAt","updatedAt"]}},"required":["removal"]},"ObjectRemovalUploadResponse":{"type":"object","properties":{"removal":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["uploading","uploaded","queued","finding","painting","composing","ready","applied","failed"]},"activity":{"type":["string","null"]},"progress":{"type":"integer","minimum":0,"maximum":100},"error":{"type":["string","null"]},"video":{"type":"object","properties":{"name":{"type":"string"},"size":{"type":"integer"},"durationMs":{"type":"integer"}},"required":["name","size","durationMs"]},"cameras":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0},"kind":{"type":"string","enum":["with","without","moving"]},"seconds":{"type":"number","minimum":0},"secondsWith":{"type":"number","minimum":0},"choice":{"type":"string","enum":["remove","leave"]},"outcome":{"type":["string","null"],"enum":["removed","left","moving","no_plate","plate_unreadable","plate_misaligned"]},"traceOnly":{"type":"boolean"},"card":{"type":["string","null"]},"emptySet":{"type":["string","null"]},"redos":{"type":"integer","minimum":0}},"required":["id","kind","seconds","secondsWith","choice","outcome","traceOnly","card","emptySet","redos"]}},"result":{"type":["object","null"],"properties":{"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["url","expiresAt"]},"price":{"type":["object","null"],"properties":{"priceMinor":{"type":"integer","minimum":0},"currency":{"type":"string"},"final":{"type":"boolean"}},"required":["priceMinor","currency","final"]},"expiresAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","activity","progress","error","video","cameras","result","price","expiresAt","createdAt","updatedAt"]},"upload":{"type":"object","properties":{"partSize":{"type":"integer","exclusiveMinimum":0},"parts":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","exclusiveMinimum":0},"url":{"type":"string"}},"required":["n","url"]}},"expiresAt":{"type":"string"}},"required":["partSize","parts","expiresAt"]}},"required":["removal","upload"]},"ObjectRemovalList":{"type":"object","properties":{"removals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["uploading","uploaded","queued","finding","painting","composing","ready","applied","failed"]},"activity":{"type":["string","null"]},"progress":{"type":"integer","minimum":0,"maximum":100},"error":{"type":["string","null"]},"video":{"type":"object","properties":{"name":{"type":"string"},"size":{"type":"integer"},"durationMs":{"type":"integer"}},"required":["name","size","durationMs"]},"cameras":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0},"kind":{"type":"string","enum":["with","without","moving"]},"seconds":{"type":"number","minimum":0},"secondsWith":{"type":"number","minimum":0},"choice":{"type":"string","enum":["remove","leave"]},"outcome":{"type":["string","null"],"enum":["removed","left","moving","no_plate","plate_unreadable","plate_misaligned"]},"traceOnly":{"type":"boolean"},"card":{"type":["string","null"]},"emptySet":{"type":["string","null"]},"redos":{"type":"integer","minimum":0}},"required":["id","kind","seconds","secondsWith","choice","outcome","traceOnly","card","emptySet","redos"]}},"result":{"type":["object","null"],"properties":{"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["url","expiresAt"]},"price":{"type":["object","null"],"properties":{"priceMinor":{"type":"integer","minimum":0},"currency":{"type":"string"},"final":{"type":"boolean"}},"required":["priceMinor","currency","final"]},"expiresAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","status","activity","progress","error","video","cameras","result","price","expiresAt","createdAt","updatedAt"]}}},"required":["removals"]},"CreateObjectRemovalRequest":{"type":"object","properties":{"attest":{"type":"boolean","enum":[true]},"name":{"type":"string","minLength":1,"maxLength":200},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string","maxLength":100},"durationMs":{"type":"integer","exclusiveMinimum":0},"click":{"type":"object","properties":{"t":{"type":"number","minimum":0,"maximum":301},"points":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number","minimum":0,"maximum":10000},{"type":"number","minimum":0,"maximum":10000}]},"minItems":1,"maxItems":8},"size":{"type":"array","prefixItems":[{"type":"integer","minimum":1,"maximum":10000},{"type":"integer","minimum":1,"maximum":10000}]}},"required":["t","points","size"]}},"required":["attest","name","size","mime","durationMs","click"]},"UpdateObjectRemovalRequest":{"type":"object","properties":{"cameras":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0},"choice":{"type":"string","enum":["remove","leave"]},"redo":{"type":"boolean","enum":[true]}},"required":["id"]},"minItems":1,"maxItems":32}},"required":["cameras"]},"CompleteObjectRemovalUploadRequest":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","exclusiveMinimum":0},"etag":{"type":"string","minLength":1,"maxLength":200}},"required":["n","etag"]},"minItems":1,"maxItems":10000}},"required":["parts"]},"MotionVoiceList":{"type":"object","properties":{"enabled":{"type":"boolean"},"voices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"default":{"type":"boolean"}},"required":["id","default"]}}},"required":["enabled","voices"]},"MotionLexicon":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"term":{"type":"string","minLength":1,"maxLength":60},"say":{"type":"string","minLength":1,"maxLength":80}},"required":["term","say"]},"maxItems":50}},"required":["entries"]},"SayMotionName":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":80},"voiceId":{"type":"string","minLength":1,"maxLength":64}},"required":["text"]},"CreateMotionJobRequest":{"type":"object","properties":{"request":{"type":"string","minLength":3,"maxLength":4000},"format":{"type":"string","enum":["16:9","9:16","1:1"],"default":"16:9"},"lengthS":{"type":"integer","minimum":15,"maximum":180},"voiceId":{"type":"string","minLength":1,"maxLength":64},"lang":{"type":"string","pattern":"^[a-z]{2}$"},"music":{"type":"boolean","default":true},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["website","pull-request","text"]},"url":{"type":"string","maxLength":2000,"default":""},"text":{"type":"string","maxLength":150000},"title":{"type":"string","maxLength":200},"audience":{"type":"string","enum":["everyone","developer","product"],"default":"everyone"},"purpose":{"type":"string","enum":["sell","explain","summarise","teach","announce","showcase","invite","compare","recap","recruit","fundraise","celebrate","promote"]},"permission":{"type":"boolean"}},"required":["kind"]},"palette":{"type":"object","properties":{"colours":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"minItems":1,"maxItems":6},"background":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"text":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"fonts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[\\w .'-]+$"},"maxItems":3}},"required":["colours"]},"material":{"type":"object","properties":{"texts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300},"maxItems":8,"default":[]},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"use":{"type":"string","enum":["as-is","styled"],"default":"as-is"},"note":{"type":"string","maxLength":200}},"required":["id"]},"maxItems":8,"default":[]},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"note":{"type":"string","maxLength":200}},"required":["id"]},"maxItems":3,"default":[]}}},"brand":{"type":"boolean"},"showcaseSlug":{"type":"string","maxLength":80},"direction":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["you-pick"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["card"]},"pitchId":{"type":"string","minLength":1,"maxLength":64},"card":{"type":"integer","minimum":1,"maximum":3}},"required":["kind","pitchId","card"]}],"default":{"kind":"you-pick"}},"storyboard":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"scenes":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number","minimum":0,"maximum":600},"to":{"type":"number","minimum":0,"maximum":600},"picture":{"type":"string","maxLength":400},"said":{"type":"string","maxLength":400},"onScreen":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":6}},"required":["from","to","picture","said","onScreen"]},"minItems":2,"maxItems":16}},"required":["id","scenes"]},"kit":{"type":"object","properties":{"platforms":{"type":"array","items":{"type":"string","enum":["youtube","shorts","instagram","tiktok","facebook","linkedin","x","other"]},"minItems":1,"maxItems":8},"sizes":{"type":"array","items":{"type":"string","enum":["1280x720","1080x1920","1080x1350","1200x627"]},"minItems":1,"maxItems":4},"other":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"notes":{"type":"string","maxLength":1000}},"required":["name"]},"lang":{"type":"string","pattern":"^[a-z]{2}$"}},"required":["platforms"]},"audio":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80}},"required":["id"]},"screens":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64}},"required":["id"]}},"required":["request"]},"MotionJobResponse":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]},"progress":{"type":"number"},"step":{"type":["string","null"]},"stepAt":{"type":["string","null"]},"stepPatience":{"type":["string","null"]},"activity":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string"},"n":{"type":["number","null"]},"of":{"type":["number","null"]},"text":{"type":"string"}},"required":["at","kind","n","of","text"]}},"question":{"type":["object","null"],"properties":{"term":{"type":"string"},"line":{"type":"string"},"askedAt":{"type":"string"},"waitS":{"type":"number"}},"required":["term","line","askedAt","waitS"]},"phase":{"type":["string","null"]},"request":{"type":"string"},"format":{"type":"string","enum":["16:9","9:16","1:1"]},"lengthS":{"type":["number","null"]},"voiceId":{"type":["string","null"]},"lang":{"type":["string","null"]},"music":{"type":"boolean"},"source":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["website","pull-request","text"]},"url":{"type":"string"},"name":{"type":"string"},"audience":{"type":"string","enum":["everyone","developer","product"]},"palette":{"type":"boolean"},"purpose":{"type":["string","null"],"enum":["sell","explain","summarise","teach","announce","showcase","invite","compare","recap","recruit","fundraise","celebrate","promote"]},"what":{"type":"string"}},"required":["kind","url","name","audience","palette","purpose","what"]},"material":{"type":["object","null"],"properties":{"texts":{"type":"array","items":{"type":"string"}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"use":{"type":"string","enum":["as-is","styled"]},"note":{"type":["string","null"]},"what":{"type":"string"}},"required":["id","use","note","what"]}},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"note":{"type":["string","null"]},"what":{"type":"string"}},"required":["id","note","what"]}},"brand":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"colours":{"type":"array","items":{"type":"string"}},"fonts":{"type":"array","items":{"type":"string"}},"logo":{"type":"boolean"}},"required":["name","colours","fonts","logo"]}},"required":["texts","images"]},"audio":{"type":["object","null"],"properties":{"id":{"type":"string"},"durationS":{"type":"number"},"rights":{"type":"string","enum":["mine","permission"]}},"required":["id","durationS","rights"]},"direction":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["you-pick"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["card"]},"pitchId":{"type":"string"},"card":{"type":"number"},"title":{"type":["string","null"]}},"required":["kind","pitchId","card","title"]}]},"storyboard":{"type":["object","null"],"properties":{"id":{"type":"string"},"scenes":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number","minimum":0,"maximum":600},"to":{"type":"number","minimum":0,"maximum":600},"picture":{"type":"string","maxLength":400},"said":{"type":"string","maxLength":400},"onScreen":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":6}},"required":["from","to","picture","said","onScreen"]}}},"required":["id","scenes"]},"usdSoFar":{"type":"number"},"hasVideo":{"type":"boolean"},"checks":{"type":["object","null"],"properties":{"pass":{"type":["boolean","null"]},"smallestTextPct":{"type":["number","null"]},"longestStillS":{"type":["number","null"]},"failed":{"type":"array","items":{"type":"string"}},"layoutErrors":{"type":["number","null"]},"material":{"type":["object","null"],"properties":{"pass":{"type":"boolean"},"texts":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"found":{"type":"boolean"}},"required":["text","found"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"used":{"type":"boolean"},"altered":{"type":"boolean"}},"required":["id","used"]}}},"required":["pass","texts","images"]},"storyboard":{"type":["object","null"],"properties":{"pass":{"type":"boolean"},"said":{"type":"array","items":{"type":"object","properties":{"scene":{"type":"integer"},"text":{"type":"string"},"found":{"type":"boolean"}},"required":["scene","text","found"]}},"onScreen":{"type":"array","items":{"type":"object","properties":{"scene":{"type":"integer"},"text":{"type":"string"},"found":{"type":"boolean"}},"required":["scene","text","found"]}}},"required":["pass","said","onScreen"]},"narration":{"type":["object","null"],"properties":{"pass":{"type":"boolean"},"missed":{"type":"array","items":{"type":"string"}}},"required":["pass","missed"]}},"required":["pass","smallestTextPct","longestStillS","material","storyboard"]},"musicCredits":{"type":"array","items":{"type":"object","properties":{"track":{"type":"string"},"artist":{"type":"string"},"license":{"type":"string"},"licenseUrl":{"type":"string"},"url":{"type":"string"},"line":{"type":"string"}},"required":["track","artist","license","licenseUrl","url","line"]}},"thumbnail":{"type":["string","null"]},"posterChoice":{"type":["number","null"]},"posterChoices":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"atS":{"type":"number"},"url":{"type":["string","null"]}},"required":["n","atS","url"]}},"kitOrder":{"type":["object","null"],"properties":{"platforms":{"type":"array","items":{"type":"string","enum":["youtube","shorts","instagram","tiktok","facebook","linkedin","x","other"]}},"sizes":{"type":"array","items":{"type":"string","enum":["1280x720","1080x1920","1080x1350","1200x627"]}},"otherName":{"type":["string","null"]}},"required":["platforms","sizes","otherName"]},"shapeOf":{"type":["string","null"]},"shapes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"format":{"type":"string","enum":["16:9","9:16","1:1"]},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]}},"required":["id","format","status"]}},"reshapable":{"type":"boolean"},"editOf":{"type":["string","null"]},"edit":{"type":["object","null"],"properties":{"fromJobId":{"type":"string"},"atS":{"type":"number"},"note":{"type":"string"},"scene":{"type":["number","null"]},"fromS":{"type":["number","null"]},"toS":{"type":["number","null"]},"also":{"type":"array","items":{"type":"object","properties":{"atS":{"type":"number","minimum":0,"maximum":600},"note":{"type":"string","minLength":3,"maxLength":1000}},"required":["atS","note"]}},"windows":{"type":"array","items":{"type":"object","properties":{"fromS":{"type":"number"},"toS":{"type":"number"}},"required":["fromS","toS"]}}},"required":["fromJobId","atS","note","scene","fromS","toS"]},"edits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]},"fromJobId":{"type":"string"},"atS":{"type":"number"},"note":{"type":"string"},"also":{"type":"array","items":{"type":"object","properties":{"atS":{"type":"number","minimum":0,"maximum":600},"note":{"type":"string","minLength":3,"maxLength":1000}},"required":["atS","note"]}},"createdAt":{"type":"string"}},"required":["id","status","fromJobId","atS","note","createdAt"]}},"editable":{"type":"boolean"},"wordsEditable":{"type":"boolean"},"series":{"type":["object","null"],"properties":{"id":{"type":"string"},"episode":{"type":"number"}},"required":["id","episode"]},"links":{"type":"object","properties":{"video":{"type":["string","null"]},"preview":{"type":["string","null"]},"poster":{"type":["string","null"]},"captions":{"type":["string","null"]}},"required":["video","preview","poster","captions"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","status","progress","step","stepAt","stepPatience","activity","question","phase","request","format","lengthS","voiceId","lang","music","source","material","direction","storyboard","usdSoFar","hasVideo","checks","musicCredits","thumbnail","posterChoice","posterChoices","kitOrder","shapeOf","shapes","reshapable","editOf","edit","edits","editable","series","links","error","createdAt","finishedAt"]}},"required":["job"]},"MotionCreditRefusal":{"type":"object","properties":{"error":{"type":"string"},"reason":{"type":"string","enum":["user_quota_exhausted"]},"scope":{"type":"string","enum":["user"]},"balanceMinutes":{"type":"number"},"chargeMinutes":{"type":"number"},"shortfallMinutes":{"type":"number"},"creditsToBuy":{"type":"integer"},"wallet":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 code, e.g. \"INR\", \"JPY\". Any code: do not switch on a fixed list."},"priceMinor":{"type":"integer","description":"What it will probably cost. 0 for something free (a pitch)."},"requiredMinor":{"type":"integer","description":"What the wallet must hold to start: also what is held while it runs."},"balanceMinor":{"type":"integer","description":"Spendable now (running jobs’ holds already out)."},"allowed":{"type":"boolean","description":"False: it would be refused now. Nothing was started or spent."},"shortfallMinor":{"type":"integer","description":"How much more the wallet needs. 0 when allowed."},"topUpMinor":{"type":"integer","description":"What an \"Add money\" button should offer: the shortfall, or the minimum top-up if that is more. 0 when allowed."},"settlesAtActualCost":{"type":"boolean","description":"True when the final charge is the job’s measured cost (motion), so it may differ from `priceMinor`; false when the price is fixed by the input (minutes of takes)."}},"required":["currency","priceMinor","requiredMinor","balanceMinor","allowed","shortfallMinor","topUpMinor","settlesAtActualCost"]}},"required":["error","reason","scope","balanceMinutes","chargeMinutes","shortfallMinutes","creditsToBuy"]},"MotionJobList":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]},"progress":{"type":"number"},"step":{"type":["string","null"]},"stepAt":{"type":["string","null"]},"stepPatience":{"type":["string","null"]},"activity":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string"},"n":{"type":["number","null"]},"of":{"type":["number","null"]},"text":{"type":"string"}},"required":["at","kind","n","of","text"]}},"question":{"type":["object","null"],"properties":{"term":{"type":"string"},"line":{"type":"string"},"askedAt":{"type":"string"},"waitS":{"type":"number"}},"required":["term","line","askedAt","waitS"]},"phase":{"type":["string","null"]},"request":{"type":"string"},"format":{"type":"string","enum":["16:9","9:16","1:1"]},"lengthS":{"type":["number","null"]},"voiceId":{"type":["string","null"]},"lang":{"type":["string","null"]},"music":{"type":"boolean"},"source":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["website","pull-request","text"]},"url":{"type":"string"},"name":{"type":"string"},"audience":{"type":"string","enum":["everyone","developer","product"]},"palette":{"type":"boolean"},"purpose":{"type":["string","null"],"enum":["sell","explain","summarise","teach","announce","showcase","invite","compare","recap","recruit","fundraise","celebrate","promote"]},"what":{"type":"string"}},"required":["kind","url","name","audience","palette","purpose","what"]},"material":{"type":["object","null"],"properties":{"texts":{"type":"array","items":{"type":"string"}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"use":{"type":"string","enum":["as-is","styled"]},"note":{"type":["string","null"]},"what":{"type":"string"}},"required":["id","use","note","what"]}},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"note":{"type":["string","null"]},"what":{"type":"string"}},"required":["id","note","what"]}},"brand":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"colours":{"type":"array","items":{"type":"string"}},"fonts":{"type":"array","items":{"type":"string"}},"logo":{"type":"boolean"}},"required":["name","colours","fonts","logo"]}},"required":["texts","images"]},"audio":{"type":["object","null"],"properties":{"id":{"type":"string"},"durationS":{"type":"number"},"rights":{"type":"string","enum":["mine","permission"]}},"required":["id","durationS","rights"]},"direction":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["you-pick"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["card"]},"pitchId":{"type":"string"},"card":{"type":"number"},"title":{"type":["string","null"]}},"required":["kind","pitchId","card","title"]}]},"storyboard":{"type":["object","null"],"properties":{"id":{"type":"string"},"scenes":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number","minimum":0,"maximum":600},"to":{"type":"number","minimum":0,"maximum":600},"picture":{"type":"string","maxLength":400},"said":{"type":"string","maxLength":400},"onScreen":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":6}},"required":["from","to","picture","said","onScreen"]}}},"required":["id","scenes"]},"usdSoFar":{"type":"number"},"hasVideo":{"type":"boolean"},"checks":{"type":["object","null"],"properties":{"pass":{"type":["boolean","null"]},"smallestTextPct":{"type":["number","null"]},"longestStillS":{"type":["number","null"]},"failed":{"type":"array","items":{"type":"string"}},"layoutErrors":{"type":["number","null"]},"material":{"type":["object","null"],"properties":{"pass":{"type":"boolean"},"texts":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"found":{"type":"boolean"}},"required":["text","found"]}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"used":{"type":"boolean"},"altered":{"type":"boolean"}},"required":["id","used"]}}},"required":["pass","texts","images"]},"storyboard":{"type":["object","null"],"properties":{"pass":{"type":"boolean"},"said":{"type":"array","items":{"type":"object","properties":{"scene":{"type":"integer"},"text":{"type":"string"},"found":{"type":"boolean"}},"required":["scene","text","found"]}},"onScreen":{"type":"array","items":{"type":"object","properties":{"scene":{"type":"integer"},"text":{"type":"string"},"found":{"type":"boolean"}},"required":["scene","text","found"]}}},"required":["pass","said","onScreen"]},"narration":{"type":["object","null"],"properties":{"pass":{"type":"boolean"},"missed":{"type":"array","items":{"type":"string"}}},"required":["pass","missed"]}},"required":["pass","smallestTextPct","longestStillS","material","storyboard"]},"musicCredits":{"type":"array","items":{"type":"object","properties":{"track":{"type":"string"},"artist":{"type":"string"},"license":{"type":"string"},"licenseUrl":{"type":"string"},"url":{"type":"string"},"line":{"type":"string"}},"required":["track","artist","license","licenseUrl","url","line"]}},"thumbnail":{"type":["string","null"]},"posterChoice":{"type":["number","null"]},"posterChoices":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"atS":{"type":"number"},"url":{"type":["string","null"]}},"required":["n","atS","url"]}},"kitOrder":{"type":["object","null"],"properties":{"platforms":{"type":"array","items":{"type":"string","enum":["youtube","shorts","instagram","tiktok","facebook","linkedin","x","other"]}},"sizes":{"type":"array","items":{"type":"string","enum":["1280x720","1080x1920","1080x1350","1200x627"]}},"otherName":{"type":["string","null"]}},"required":["platforms","sizes","otherName"]},"shapeOf":{"type":["string","null"]},"shapes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"format":{"type":"string","enum":["16:9","9:16","1:1"]},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]}},"required":["id","format","status"]}},"reshapable":{"type":"boolean"},"editOf":{"type":["string","null"]},"edit":{"type":["object","null"],"properties":{"fromJobId":{"type":"string"},"atS":{"type":"number"},"note":{"type":"string"},"scene":{"type":["number","null"]},"fromS":{"type":["number","null"]},"toS":{"type":["number","null"]},"also":{"type":"array","items":{"type":"object","properties":{"atS":{"type":"number","minimum":0,"maximum":600},"note":{"type":"string","minLength":3,"maxLength":1000}},"required":["atS","note"]}},"windows":{"type":"array","items":{"type":"object","properties":{"fromS":{"type":"number"},"toS":{"type":"number"}},"required":["fromS","toS"]}}},"required":["fromJobId","atS","note","scene","fromS","toS"]},"edits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]},"fromJobId":{"type":"string"},"atS":{"type":"number"},"note":{"type":"string"},"also":{"type":"array","items":{"type":"object","properties":{"atS":{"type":"number","minimum":0,"maximum":600},"note":{"type":"string","minLength":3,"maxLength":1000}},"required":["atS","note"]}},"createdAt":{"type":"string"}},"required":["id","status","fromJobId","atS","note","createdAt"]}},"editable":{"type":"boolean"},"wordsEditable":{"type":"boolean"},"series":{"type":["object","null"],"properties":{"id":{"type":"string"},"episode":{"type":"number"}},"required":["id","episode"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","status","progress","step","stepAt","stepPatience","activity","question","phase","request","format","lengthS","voiceId","lang","music","source","material","direction","storyboard","usdSoFar","hasVideo","checks","musicCredits","thumbnail","posterChoice","posterChoices","kitOrder","shapeOf","shapes","reshapable","editOf","edit","edits","editable","series","error","createdAt","finishedAt"]}}},"required":["jobs"]},"AnswerMotionQuestion":{"type":"object","properties":{"term":{"type":"string","minLength":1,"maxLength":60},"say":{"type":["string","null"],"minLength":1,"maxLength":80}},"required":["term","say"]},"MotionJobLines":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"atS":{"type":"number","minimum":0},"text":{"type":"string","maxLength":1000}},"required":["atS","text"]}}},"required":["lines"]},"MotionHeroResponse":{"type":"object","properties":{"hero":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]},"step":{"type":["string","null"]},"projectId":{"type":"string"},"property":{"type":"object","properties":{"propertyId":{"type":"string","minLength":1,"maxLength":64},"videoId":{"type":"string","minLength":1,"maxLength":64},"kind":{"type":"string","enum":["hook","price","at","highlight"]},"atMs":{"type":"integer","minimum":0,"maximum":600000},"shot":{"type":"integer","minimum":0,"maximum":500}},"required":["propertyId","videoId","kind"]},"format":{"type":"string","enum":["16:9","9:16","1:1"]},"words":{"type":"string"},"durationS":{"type":"number"},"over":{"type":"string","enum":["speaker","picture"]},"usdSoFar":{"type":"number"},"checks":{"type":["object","null"],"properties":{"pass":{"type":"boolean"},"problems":{"type":"array","items":{"type":"string"}}},"required":["pass","problems"]},"box":{"type":["object","null"],"properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"]},"links":{"type":"object","properties":{"clip":{"type":["string","null"]},"sheet":{"type":["string","null"]}},"required":["clip","sheet"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","status","step","projectId","format","words","durationS","over","usdSoFar","checks","box","links","error","createdAt","finishedAt"]}},"required":["hero"]},"MotionHeroList":{"type":"object","properties":{"heroes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]},"step":{"type":["string","null"]},"projectId":{"type":"string"},"property":{"type":"object","properties":{"propertyId":{"type":"string","minLength":1,"maxLength":64},"videoId":{"type":"string","minLength":1,"maxLength":64},"kind":{"type":"string","enum":["hook","price","at","highlight"]},"atMs":{"type":"integer","minimum":0,"maximum":600000},"shot":{"type":"integer","minimum":0,"maximum":500}},"required":["propertyId","videoId","kind"]},"format":{"type":"string","enum":["16:9","9:16","1:1"]},"words":{"type":"string"},"durationS":{"type":"number"},"over":{"type":"string","enum":["speaker","picture"]},"usdSoFar":{"type":"number"},"checks":{"type":["object","null"],"properties":{"pass":{"type":"boolean"},"problems":{"type":"array","items":{"type":"string"}}},"required":["pass","problems"]},"box":{"type":["object","null"],"properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"]},"links":{"type":"object","properties":{"clip":{"type":["string","null"]},"sheet":{"type":["string","null"]}},"required":["clip","sheet"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","status","step","projectId","format","words","durationS","over","usdSoFar","checks","box","links","error","createdAt","finishedAt"]}}},"required":["heroes"]},"MotionKitResponse":{"type":"object","properties":{"kit":{"type":"object","properties":{"id":{"type":"string"},"videoId":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]},"progress":{"type":"number"},"step":{"type":["string","null"]},"stepAt":{"type":["string","null"]},"stepPatience":{"type":["string","null"]},"activity":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string"},"n":{"type":["number","null"]},"of":{"type":["number","null"]},"text":{"type":"string"}},"required":["at","kind","n","of","text"]}},"platforms":{"type":"array","items":{"type":"string","enum":["youtube","shorts","instagram","tiktok","facebook","linkedin","x","other"]}},"sizes":{"type":"array","items":{"type":"string","enum":["1280x720","1080x1920","1080x1350","1200x627"]}},"usdSoFar":{"type":"number"},"texts":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["youtube","shorts","instagram","tiktok","facebook","linkedin","x","other"]},"label":{"type":"string"},"title":{"type":["string","null"]},"text":{"type":"string"},"hashtags":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}},"full":{"type":"string"},"limits":{"type":"object","properties":{"title":{"type":["number","null"]},"text":{"type":"number"},"hashtags":{"type":"number"},"tagsChars":{"type":["number","null"]}},"required":["title","text","hashtags","tagsChars"]},"trimmed":{"type":"boolean"}},"required":["platform","label","title","text","hashtags","tags","full","limits","trimmed"]}},"thumbnails":{"type":"array","items":{"type":"object","properties":{"variant":{"type":"integer"},"size":{"type":"string","enum":["1280x720","1080x1920","1080x1350","1200x627"]},"url":{"type":["string","null"]},"download":{"type":["string","null"]}},"required":["variant","size","url","download"]}},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","videoId","status","progress","step","stepAt","stepPatience","activity","platforms","sizes","usdSoFar","texts","thumbnails","error","createdAt","finishedAt"]}},"required":["kit"]},"ReadMotionSourceRequest":{"type":"object","properties":{"kind":{"type":"string","enum":["website","pull-request","text"]},"url":{"type":"string","maxLength":2000,"default":""},"text":{"type":"string","maxLength":150000},"title":{"type":"string","maxLength":200},"screenshots":{"type":"boolean"}},"required":["kind"]},"MotionSourceReadingResponse":{"type":"object","properties":{"source":{"type":"object","properties":{"kind":{"type":"string","enum":["website","pull-request","text"]},"url":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"platform":{"type":["string","null"]},"pages":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"chars":{"type":"number"}},"required":["url","title","chars"]}},"skipped":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"why":{"type":"string"}},"required":["url","why"]}},"brand":{"type":"object","properties":{"colours":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string"},"source":{"type":"string","enum":["theme-color","css-variable","css"]}},"required":["hex","source"]}},"background":{"type":["string","null"]},"text":{"type":["string","null"]},"fonts":{"type":"array","items":{"type":"string"}}},"required":["colours","background","text","fonts"]},"prices":{"type":"array","items":{"type":"object","properties":{"price":{"type":"string"},"currency":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["price","currency","name"]}},"ratings":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":["string","null"]},"best":{"type":["string","null"]}},"required":["value","count","best"]}},"thin":{"type":"boolean"},"rendered":{"type":"boolean"},"logo":{"type":["string","null"]},"pictures":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"page":{"type":"string"},"alt":{"type":"string"}},"required":["url","page","alt"]}},"shotsOffered":{"type":"boolean"},"shots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"page":{"type":"string"},"view":{"type":"string","enum":["desktop","phone"]}},"required":["id","url","page","view"]}},"pullRequest":{"type":["object","null"],"properties":{"title":{"type":"string"},"status":{"type":"string","enum":["open","merged","closed","draft"]},"stats":{"type":"object","properties":{"files":{"type":"number"},"additions":{"type":"number"},"deletions":{"type":"number"},"commits":{"type":"number"}},"required":["files","additions","deletions","commits"]},"audienceHint":{"type":"string","enum":["user-visible","developer-visible","unclear","internal"]},"breaking":{"type":"boolean"},"issues":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string"},"title":{"type":"string"}},"required":["ref","title"]}},"people":{"type":"array","items":{"type":"string"}},"hunks":{"type":"number"},"redactions":{"type":"number"},"droppedForSecrets":{"type":"number"}},"required":["title","status","stats","audienceHint","breaking","issues","people","hunks","redactions","droppedForSecrets"]},"understanding":{"type":"object","properties":{"what":{"type":"string"},"family":{"type":"string","enum":["product","article","knowledge","code","people","place","event","media","data","education","civic","other"]},"confidence":{"type":"number","minimum":0,"maximum":1},"purposes":{"type":"array","items":{"type":"object","properties":{"purpose":{"type":"string","enum":["sell","explain","summarise","teach","announce","showcase","invite","compare","recap","recruit","fundraise","celebrate","promote"]},"why":{"type":"string"}},"required":["purpose","why"]},"minItems":1,"maxItems":4},"ask":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string"},"maxItems":4},"personal":{"type":"boolean"},"by":{"type":"string","enum":["model","rules"]}},"required":["what","family","confidence","purposes","ask","missing","personal","by"]}},"required":["kind","url","name","description","platform","pages","skipped","brand","prices","ratings","thin","pullRequest","understanding"]}},"required":["source"]},"MotionMaterialImageResponse":{"type":"object","properties":{"image":{"type":"object","properties":{"id":{"type":"string"},"what":{"type":"string"},"people":{"type":"boolean"},"width":{"type":["number","null"]},"height":{"type":["number","null"]},"url":{"type":["string","null"]}},"required":["id","what","people","width","height","url"]}},"required":["image"]},"MotionAudioHeard":{"type":"object","properties":{"durationS":{"type":"number"},"text":{"type":"string"},"words":{"type":"integer"},"speakers":{"type":"integer"},"sounds":{"type":"array","items":{"type":"string"}},"lang":{"type":["string","null"]},"guess":{"type":"string","enum":["instructions","soundtrack"]},"why":{"type":"string"},"soundtrackOk":{"type":"boolean"}},"required":["durationS","text","words","speakers","sounds","lang","guess","why","soundtrackOk"]},"MotionAudioSoundtrackResponse":{"type":"object","properties":{"audio":{"type":"object","properties":{"id":{"type":"string"},"durationS":{"type":"number"}},"required":["id","durationS"]}},"required":["audio"]},"CreateMotionPitchRequest":{"type":"object","properties":{"request":{"type":"string","minLength":3,"maxLength":4000},"format":{"type":"string","enum":["16:9","9:16","1:1"],"default":"16:9"},"lengthS":{"type":"integer","minimum":15,"maximum":180},"voiceId":{"type":"string","minLength":1,"maxLength":64},"lang":{"type":"string","pattern":"^[a-z]{2}$"},"music":{"type":"boolean","default":true},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["website","pull-request","text"]},"url":{"type":"string","maxLength":2000,"default":""},"text":{"type":"string","maxLength":150000},"title":{"type":"string","maxLength":200},"audience":{"type":"string","enum":["everyone","developer","product"],"default":"everyone"},"purpose":{"type":"string","enum":["sell","explain","summarise","teach","announce","showcase","invite","compare","recap","recruit","fundraise","celebrate","promote"]},"permission":{"type":"boolean"}},"required":["kind"]},"palette":{"type":"object","properties":{"colours":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"minItems":1,"maxItems":6},"background":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"text":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"fonts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[\\w .'-]+$"},"maxItems":3}},"required":["colours"]},"material":{"type":"object","properties":{"texts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300},"maxItems":8,"default":[]},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"use":{"type":"string","enum":["as-is","styled"],"default":"as-is"},"note":{"type":"string","maxLength":200}},"required":["id"]},"maxItems":8,"default":[]},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"note":{"type":"string","maxLength":200}},"required":["id"]},"maxItems":3,"default":[]}}},"brand":{"type":"boolean"},"showcaseSlug":{"type":"string","maxLength":80}},"required":["request"]},"MotionPitchResponse":{"type":"object","properties":{"pitch":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]},"progress":{"type":"number"},"step":{"type":["string","null"]},"stepAt":{"type":["string","null"]},"stepPatience":{"type":["string","null"]},"activity":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string"},"n":{"type":["number","null"]},"of":{"type":["number","null"]},"text":{"type":"string"}},"required":["at","kind","n","of","text"]}},"phase":{"type":["string","null"]},"request":{"type":"string"},"format":{"type":"string","enum":["16:9","9:16","1:1"]},"lengthS":{"type":["number","null"]},"lang":{"type":["string","null"]},"source":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["website","pull-request","text"]},"url":{"type":"string"},"name":{"type":"string"},"audience":{"type":"string","enum":["everyone","developer","product"]},"palette":{"type":"boolean"},"purpose":{"type":["string","null"],"enum":["sell","explain","summarise","teach","announce","showcase","invite","compare","recap","recruit","fundraise","celebrate","promote"]},"what":{"type":"string"}},"required":["kind","url","name","audience","palette","purpose","what"]},"material":{"type":["object","null"],"properties":{"texts":{"type":"array","items":{"type":"string"}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"use":{"type":"string","enum":["as-is","styled"]},"note":{"type":["string","null"]},"what":{"type":"string"}},"required":["id","use","note","what"]}},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"note":{"type":["string","null"]},"what":{"type":"string"}},"required":["id","note","what"]}},"brand":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"colours":{"type":"array","items":{"type":"string"}},"fonts":{"type":"array","items":{"type":"string"}},"logo":{"type":"boolean"}},"required":["name","colours","fonts","logo"]}},"required":["texts","images"]},"usdSoFar":{"type":"number"},"cards":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer"},"title":{"type":"string"},"idea":{"type":"string"},"look":{"type":"string"},"palette":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"motion":{"type":"string"},"hook":{"type":"string"},"material":{"type":"string"},"beats":{"type":"array","items":{"type":"string"}},"md":{"type":"string"}},"required":["n","title","idea","look","palette","type","motion","hook","material","beats","md"]}},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","status","progress","step","stepAt","stepPatience","activity","phase","request","format","lengthS","lang","source","material","usdSoFar","cards","error","createdAt","finishedAt"]}},"required":["pitch"]},"MotionEstimateRequest":{"type":"object","properties":{"stage":{"type":"string","enum":["build","reshape","kit","pitch","edit","hero","redo"]},"lengthS":{"type":"integer","minimum":15,"maximum":180},"kit":{"type":"boolean"},"changes":{"type":"integer","minimum":1,"maximum":5}},"required":["stage"]},"MotionEstimateResponse":{"type":"object","properties":{"estimate":{"type":"object","properties":{"charged":{"type":"boolean"},"chargeMinutes":{"type":"number"},"requiresBalanceMinutes":{"type":["number","null"]},"balanceMinutes":{"type":"number"},"allowed":{"type":"boolean"},"shortfallMinutes":{"type":"number"},"creditsToBuy":{"type":"integer"},"wallet":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 code, e.g. \"INR\", \"JPY\". Any code: do not switch on a fixed list."},"priceMinor":{"type":"integer","description":"What it will probably cost. 0 for something free (a pitch)."},"requiredMinor":{"type":"integer","description":"What the wallet must hold to start: also what is held while it runs."},"balanceMinor":{"type":"integer","description":"Spendable now (running jobs’ holds already out)."},"allowed":{"type":"boolean","description":"False: it would be refused now. Nothing was started or spent."},"shortfallMinor":{"type":"integer","description":"How much more the wallet needs. 0 when allowed."},"topUpMinor":{"type":"integer","description":"What an \"Add money\" button should offer: the shortfall, or the minimum top-up if that is more. 0 when allowed."},"settlesAtActualCost":{"type":"boolean","description":"True when the final charge is the job’s measured cost (motion), so it may differ from `priceMinor`; false when the price is fixed by the input (minutes of takes)."}},"required":["currency","priceMinor","requiredMinor","balanceMinor","allowed","shortfallMinor","topUpMinor","settlesAtActualCost"]}},"required":["charged","chargeMinutes","requiresBalanceMinutes","balanceMinutes","allowed","shortfallMinutes","creditsToBuy"]}},"required":["estimate"]},"CreateMotionStoryboardRequest":{"type":"object","properties":{"request":{"type":"string","minLength":3,"maxLength":4000},"format":{"type":"string","enum":["16:9","9:16","1:1"],"default":"16:9"},"lengthS":{"type":"integer","minimum":15,"maximum":180},"voiceId":{"type":"string","minLength":1,"maxLength":64},"lang":{"type":"string","pattern":"^[a-z]{2}$"},"music":{"type":"boolean","default":true},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["website","pull-request","text"]},"url":{"type":"string","maxLength":2000,"default":""},"text":{"type":"string","maxLength":150000},"title":{"type":"string","maxLength":200},"audience":{"type":"string","enum":["everyone","developer","product"],"default":"everyone"},"purpose":{"type":"string","enum":["sell","explain","summarise","teach","announce","showcase","invite","compare","recap","recruit","fundraise","celebrate","promote"]},"permission":{"type":"boolean"}},"required":["kind"]},"palette":{"type":"object","properties":{"colours":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"minItems":1,"maxItems":6},"background":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"text":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"fonts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[\\w .'-]+$"},"maxItems":3}},"required":["colours"]},"material":{"type":"object","properties":{"texts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300},"maxItems":8,"default":[]},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"use":{"type":"string","enum":["as-is","styled"],"default":"as-is"},"note":{"type":"string","maxLength":200}},"required":["id"]},"maxItems":8,"default":[]},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"note":{"type":"string","maxLength":200}},"required":["id"]},"maxItems":3,"default":[]}}},"brand":{"type":"boolean"},"showcaseSlug":{"type":"string","maxLength":80},"direction":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["you-pick"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["card"]},"pitchId":{"type":"string","minLength":1,"maxLength":64},"card":{"type":"integer","minimum":1,"maximum":3}},"required":["kind","pitchId","card"]}],"default":{"kind":"you-pick"}},"redo":{"type":"object","properties":{"fromId":{"type":"string","minLength":1,"maxLength":64},"note":{"type":"string","minLength":1,"maxLength":600},"scene":{"type":"integer","minimum":1,"maximum":16},"scenes":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number","minimum":0,"maximum":600},"to":{"type":"number","minimum":0,"maximum":600},"picture":{"type":"string","maxLength":400},"said":{"type":"string","maxLength":400},"onScreen":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":6}},"required":["from","to","picture","said","onScreen"]},"minItems":2,"maxItems":16}},"required":["fromId","note","scenes"]}},"required":["request"]},"MotionStoryboardResponse":{"type":"object","properties":{"storyboard":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]},"progress":{"type":"number"},"step":{"type":["string","null"]},"stepAt":{"type":["string","null"]},"stepPatience":{"type":["string","null"]},"activity":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"kind":{"type":"string"},"n":{"type":["number","null"]},"of":{"type":["number","null"]},"text":{"type":"string"}},"required":["at","kind","n","of","text"]}},"phase":{"type":["string","null"]},"request":{"type":"string"},"format":{"type":"string","enum":["16:9","9:16","1:1"]},"lengthS":{"type":["number","null"]},"lang":{"type":["string","null"]},"source":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["website","pull-request","text"]},"url":{"type":"string"},"name":{"type":"string"},"audience":{"type":"string","enum":["everyone","developer","product"]},"palette":{"type":"boolean"},"purpose":{"type":["string","null"],"enum":["sell","explain","summarise","teach","announce","showcase","invite","compare","recap","recruit","fundraise","celebrate","promote"]},"what":{"type":"string"}},"required":["kind","url","name","audience","palette","purpose","what"]},"material":{"type":["object","null"],"properties":{"texts":{"type":"array","items":{"type":"string"}},"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"use":{"type":"string","enum":["as-is","styled"]},"note":{"type":["string","null"]},"what":{"type":"string"}},"required":["id","use","note","what"]}},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"note":{"type":["string","null"]},"what":{"type":"string"}},"required":["id","note","what"]}},"brand":{"type":["object","null"],"properties":{"name":{"type":["string","null"]},"colours":{"type":"array","items":{"type":"string"}},"fonts":{"type":"array","items":{"type":"string"}},"logo":{"type":"boolean"}},"required":["name","colours","fonts","logo"]}},"required":["texts","images"]},"pitchId":{"type":["string","null"]},"usdSoFar":{"type":"number"},"card":{"type":["object","null"],"properties":{"n":{"type":"integer"},"title":{"type":"string"},"idea":{"type":"string"},"look":{"type":"string"},"palette":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"motion":{"type":"string"},"hook":{"type":"string"},"material":{"type":"string"},"beats":{"type":"array","items":{"type":"string"}},"md":{"type":"string"}},"required":["n","title","idea","look","palette","type","motion","hook","material","beats","md"]},"scenes":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number","minimum":0,"maximum":600},"to":{"type":"number","minimum":0,"maximum":600},"picture":{"type":"string","maxLength":400},"said":{"type":"string","maxLength":400},"onScreen":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"maxItems":6}},"required":["from","to","picture","said","onScreen"]}},"frames":{"type":"array","items":{"type":["string","null"]}},"redo":{"type":["object","null"],"properties":{"of":{"type":"string"},"n":{"type":"integer"},"note":{"type":"string"},"scene":{"type":["integer","null"]},"paid":{"type":"boolean"},"reply":{"type":["string","null"]}},"required":["of","n","note","scene","paid","reply"]},"nextRedo":{"type":"object","properties":{"n":{"type":"integer"},"free":{"type":"boolean"}},"required":["n","free"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","status","progress","step","stepAt","stepPatience","activity","phase","request","format","lengthS","lang","source","material","pitchId","usdSoFar","card","scenes","frames","redo","nextRedo","error","createdAt","finishedAt"]}},"required":["storyboard"]},"CreateMotionSeriesRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"sourceKind":{"type":"string","enum":["pdf","text"]},"chapters":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":1},"title":{"type":"string","minLength":1,"maxLength":200},"fromPage":{"type":"integer","minimum":1},"toPage":{"type":"integer","minimum":1},"chars":{"type":"integer","minimum":0}},"required":["n","title","fromPage","toPage","chars"]},"minItems":1,"maxItems":200},"format":{"type":"string","enum":["16:9","9:16","1:1"],"default":"16:9"},"lengthS":{"type":"integer","minimum":15,"maximum":180},"voiceId":{"type":"string","minLength":1,"maxLength":64},"lang":{"type":"string","pattern":"^[a-z]{2}$"},"music":{"type":"boolean","default":true},"palette":{"type":"object","properties":{"colours":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"minItems":1,"maxItems":6},"background":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"text":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"fonts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[\\w .'-]+$"},"maxItems":3}},"required":["colours"]},"capUsd":{"type":"number","exclusiveMinimum":0,"maximum":200}},"required":["title","sourceKind","chapters"]},"MotionSeriesResponse":{"type":"object","properties":{"series":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"sourceKind":{"type":"string","enum":["pdf","text"]},"chapters":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","minimum":1},"title":{"type":"string","minLength":1,"maxLength":200},"fromPage":{"type":"integer","minimum":1},"toPage":{"type":"integer","minimum":1},"chars":{"type":"integer","minimum":0}},"required":["n","title","fromPage","toPage","chars"]}},"format":{"type":"string","enum":["16:9","9:16","1:1"],"default":"16:9"},"lengthS":{"type":["number","null"]},"voiceId":{"type":["string","null"]},"lang":{"type":["string","null"]},"music":{"type":"boolean"},"look":{"type":["object","null"],"properties":{"fromJobId":{"type":"string"},"text":{"type":"string"}},"required":["fromJobId","text"]},"episodes":{"type":"array","items":{"type":"object","properties":{"chapter":{"type":"number"},"jobId":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","stopped","failed","cancelled"]},"progress":{"type":"number"},"step":{"type":["string","null"]},"usdSoFar":{"type":"number"},"hasVideo":{"type":"boolean"},"thumbnail":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["chapter","jobId","status","progress","step","usdSoFar","hasVideo","thumbnail","createdAt"]}},"usdSoFar":{"type":"number"},"capUsd":{"type":"number"},"episodeEstimateUsd":{"type":"number"},"canMake":{"type":"object","properties":{"ok":{"type":"boolean"},"reason":{"type":["string","null"],"enum":["busy","cap"]}},"required":["ok","reason"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","sourceKind","chapters","lengthS","voiceId","lang","music","look","episodes","usdSoFar","capUsd","episodeEstimateUsd","canMake","createdAt","updatedAt"]}},"required":["series"]},"MotionSeriesList":{"type":"object","properties":{"series":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"sourceKind":{"type":"string","enum":["pdf","text"]},"format":{"type":"string","enum":["16:9","9:16","1:1"],"default":"16:9"},"lengthS":{"type":["number","null"]},"voiceId":{"type":["string","null"]},"lang":{"type":["string","null"]},"music":{"type":"boolean"},"look":{"type":["object","null"],"properties":{"fromJobId":{"type":"string"},"text":{"type":"string"}},"required":["fromJobId","text"]},"usdSoFar":{"type":"number"},"capUsd":{"type":"number"},"episodeEstimateUsd":{"type":"number"},"canMake":{"type":"object","properties":{"ok":{"type":"boolean"},"reason":{"type":["string","null"],"enum":["busy","cap"]}},"required":["ok","reason"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","sourceKind","lengthS","voiceId","lang","music","look","usdSoFar","capUsd","episodeEstimateUsd","canMake","createdAt","updatedAt"]}}},"required":["series"]},"CreateMotionEpisodeRequest":{"type":"object","properties":{"chapter":{"type":"integer","minimum":1},"text":{"type":"string","minLength":40,"maxLength":150000}},"required":["chapter","text"]},"SetMotionSeriesCapRequest":{"type":"object","properties":{"capUsd":{"type":"number","exclusiveMinimum":0,"maximum":200}},"required":["capUsd"]},"PropertyAccess":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"CreatePropertyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"role":{"type":"string","enum":["studio","broker","developer"]},"listingKind":{"type":"string","enum":["project","resale","rent","lease"]},"studioId":{"type":["string","null"]},"communityId":{"type":["string","null"]},"unit":{"type":"string","maxLength":40},"projectKind":{"type":"string","enum":["interior","listing","builder"]},"destinations":{"type":"array","items":{"type":"string","enum":["youtube","reels","whatsapp"]},"maxItems":3}}},"PropertyResponse":{"type":"object","properties":{"property":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["studio","broker","developer"]},"listingKind":{"type":["string","null"],"enum":["project","resale","rent","lease"]},"facts":{"type":"object","properties":{"kind":{"type":"string","maxLength":60},"bedrooms":{"type":"integer","minimum":0,"maximum":50},"size":{"type":"object","properties":{"value":{"type":"number","exclusiveMinimum":0,"maximum":10000000},"unit":{"type":"string","enum":["sqft","m2"]}},"required":["value","unit"]},"locality":{"type":"string","maxLength":120},"price":{"type":"string","maxLength":40},"licenceNumber":{"type":"string","maxLength":60},"clientName":{"type":"string","maxLength":120},"buildingName":{"type":"string","maxLength":120},"budget":{"type":"string","maxLength":40},"timeTaken":{"type":"string","maxLength":40},"rent":{"type":"string","maxLength":40},"rentalYield":{"type":"string","maxLength":40},"pricePerArea":{"type":"string","maxLength":40},"deposit":{"type":"string","maxLength":40},"availableFrom":{"type":"string","maxLength":40},"furnishing":{"type":"string","maxLength":40},"roomDetails":{"type":"array","items":{"type":"object","properties":{"room":{"type":"string","minLength":1,"maxLength":60},"size":{"type":"string","maxLength":40},"finishes":{"type":"string","maxLength":60}},"required":["room"]},"maxItems":12},"nearby":{"type":"array","items":{"type":"object","properties":{"place":{"type":"string","minLength":1,"maxLength":32},"distance":{"type":"string","minLength":1,"maxLength":16}},"required":["place","distance"]},"maxItems":6}}},"market":{"type":["object","null"],"properties":{"country":{"type":"string","pattern":"^[A-Z]{2}$"},"region":{"type":"string","maxLength":60}},"required":["country"]},"factsCard":{"type":["object","null"],"properties":{"show":{"type":"object","properties":{"kind":{"type":"boolean"},"size":{"type":"boolean"},"locality":{"type":"boolean"},"building":{"type":"boolean"},"price":{"type":"boolean"},"budget":{"type":"boolean"},"timeTaken":{"type":"boolean"}},"required":["kind","size","locality","building","price"]},"lines":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":3},"off":{"type":"boolean"},"priceReveal":{"type":"boolean"},"priceLabel":{"type":"string","maxLength":24},"rera":{"type":"boolean"}},"required":["show","lines"]},"status":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["just_listed","open_house","sold","new_price"]},"when":{"type":"string","minLength":1,"maxLength":60}},"required":["kind"]},"fileCount":{"type":"integer","minimum":0},"studioId":{"type":["string","null"]},"communityId":{"type":["string","null"]},"unit":{"type":["string","null"]},"projectKind":{"type":["string","null"],"enum":["interior","listing","builder"]},"destinations":{"type":"array","items":{"type":"string","enum":["youtube","reels","whatsapp"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","role","facts","market","factsCard","status","fileCount","createdAt","updatedAt"]},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"kind":{"type":"string","enum":["video","photo","audio"]},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"before":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","name","size","mime","kind","sha256","state","media","before","createdAt"]}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["licence_number_missing"]},"country":{"type":"string"},"region":{"type":"string"},"message":{"type":"string"}},"required":["code","country","message"]}},"overview":{"type":"object","properties":{"propertyId":{"type":"string"},"cover":{"type":["object","null"],"properties":{"url":{"type":"string"},"width":{"type":"integer","exclusiveMinimum":0},"height":{"type":"integer","exclusiveMinimum":0}},"required":["url","width","height"]},"coverExpiresAt":{"type":["string","null"]},"videos":{"type":"integer","minimum":0},"rendered":{"type":"integer","minimum":0},"reading":{"type":["string","null"],"enum":["queued","running","done","failed"]}},"required":["propertyId","cover","coverExpiresAt","videos","rendered","reading"]}},"required":["property","files","warnings"]},"PropertyList":{"type":"object","properties":{"properties":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["studio","broker","developer"]},"listingKind":{"type":["string","null"],"enum":["project","resale","rent","lease"]},"facts":{"type":"object","properties":{"kind":{"type":"string","maxLength":60},"bedrooms":{"type":"integer","minimum":0,"maximum":50},"size":{"type":"object","properties":{"value":{"type":"number","exclusiveMinimum":0,"maximum":10000000},"unit":{"type":"string","enum":["sqft","m2"]}},"required":["value","unit"]},"locality":{"type":"string","maxLength":120},"price":{"type":"string","maxLength":40},"licenceNumber":{"type":"string","maxLength":60},"clientName":{"type":"string","maxLength":120},"buildingName":{"type":"string","maxLength":120},"budget":{"type":"string","maxLength":40},"timeTaken":{"type":"string","maxLength":40},"rent":{"type":"string","maxLength":40},"rentalYield":{"type":"string","maxLength":40},"pricePerArea":{"type":"string","maxLength":40},"deposit":{"type":"string","maxLength":40},"availableFrom":{"type":"string","maxLength":40},"furnishing":{"type":"string","maxLength":40},"roomDetails":{"type":"array","items":{"type":"object","properties":{"room":{"type":"string","minLength":1,"maxLength":60},"size":{"type":"string","maxLength":40},"finishes":{"type":"string","maxLength":60}},"required":["room"]},"maxItems":12},"nearby":{"type":"array","items":{"type":"object","properties":{"place":{"type":"string","minLength":1,"maxLength":32},"distance":{"type":"string","minLength":1,"maxLength":16}},"required":["place","distance"]},"maxItems":6}}},"market":{"type":["object","null"],"properties":{"country":{"type":"string","pattern":"^[A-Z]{2}$"},"region":{"type":"string","maxLength":60}},"required":["country"]},"factsCard":{"type":["object","null"],"properties":{"show":{"type":"object","properties":{"kind":{"type":"boolean"},"size":{"type":"boolean"},"locality":{"type":"boolean"},"building":{"type":"boolean"},"price":{"type":"boolean"},"budget":{"type":"boolean"},"timeTaken":{"type":"boolean"}},"required":["kind","size","locality","building","price"]},"lines":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":3},"off":{"type":"boolean"},"priceReveal":{"type":"boolean"},"priceLabel":{"type":"string","maxLength":24},"rera":{"type":"boolean"}},"required":["show","lines"]},"status":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["just_listed","open_house","sold","new_price"]},"when":{"type":"string","minLength":1,"maxLength":60}},"required":["kind"]},"fileCount":{"type":"integer","minimum":0},"studioId":{"type":["string","null"]},"communityId":{"type":["string","null"]},"unit":{"type":["string","null"]},"projectKind":{"type":["string","null"],"enum":["interior","listing","builder"]},"destinations":{"type":"array","items":{"type":"string","enum":["youtube","reels","whatsapp"]}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","role","facts","market","factsCard","status","fileCount","createdAt","updatedAt"]}},"overviews":{"type":"array","items":{"type":"object","properties":{"propertyId":{"type":"string"},"cover":{"type":["object","null"],"properties":{"url":{"type":"string"},"width":{"type":"integer","exclusiveMinimum":0},"height":{"type":"integer","exclusiveMinimum":0}},"required":["url","width","height"]},"coverExpiresAt":{"type":["string","null"]},"videos":{"type":"integer","minimum":0},"rendered":{"type":"integer","minimum":0},"reading":{"type":["string","null"],"enum":["queued","running","done","failed"]}},"required":["propertyId","cover","coverExpiresAt","videos","rendered","reading"]}}},"required":["properties"]},"UpdatePropertyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"role":{"type":"string","enum":["studio","broker","developer"]},"listingKind":{"type":["string","null"],"enum":["project","resale","rent","lease"]},"facts":{"type":"object","properties":{"kind":{"type":"string","maxLength":60},"bedrooms":{"type":"integer","minimum":0,"maximum":50},"size":{"type":"object","properties":{"value":{"type":"number","exclusiveMinimum":0,"maximum":10000000},"unit":{"type":"string","enum":["sqft","m2"]}},"required":["value","unit"]},"locality":{"type":"string","maxLength":120},"price":{"type":"string","maxLength":40},"licenceNumber":{"type":"string","maxLength":60},"clientName":{"type":"string","maxLength":120},"buildingName":{"type":"string","maxLength":120},"budget":{"type":"string","maxLength":40},"timeTaken":{"type":"string","maxLength":40},"rent":{"type":"string","maxLength":40},"rentalYield":{"type":"string","maxLength":40},"pricePerArea":{"type":"string","maxLength":40},"deposit":{"type":"string","maxLength":40},"availableFrom":{"type":"string","maxLength":40},"furnishing":{"type":"string","maxLength":40},"roomDetails":{"type":"array","items":{"type":"object","properties":{"room":{"type":"string","minLength":1,"maxLength":60},"size":{"type":"string","maxLength":40},"finishes":{"type":"string","maxLength":60}},"required":["room"]},"maxItems":12},"nearby":{"type":"array","items":{"type":"object","properties":{"place":{"type":"string","minLength":1,"maxLength":32},"distance":{"type":"string","minLength":1,"maxLength":16}},"required":["place","distance"]},"maxItems":6}}},"market":{"type":["object","null"],"properties":{"country":{"type":"string","pattern":"^[A-Z]{2}$"},"region":{"type":"string","maxLength":60}},"required":["country"]},"factsCard":{"type":["object","null"],"properties":{"show":{"type":"object","properties":{"kind":{"type":"boolean"},"size":{"type":"boolean"},"locality":{"type":"boolean"},"building":{"type":"boolean"},"price":{"type":"boolean"},"budget":{"type":"boolean"},"timeTaken":{"type":"boolean"}},"required":["kind","size","locality","building","price"]},"lines":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":3},"off":{"type":"boolean"},"priceReveal":{"type":"boolean"},"priceLabel":{"type":"string","maxLength":24},"rera":{"type":"boolean"}},"required":["show","lines"]},"status":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["just_listed","open_house","sold","new_price"]},"when":{"type":"string","minLength":1,"maxLength":60}},"required":["kind"]},"endCardSkipped":{"type":"boolean"},"studioId":{"type":["string","null"]},"communityId":{"type":["string","null"]},"unit":{"type":"string","maxLength":40},"projectKind":{"type":"string","enum":["interior","listing","builder"]},"destinations":{"type":"array","items":{"type":"string","enum":["youtube","reels","whatsapp"]},"maxItems":3}}},"RegisterPropertyFilesRequest":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string","maxLength":100}},"required":["sha256","name","size","mime"]},"minItems":1,"maxItems":500}},"required":["files"]},"RegisterPropertyFilesResponse":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string"},"state":{"type":"string","enum":["new","resume","have","elsewhere","refused"]},"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"kind":{"type":"string","enum":["video","photo","audio"]},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"before":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","name","size","mime","kind","sha256","state","media","before","createdAt"]},"upload":{"type":"object","properties":{"partSize":{"type":"integer","exclusiveMinimum":0},"parts":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","exclusiveMinimum":0},"url":{"type":"string"}},"required":["n","url"]}},"expiresAt":{"type":"string"}},"required":["partSize","parts","expiresAt"]},"alsoIn":{"type":"object","properties":{"propertyId":{"type":"string"},"name":{"type":"string"}},"required":["propertyId","name"]},"reason":{"type":"string"}},"required":["sha256","name","state"]}}},"required":["files"]},"ReusePropertyFilesRequest":{"type":"object","properties":{"sha256":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{64}$"},"minItems":1,"maxItems":500}},"required":["sha256"]},"ReusePropertyFilesResponse":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"kind":{"type":"string","enum":["video","photo","audio"]},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"before":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","name","size","mime","kind","sha256","state","media","before","createdAt"]}}},"required":["files"]},"PropertyFileUploadResponse":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"kind":{"type":"string","enum":["video","photo","audio"]},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"before":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","name","size","mime","kind","sha256","state","media","before","createdAt"]},"upload":{"type":"object","properties":{"partSize":{"type":"integer","exclusiveMinimum":0},"parts":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","exclusiveMinimum":0},"url":{"type":"string"}},"required":["n","url"]}},"expiresAt":{"type":"string"}},"required":["partSize","parts","expiresAt"]}},"required":["file","upload"]},"CompletePropertyFileRequest":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","exclusiveMinimum":0},"etag":{"type":"string","minLength":1,"maxLength":200}},"required":["n","etag"]},"minItems":1,"maxItems":10000}},"required":["parts"]},"PropertyFileResponse":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"kind":{"type":"string","enum":["video","photo","audio"]},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"before":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","name","size","mime","kind","sha256","state","media","before","createdAt"]}},"required":["file"]},"PropertyMediaListResponse":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"media":{"type":"object","properties":{"state":{"type":["string","null"],"enum":["pending","processing","ready","failed"]},"proxy":{"type":["object","null"],"properties":{"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"type":"number"}},"required":["url","width","height","fps"]},"audio":{"type":["object","null"],"properties":{"url":{"type":"string"}},"required":["url"]},"display":{"type":["object","null"],"properties":{"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"}},"required":["url","width","height"]},"stills":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"}},"required":["atMs","url","width","height"]}},"expiresAt":{"type":["string","null"]}},"required":["state","proxy","audio","display","stills","expiresAt"]}},"required":["fileId","media"]}}},"required":["files"]},"PropertyFileMediaResponse":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"kind":{"type":"string","enum":["video","photo","audio"]},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"before":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","name","size","mime","kind","sha256","state","media","before","createdAt"]},"media":{"type":"object","properties":{"state":{"type":["string","null"],"enum":["pending","processing","ready","failed"]},"proxy":{"type":["object","null"],"properties":{"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"type":"number"}},"required":["url","width","height","fps"]},"audio":{"type":["object","null"],"properties":{"url":{"type":"string"}},"required":["url"]},"display":{"type":["object","null"],"properties":{"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"}},"required":["url","width","height"]},"stills":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"}},"required":["atMs","url","width","height"]}},"expiresAt":{"type":["string","null"]},"transcript":{"type":["object","null"],"properties":{"language":{"type":["string","null"]},"words":{"type":"array","items":{"type":"object","properties":{"w":{"type":"string"},"s":{"type":"integer"},"e":{"type":"integer"},"speaker":{"type":"string"}},"required":["w","s","e","speaker"]}}},"required":["language","words"]}},"required":["state","proxy","audio","display","stills","expiresAt","transcript"]}},"required":["file","media"]},"PropertyReadingResponse":{"type":"object","properties":{"reading":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","failed"]},"step":{"type":["string","null"],"enum":["waiting","listening","looking","done"]},"activity":{"type":["string","null"]},"progress":{"type":"integer","minimum":0,"maximum":100},"error":{"type":["string","null"]},"files":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"notProperty":{"type":"boolean"},"segments":{"type":"array","items":{"type":"object","properties":{"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"space":{"type":"string"},"roomId":{"type":"string"},"people":{"type":"string","enum":["none","in_passing","speaking_to_camera","posing"]},"features":{"type":"array","items":{"type":"string"}},"showing":{"type":"boolean"},"role":{"type":"string","enum":["wide","medium","close_up","demo","look_up","angled","outside"]}},"required":["startMs","endMs","space","roomId","people","features"]}},"issues":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"issue":{"type":"string","enum":["finger_or_obstruction","operator_reflection","blur","tilt","too_dark","too_bright","person_in_shot","clutter","other"]},"note":{"type":"string"},"decision":{"type":"string","enum":["keep","leave_out"]},"decidedBy":{"type":"string","enum":["you","studio","toast"]},"why":{"type":"string"}},"required":["atMs","issue","note"]}},"unusable":{"type":"boolean"},"looks":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"look":{"type":"integer","minimum":1,"maximum":5},"detail":{"type":"integer","minimum":1,"maximum":5}},"required":["atMs","look","detail"]}},"speech":{"type":["object","null"],"properties":{"words":{"type":"integer","minimum":0},"speakers":{"type":"integer","minimum":0},"language":{"type":["string","null"]}},"required":["words","speakers","language"]},"moves":{"type":"array","items":{"type":"object","properties":{"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"move":{"type":"string","enum":["still","roll","push","pull","pan","tilt"]}},"required":["startMs","endMs","move"]}}},"required":["fileId","notProperty","segments","issues","unusable","speech"]}},"rooms":{"type":"array","items":{"type":"object","properties":{"roomId":{"type":"string"},"name":{"type":"string"},"files":{"type":"integer","minimum":0}},"required":["roomId","name","files"]}},"skipped":{"type":"array","items":{"type":"string"}},"corrections":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["rename"]},"roomId":{"type":"string","minLength":1,"maxLength":60},"name":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","roomId","name"]},{"type":"object","properties":{"kind":{"type":"string","enum":["merge"]},"into":{"type":"string","minLength":1,"maxLength":60},"from":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"minItems":1,"maxItems":50}},"required":["kind","into","from"]},{"type":"object","properties":{"kind":{"type":"string","enum":["move"]},"fileId":{"type":"string","minLength":1,"maxLength":64},"segment":{"type":"integer","minimum":0},"roomId":{"type":"string","minLength":1,"maxLength":60}},"required":["kind","fileId","segment","roomId"]},{"type":"object","properties":{"kind":{"type":"string","enum":["unusable"]},"fileId":{"type":"string","minLength":1,"maxLength":64},"unusable":{"type":"boolean"}},"required":["kind","fileId","unusable"]}]}},"sameRooms":{"type":"array","items":{"type":"object","properties":{"rooms":{"type":"array","items":{"type":"string"}},"match":{"type":"integer","minimum":0}},"required":["rooms","match"]}},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","status","step","activity","progress","error","files","rooms","skipped","corrections","createdAt","finishedAt"]}},"required":["reading"]},"PropertyCorrectionsRequest":{"type":"object","properties":{"corrections":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["rename"]},"roomId":{"type":"string","minLength":1,"maxLength":60},"name":{"type":"string","minLength":1,"maxLength":80}},"required":["kind","roomId","name"]},{"type":"object","properties":{"kind":{"type":"string","enum":["merge"]},"into":{"type":"string","minLength":1,"maxLength":60},"from":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"minItems":1,"maxItems":50}},"required":["kind","into","from"]},{"type":"object","properties":{"kind":{"type":"string","enum":["move"]},"fileId":{"type":"string","minLength":1,"maxLength":64},"segment":{"type":"integer","minimum":0},"roomId":{"type":"string","minLength":1,"maxLength":60}},"required":["kind","fileId","segment","roomId"]},{"type":"object","properties":{"kind":{"type":"string","enum":["unusable"]},"fileId":{"type":"string","minLength":1,"maxLength":64},"unusable":{"type":"boolean"}},"required":["kind","fileId","unusable"]}]},"minItems":1,"maxItems":100}},"required":["corrections"]},"PropertyShotDecisionsRequest":{"type":"object","properties":{"decisions":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string","minLength":1,"maxLength":64},"atMs":{"type":"integer","minimum":0},"keep":{"type":"boolean"}},"required":["fileId","atMs","keep"]},"minItems":1,"maxItems":500}},"required":["decisions"]},"PropertyFormatsResponse":{"type":"object","properties":{"formats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["testimonial_reel","request","studio_plan"]},"name":{"type":"string"},"description":{"type":"string"},"needs":{"type":"array","items":{"type":"string"}},"available":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string"}},"shapes":{"type":"array","items":{"type":"string","enum":["9:16","1:1","16:9"]}},"defaultShape":{"type":"string","enum":["9:16","1:1","16:9"]},"kinds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["reel","full","highlights","short"]},"name":{"type":"string"},"description":{"type":"string"},"lengthS":{"type":"array","prefixItems":[{"type":"integer"},{"type":"integer"}]},"available":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","lengthS","available","missing"]}}},"required":["id","name","description","needs","available","missing","shapes","defaultShape"]}},"endCard":{"type":"object","properties":{"ready":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string","enum":["name","reach","logo"]}},"skipped":{"type":"boolean"}},"required":["ready","missing","skipped"]},"studio":{"type":"object","properties":{"purposes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["show_our_work","before_after","room_reveal","client_speaks","walkthrough"]},"name":{"type":"string"},"why":{"type":"string"},"plans":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["reveal","owners_words","room_by_room"]},"name":{"type":"string"},"why":{"type":"string"},"lengthS":{"type":"array","prefixItems":[{"type":"integer"},{"type":"integer"}]},"available":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string"}}},"required":["kind","name","why","lengthS","available","missing"]}}},"required":["id","name","why","plans"]}},"audiences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["homeowner","builder","design_lover"]},"name":{"type":"string"}},"required":["id","name"]}},"defaultPurpose":{"type":"string","enum":["show_our_work","before_after","room_reveal","client_speaks","walkthrough"]},"defaultAudience":{"type":"string","enum":["homeowner","builder","design_lover"]},"speakers":{"type":"array","items":{"type":"object","properties":{"take":{"type":"string"},"speaker":{"type":"string"},"fileId":{"type":"string"},"atMs":{"type":"integer","minimum":0},"seconds":{"type":"number","minimum":0},"firstWords":{"type":"string"}},"required":["take","speaker","fileId","atMs","seconds","firstWords"]}},"speakerRoles":{"type":"boolean"}},"required":["purposes","audiences","defaultPurpose","defaultAudience"]},"seller":{"type":"object","properties":{"purposes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["sell","launch"]},"name":{"type":"string"},"why":{"type":"string"}},"required":["id","name","why"]}},"audiences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["buyer","investor"]},"name":{"type":"string"},"plans":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["walk_in","view_first","quick_look","numbers_first","home_then_numbers"]},"name":{"type":"string"},"why":{"type":"string"},"lengthS":{"type":"array","prefixItems":[{"type":"integer"},{"type":"integer"}]},"available":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string"}}},"required":["kind","name","why","lengthS","available","missing"]}}},"required":["id","name","plans"]}},"defaultPurpose":{"type":"string","enum":["sell","launch"]},"defaultAudience":{"type":"string","enum":["buyer","investor"]},"rera":{"type":"object","properties":{"typed":{"type":"boolean"},"on":{"type":"boolean"}},"required":["typed","on"]}},"required":["purposes","audiences","defaultPurpose","defaultAudience","rera"]},"letting":{"type":"object","properties":{"name":{"type":"string"},"why":{"type":"string"},"plans":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["move_in","rent_quick_look"]},"name":{"type":"string"},"why":{"type":"string"},"lengthS":{"type":"array","prefixItems":[{"type":"integer"},{"type":"integer"}]},"available":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string"}}},"required":["kind","name","why","lengthS","available","missing"]}},"rera":{"type":"object","properties":{"typed":{"type":"boolean"},"on":{"type":"boolean"}},"required":["typed","on"]}},"required":["name","why","plans","rera"]}},"required":["formats","endCard"]},"FootageRect":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","exclusiveMinimum":0,"maximum":1},"h":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["x","y","w","h"]},"FootageFramingFill":{"type":"object","properties":{"kind":{"type":"string","enum":["fill"]}},"required":["kind"]},"FootageFramingFit":{"type":"object","properties":{"kind":{"type":"string","enum":["fit"]}},"required":["kind"]},"FootageFramingRect":{"type":"object","properties":{"kind":{"type":"string","enum":["rect"]},"rect":{"$ref":"#/components/schemas/FootageRect"}},"required":["kind","rect"]},"FootageFramingMove":{"type":"object","properties":{"kind":{"type":"string","enum":["move"]},"from":{"$ref":"#/components/schemas/FootageRect"},"to":{"$ref":"#/components/schemas/FootageRect"},"ease":{"type":"string","enum":["linear","inOut"]}},"required":["kind","from","to"]},"FootageFraming":{"oneOf":[{"$ref":"#/components/schemas/FootageFramingFill"},{"$ref":"#/components/schemas/FootageFramingFit"},{"$ref":"#/components/schemas/FootageFramingRect"},{"$ref":"#/components/schemas/FootageFramingMove"}],"discriminator":{"propertyName":"kind","mapping":{"fill":"#/components/schemas/FootageFramingFill","fit":"#/components/schemas/FootageFramingFit","rect":"#/components/schemas/FootageFramingRect","move":"#/components/schemas/FootageFramingMove"}}},"FootagePictureItemVideo":{"type":"object","properties":{"kind":{"type":"string","enum":["video"]},"object":{"type":"string","pattern":"^[0-9a-f]{64}$"},"inMs":{"type":"integer","minimum":0},"outMs":{"type":"integer","minimum":0},"atMs":{"type":"integer","minimum":0},"speed":{"type":"number","minimum":0.25,"maximum":4},"framing":{"$ref":"#/components/schemas/FootageFraming"},"grade":{"type":"string","enum":["warm","cool","film","crisp","mono"]},"ref":{"type":"string","maxLength":120}},"required":["kind","object","inMs","outMs","atMs","framing"]},"FootagePictureItemStill":{"type":"object","properties":{"kind":{"type":"string","enum":["still"]},"object":{"type":"string","pattern":"^[0-9a-f]{64}$"},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":0},"framing":{"$ref":"#/components/schemas/FootageFraming"},"grade":{"type":"string","enum":["warm","cool","film","crisp","mono"]},"ref":{"type":"string","maxLength":120}},"required":["kind","object","atMs","durMs","framing"]},"FootagePictureItemHold":{"type":"object","properties":{"kind":{"type":"string","enum":["hold"]},"object":{"type":"string","pattern":"^[0-9a-f]{64}$"},"frameMs":{"type":"integer","minimum":0},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":0},"framing":{"$ref":"#/components/schemas/FootageFraming"},"grade":{"type":"string","enum":["warm","cool","film","crisp","mono"]},"ref":{"type":"string","maxLength":120}},"required":["kind","object","frameMs","atMs","durMs","framing"]},"FootagePictureItem":{"oneOf":[{"$ref":"#/components/schemas/FootagePictureItemVideo"},{"$ref":"#/components/schemas/FootagePictureItemStill"},{"$ref":"#/components/schemas/FootagePictureItemHold"}],"discriminator":{"propertyName":"kind","mapping":{"video":"#/components/schemas/FootagePictureItemVideo","still":"#/components/schemas/FootagePictureItemStill","hold":"#/components/schemas/FootagePictureItemHold"}}},"FootageSoundItemSource":{"type":"object","properties":{"kind":{"type":"string","enum":["source"]},"object":{"type":"string","pattern":"^[0-9a-f]{64}$"},"inMs":{"type":"integer","minimum":0},"outMs":{"type":"integer","minimum":0},"atMs":{"type":"integer","minimum":0},"speed":{"type":"number","minimum":0.5,"maximum":2},"gainDb":{"type":"number","minimum":-60,"maximum":12},"fadeInMs":{"type":"integer","minimum":0},"fadeOutMs":{"type":"integer","minimum":0},"ref":{"type":"string","maxLength":120}},"required":["kind","object","inMs","outMs","atMs"]},"FootageSoundItemMusic":{"type":"object","properties":{"kind":{"type":"string","enum":["music"]},"asset":{"type":"string","minLength":1,"maxLength":64},"inMs":{"type":"integer","minimum":0},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":0},"gainDb":{"type":"number","minimum":-60,"maximum":12},"fadeInMs":{"type":"integer","minimum":0},"fadeOutMs":{"type":"integer","minimum":0},"duck":{"type":"object","properties":{"underTrack":{"type":"integer","minimum":0},"byDb":{"type":"number","minimum":0,"maximum":40}},"required":["underTrack","byDb"]}},"required":["kind","asset","inMs","atMs","durMs"]},"FootageSoundItemSfx":{"type":"object","properties":{"kind":{"type":"string","enum":["sfx"]},"sound":{"type":"string","minLength":1,"maxLength":64},"atMs":{"type":"integer","minimum":0},"gainDb":{"type":"number","minimum":-60,"maximum":12}},"required":["kind","sound","atMs"]},"FootageSoundItem":{"oneOf":[{"$ref":"#/components/schemas/FootageSoundItemSource"},{"$ref":"#/components/schemas/FootageSoundItemMusic"},{"$ref":"#/components/schemas/FootageSoundItemSfx"}],"discriminator":{"propertyName":"kind","mapping":{"source":"#/components/schemas/FootageSoundItemSource","music":"#/components/schemas/FootageSoundItemMusic","sfx":"#/components/schemas/FootageSoundItemSfx"}}},"FootageOverlayItemCard":{"type":"object","properties":{"kind":{"type":"string","enum":["card"]},"cardId":{"type":"string","minLength":1,"maxLength":64},"styleId":{"type":"string","minLength":1,"maxLength":64},"slots":{"type":"object","additionalProperties":{"type":"string","maxLength":400}},"imageSlots":{"type":"object","additionalProperties":{"type":"string","maxLength":64}},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":0},"ref":{"type":"string","maxLength":120}},"required":["kind","cardId","styleId","slots","atMs","durMs"]},"FootageOverlayItemCaptions":{"type":"object","properties":{"kind":{"type":"string","enum":["captions"]},"styleId":{"type":"string","minLength":1,"maxLength":64},"fromTrack":{"type":"integer","minimum":0},"lang":{"type":"string","maxLength":16},"lyrics":{"type":"boolean"}},"required":["kind","styleId","fromTrack"]},"FootageOverlayItemLogo":{"type":"object","properties":{"kind":{"type":"string","enum":["logo"]},"asset":{"type":"string","minLength":1,"maxLength":64},"corner":{"type":"string","enum":["tl","tr","bl","br"]},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":0}},"required":["kind","asset","corner","atMs","durMs"]},"FootageOverlayItemOutline":{"type":"object","properties":{"kind":{"type":"string","enum":["outline"]},"object":{"type":"string","pattern":"^[0-9a-f]{64}$"},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":0},"shapes":{"type":"array","items":{"type":"object","properties":{"srcMs":{"type":"integer","minimum":0},"box":{"$ref":"#/components/schemas/FootageRect"}},"required":["srcMs","box"]},"minItems":1,"maxItems":600},"label":{"type":"string","maxLength":80},"ref":{"type":"string","maxLength":120}},"required":["kind","object","atMs","durMs","shapes"]},"FootageOverlayItem":{"oneOf":[{"$ref":"#/components/schemas/FootageOverlayItemCard"},{"$ref":"#/components/schemas/FootageOverlayItemCaptions"},{"$ref":"#/components/schemas/FootageOverlayItemLogo"},{"$ref":"#/components/schemas/FootageOverlayItemOutline"}],"discriminator":{"propertyName":"kind","mapping":{"card":"#/components/schemas/FootageOverlayItemCard","captions":"#/components/schemas/FootageOverlayItemCaptions","logo":"#/components/schemas/FootageOverlayItemLogo","outline":"#/components/schemas/FootageOverlayItemOutline"}}},"FootageEdl":{"type":"object","properties":{"v":{"type":"number","enum":[1]},"output":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"anyOf":[{"type":"number","enum":[24]},{"type":"number","enum":[25]},{"type":"number","enum":[30]},{"type":"number","enum":[50]}]},"durMs":{"type":"integer","minimum":0}},"required":["width","height","fps","durMs"]},"picture":{"type":"array","items":{"$ref":"#/components/schemas/FootagePictureItem"},"minItems":1,"maxItems":2000},"sound":{"type":"array","items":{"type":"array","items":{"$ref":"#/components/schemas/FootageSoundItem"},"maxItems":2000},"maxItems":8},"overlays":{"type":"array","items":{"$ref":"#/components/schemas/FootageOverlayItem"},"maxItems":500},"transitions":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"kind":{"type":"string","enum":["cut","dissolve","held"]},"shader":{"type":"string","maxLength":64},"durMs":{"type":"integer","minimum":0}},"required":["atMs","kind"]},"maxItems":2000}},"required":["v","output","picture","sound","overlays"]},"PropertyShotsResponse":{"type":"object","properties":{"shots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileId":{"type":"string"},"kind":{"type":"string","enum":["video","photo"]},"roomId":{"type":"string"},"space":{"type":"string"},"spaceKind":{"type":"string","enum":["entrance","living","dining","kitchen","puja","staircase","study","theatre","bedroom","dressing","bathroom","balcony","terrace","other"]},"features":{"type":"array","items":{"type":"string"}},"seconds":{"type":"number"},"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"look":{"type":["integer","null"],"minimum":1,"maximum":5},"detail":{"type":["integer","null"],"minimum":1,"maximum":5},"stillMs":{"type":"integer","minimum":0}},"required":["id","fileId","kind","roomId","space","spaceKind","features","seconds","startMs","endMs","look","detail","stillMs"]}},"ideas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["space","pair","feature"]},"name":{"type":"string"},"why":{"type":"string"},"shots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":120},"seconds":{"type":"number","minimum":1.5,"maximum":4}},"required":["id","seconds"]}},"seconds":{"type":"number"}},"required":["id","kind","name","why","shots","seconds"]}}},"required":["shots","ideas"]},"PropertyCutRequest":{"type":"object","properties":{"shots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":120},"seconds":{"type":"number","minimum":1.5,"maximum":4}},"required":["id","seconds"]},"minItems":1,"maxItems":40},"shape":{"type":"string","enum":["9:16","1:1","16:9"]}},"required":["shots"]},"PropertyCutResponse":{"type":"object","properties":{"edl":{"$ref":"#/components/schemas/FootageEdl"},"missing":{"type":"integer","minimum":0}},"required":["edl","missing"]},"CreatePropertyVideoRequest":{"type":"object","properties":{"format":{"type":"string","enum":["testimonial_reel","request","studio_plan"]},"request":{"type":"string","minLength":3,"maxLength":500},"shape":{"type":"string","enum":["9:16","1:1","16:9"]},"lengthS":{"type":"integer","minimum":15,"maximum":90},"testimonialKind":{"type":"string","enum":["reel","full","highlights","short"]},"factsCard":{"type":"object","properties":{"show":{"type":"object","properties":{"kind":{"type":"boolean"},"size":{"type":"boolean"},"locality":{"type":"boolean"},"building":{"type":"boolean"},"price":{"type":"boolean"},"budget":{"type":"boolean"},"timeTaken":{"type":"boolean"}},"required":["kind","size","locality","building","price"]},"lines":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":3},"off":{"type":"boolean"},"priceReveal":{"type":"boolean"},"priceLabel":{"type":"string","maxLength":24},"rera":{"type":"boolean"}},"required":["show","lines"]},"harness":{"type":"object","properties":{"purpose":{"type":"string","enum":["show_our_work","before_after","room_reveal","client_speaks","walkthrough"]},"audience":{"type":"string","enum":["homeowner","builder","design_lover"]},"note":{"type":"string","maxLength":200},"speakers":{"type":"array","items":{"type":"object","properties":{"take":{"type":"string","pattern":"^T\\d{1,3}$"},"speaker":{"type":"string","pattern":"^[A-Z]$"},"role":{"type":"string","enum":["client","designer","other"]}},"required":["take","speaker","role"]},"maxItems":24}}},"seller":{"type":"object","properties":{"purpose":{"type":"string","enum":["sell","launch"]},"audience":{"type":"string","enum":["buyer","investor"]},"note":{"type":"string","maxLength":200}}},"letting":{"type":"object","properties":{"note":{"type":"string","maxLength":200}}},"rera":{"type":"boolean"},"shots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":120},"seconds":{"type":"number","minimum":1.5,"maximum":4}},"required":["id","seconds"]},"minItems":1,"maxItems":40},"title":{"type":"string","minLength":1,"maxLength":80},"idea":{"type":"string","maxLength":60},"tour":{"type":"object","properties":{},"additionalProperties":false}}},"PropertyVideoResponse":{"type":"object","properties":{"video":{"type":"object","properties":{"id":{"type":"string"},"propertyId":{"type":"string"},"format":{"type":"string","enum":["testimonial_reel","request","studio_plan"]},"shape":{"type":"string","enum":["9:16","1:1","16:9"]},"status":{"type":"string","enum":["planning","planned","failed"]},"error":{"type":["string","null"]},"request":{"type":["string","null"]},"title":{"type":["string","null"]},"note":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"text":{"type":"string"},"show":{"type":"string","enum":["speaker","spaces"]},"spaces":{"type":"array","items":{"type":"string"}}},"required":["fileId","startMs","endMs","text","show","spaces"]}},"conflicts":{"type":"array","items":{"type":"object","properties":{"kept":{"type":"string"},"dropped":{"type":"string"},"why":{"type":"string"}},"required":["kept","dropped","why"]}},"edl":{"allOf":[{"$ref":"#/components/schemas/FootageEdl"},{"type":["object","null"]}]},"durationMs":{"type":["integer","null"],"minimum":0},"createdAt":{"type":"string"},"plannedAt":{"type":["string","null"]},"music":{"type":["object","null"],"properties":{"title":{"type":"string"},"artist":{"type":"string"},"licence":{"type":"string"},"licenseUrl":{"type":"string"},"url":{"type":"string"},"credit":{"type":"string"},"mood":{"type":["string","null"],"enum":["calm","warm","uplifting","elegant","chill"]}},"required":["title","artist","licence","licenseUrl","url","credit","mood"]},"render":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["rendering","rendered","failed"]},"progress":{"type":"number","minimum":0,"maximum":1},"activity":{"type":["string","null"]},"stopping":{"type":"boolean"},"error":{"type":["string","null"]},"url":{"type":["string","null"]},"downloadUrl":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"bytes":{"type":["integer","null"],"minimum":0},"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"renderedAt":{"type":["string","null"]},"review":{"type":["object","null"],"properties":{"measured":{"type":"boolean"},"checked":{"type":"array","items":{"type":"string"}},"findings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"type":"string","enum":["fix","note"]},"atMs":{"type":["integer","null"],"minimum":0},"endMs":{"type":["integer","null"],"minimum":0},"message":{"type":"string"}},"required":["code","severity","atMs","endMs","message"]}}},"required":["measured","checked","findings"]},"editsOnly":{"type":"boolean"},"quality":{"type":"object","properties":{"readyToPost":{"type":"integer","minimum":1,"maximum":10},"below":{"type":"boolean"},"top":{"type":"array","items":{"type":"string"},"maxItems":5}},"required":["readyToPost","below","top"]}},"required":["status","progress","activity","error","url","downloadUrl","expiresAt","bytes","durationMs","width","height","renderedAt"]},"factsCard":{"type":["object","null"],"properties":{"show":{"type":"object","properties":{"kind":{"type":"boolean"},"size":{"type":"boolean"},"locality":{"type":"boolean"},"building":{"type":"boolean"},"price":{"type":"boolean"},"budget":{"type":"boolean"},"timeTaken":{"type":"boolean"}},"required":["kind","size","locality","building","price"]},"lines":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":3},"off":{"type":"boolean"},"priceReveal":{"type":"boolean"},"priceLabel":{"type":"string","maxLength":24},"rera":{"type":"boolean"}},"required":["show","lines"]},"arranged":{"type":["object","null"],"properties":{"shots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":120},"seconds":{"type":"number","minimum":1.5,"maximum":4}},"required":["id","seconds"]},"minItems":1,"maxItems":40},"title":{"type":"string","minLength":1,"maxLength":80},"idea":{"type":["string","null"],"maxLength":60}},"required":["shots","title","idea"]},"harness":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["reveal","owners_words","room_by_room"]},"name":{"type":"string"},"purpose":{"type":"string","enum":["show_our_work","before_after","room_reveal","client_speaks","walkthrough"]},"audience":{"type":"string","enum":["homeowner","builder","design_lover"]},"note":{"type":["string","null"]},"group":{"type":"string"}},"required":["kind","name","purpose","audience","note","group"]},"seller":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["walk_in","view_first","quick_look","numbers_first","home_then_numbers"]},"name":{"type":"string"},"purpose":{"type":"string","enum":["sell","launch"]},"audience":{"type":"string","enum":["buyer","investor"]},"note":{"type":["string","null"]},"group":{"type":"string"}},"required":["kind","name","purpose","audience","note","group"]},"letting":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["move_in","rent_quick_look"]},"name":{"type":"string"},"note":{"type":["string","null"]},"group":{"type":"string"}},"required":["kind","name","note","group"]},"story":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["reel","full","highlights","short"]},"understanding":{"type":["object","null"],"properties":{"who":{"type":"string"},"happened":{"type":"string"},"valued":{"type":"array","items":{"type":"string"}},"arc":{"type":"string"},"speakers":{"type":"array","items":{"type":"object","properties":{"take":{"type":"string"},"speaker":{"type":"string"},"role":{"type":"string","enum":["client","designer","other","unsure"]}},"required":["take","speaker","role"]}}},"required":["who","happened","valued","arc"]},"choices":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"why":{"type":"string"},"cut":{"type":["string","null"]}},"required":["text","why","cut"]}},"review":{"type":["object","null"],"properties":{"ok":{"type":"boolean"},"notes":{"type":"string"},"replanned":{"type":"boolean"},"pictures":{"type":"array","items":{"type":"string"}}},"required":["ok","notes","replanned"]}},"required":["kind","understanding","choices","review"]},"reshapedFrom":{"type":["object","null"],"properties":{"videoId":{"type":"string"},"shape":{"type":"string","enum":["9:16","1:1","16:9"]}},"required":["videoId","shape"]},"chapters":{"type":["array","null"],"items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"name":{"type":"string"}},"required":["atMs","name"]}},"tour":{"type":"boolean"},"youtube":{"type":["object","null"],"properties":{"title":{"type":"string"},"description":{"type":"string"}},"required":["title","description"]},"preview":{"allOf":[{"$ref":"#/components/schemas/FootageEdl"},{"type":["object","null"]}]}},"required":["id","propertyId","format","shape","status","error","request","title","note","lines","conflicts","edl","durationMs","createdAt","plannedAt","music","render","factsCard"]},"plans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"propertyId":{"type":"string"},"format":{"type":"string","enum":["testimonial_reel","request","studio_plan"]},"shape":{"type":"string","enum":["9:16","1:1","16:9"]},"status":{"type":"string","enum":["planning","planned","failed"]},"error":{"type":["string","null"]},"request":{"type":["string","null"]},"title":{"type":["string","null"]},"note":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"text":{"type":"string"},"show":{"type":"string","enum":["speaker","spaces"]},"spaces":{"type":"array","items":{"type":"string"}}},"required":["fileId","startMs","endMs","text","show","spaces"]}},"conflicts":{"type":"array","items":{"type":"object","properties":{"kept":{"type":"string"},"dropped":{"type":"string"},"why":{"type":"string"}},"required":["kept","dropped","why"]}},"edl":{"allOf":[{"$ref":"#/components/schemas/FootageEdl"},{"type":["object","null"]}]},"durationMs":{"type":["integer","null"],"minimum":0},"createdAt":{"type":"string"},"plannedAt":{"type":["string","null"]},"music":{"type":["object","null"],"properties":{"title":{"type":"string"},"artist":{"type":"string"},"licence":{"type":"string"},"licenseUrl":{"type":"string"},"url":{"type":"string"},"credit":{"type":"string"},"mood":{"type":["string","null"],"enum":["calm","warm","uplifting","elegant","chill"]}},"required":["title","artist","licence","licenseUrl","url","credit","mood"]},"render":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["rendering","rendered","failed"]},"progress":{"type":"number","minimum":0,"maximum":1},"activity":{"type":["string","null"]},"stopping":{"type":"boolean"},"error":{"type":["string","null"]},"url":{"type":["string","null"]},"downloadUrl":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"bytes":{"type":["integer","null"],"minimum":0},"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"renderedAt":{"type":["string","null"]},"review":{"type":["object","null"],"properties":{"measured":{"type":"boolean"},"checked":{"type":"array","items":{"type":"string"}},"findings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"type":"string","enum":["fix","note"]},"atMs":{"type":["integer","null"],"minimum":0},"endMs":{"type":["integer","null"],"minimum":0},"message":{"type":"string"}},"required":["code","severity","atMs","endMs","message"]}}},"required":["measured","checked","findings"]},"editsOnly":{"type":"boolean"},"quality":{"type":"object","properties":{"readyToPost":{"type":"integer","minimum":1,"maximum":10},"below":{"type":"boolean"},"top":{"type":"array","items":{"type":"string"},"maxItems":5}},"required":["readyToPost","below","top"]}},"required":["status","progress","activity","error","url","downloadUrl","expiresAt","bytes","durationMs","width","height","renderedAt"]},"factsCard":{"type":["object","null"],"properties":{"show":{"type":"object","properties":{"kind":{"type":"boolean"},"size":{"type":"boolean"},"locality":{"type":"boolean"},"building":{"type":"boolean"},"price":{"type":"boolean"},"budget":{"type":"boolean"},"timeTaken":{"type":"boolean"}},"required":["kind","size","locality","building","price"]},"lines":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":3},"off":{"type":"boolean"},"priceReveal":{"type":"boolean"},"priceLabel":{"type":"string","maxLength":24},"rera":{"type":"boolean"}},"required":["show","lines"]},"arranged":{"type":["object","null"],"properties":{"shots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":120},"seconds":{"type":"number","minimum":1.5,"maximum":4}},"required":["id","seconds"]},"minItems":1,"maxItems":40},"title":{"type":"string","minLength":1,"maxLength":80},"idea":{"type":["string","null"],"maxLength":60}},"required":["shots","title","idea"]},"harness":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["reveal","owners_words","room_by_room"]},"name":{"type":"string"},"purpose":{"type":"string","enum":["show_our_work","before_after","room_reveal","client_speaks","walkthrough"]},"audience":{"type":"string","enum":["homeowner","builder","design_lover"]},"note":{"type":["string","null"]},"group":{"type":"string"}},"required":["kind","name","purpose","audience","note","group"]},"seller":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["walk_in","view_first","quick_look","numbers_first","home_then_numbers"]},"name":{"type":"string"},"purpose":{"type":"string","enum":["sell","launch"]},"audience":{"type":"string","enum":["buyer","investor"]},"note":{"type":["string","null"]},"group":{"type":"string"}},"required":["kind","name","purpose","audience","note","group"]},"letting":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["move_in","rent_quick_look"]},"name":{"type":"string"},"note":{"type":["string","null"]},"group":{"type":"string"}},"required":["kind","name","note","group"]},"story":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["reel","full","highlights","short"]},"understanding":{"type":["object","null"],"properties":{"who":{"type":"string"},"happened":{"type":"string"},"valued":{"type":"array","items":{"type":"string"}},"arc":{"type":"string"},"speakers":{"type":"array","items":{"type":"object","properties":{"take":{"type":"string"},"speaker":{"type":"string"},"role":{"type":"string","enum":["client","designer","other","unsure"]}},"required":["take","speaker","role"]}}},"required":["who","happened","valued","arc"]},"choices":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"why":{"type":"string"},"cut":{"type":["string","null"]}},"required":["text","why","cut"]}},"review":{"type":["object","null"],"properties":{"ok":{"type":"boolean"},"notes":{"type":"string"},"replanned":{"type":"boolean"},"pictures":{"type":"array","items":{"type":"string"}}},"required":["ok","notes","replanned"]}},"required":["kind","understanding","choices","review"]},"reshapedFrom":{"type":["object","null"],"properties":{"videoId":{"type":"string"},"shape":{"type":"string","enum":["9:16","1:1","16:9"]}},"required":["videoId","shape"]},"chapters":{"type":["array","null"],"items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"name":{"type":"string"}},"required":["atMs","name"]}},"tour":{"type":"boolean"},"youtube":{"type":["object","null"],"properties":{"title":{"type":"string"},"description":{"type":"string"}},"required":["title","description"]},"preview":{"allOf":[{"$ref":"#/components/schemas/FootageEdl"},{"type":["object","null"]}]}},"required":["id","propertyId","format","shape","status","error","request","title","note","lines","conflicts","edl","durationMs","createdAt","plannedAt","music","render","factsCard"]}},"unavailable":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["reveal","owners_words","room_by_room"]},"name":{"type":"string"},"missing":{"type":"array","items":{"type":"string"}}},"required":["kind","name","missing"]}}},"required":["video"]},"PropertyVideoList":{"type":"object","properties":{"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"propertyId":{"type":"string"},"format":{"type":"string","enum":["testimonial_reel","request","studio_plan"]},"shape":{"type":"string","enum":["9:16","1:1","16:9"]},"status":{"type":"string","enum":["planning","planned","failed"]},"error":{"type":["string","null"]},"request":{"type":["string","null"]},"title":{"type":["string","null"]},"note":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"text":{"type":"string"},"show":{"type":"string","enum":["speaker","spaces"]},"spaces":{"type":"array","items":{"type":"string"}}},"required":["fileId","startMs","endMs","text","show","spaces"]}},"conflicts":{"type":"array","items":{"type":"object","properties":{"kept":{"type":"string"},"dropped":{"type":"string"},"why":{"type":"string"}},"required":["kept","dropped","why"]}},"edl":{"allOf":[{"$ref":"#/components/schemas/FootageEdl"},{"type":["object","null"]}]},"durationMs":{"type":["integer","null"],"minimum":0},"createdAt":{"type":"string"},"plannedAt":{"type":["string","null"]},"music":{"type":["object","null"],"properties":{"title":{"type":"string"},"artist":{"type":"string"},"licence":{"type":"string"},"licenseUrl":{"type":"string"},"url":{"type":"string"},"credit":{"type":"string"},"mood":{"type":["string","null"],"enum":["calm","warm","uplifting","elegant","chill"]}},"required":["title","artist","licence","licenseUrl","url","credit","mood"]},"render":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["rendering","rendered","failed"]},"progress":{"type":"number","minimum":0,"maximum":1},"activity":{"type":["string","null"]},"stopping":{"type":"boolean"},"error":{"type":["string","null"]},"url":{"type":["string","null"]},"downloadUrl":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"bytes":{"type":["integer","null"],"minimum":0},"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"renderedAt":{"type":["string","null"]},"review":{"type":["object","null"],"properties":{"measured":{"type":"boolean"},"checked":{"type":"array","items":{"type":"string"}},"findings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"type":"string","enum":["fix","note"]},"atMs":{"type":["integer","null"],"minimum":0},"endMs":{"type":["integer","null"],"minimum":0},"message":{"type":"string"}},"required":["code","severity","atMs","endMs","message"]}}},"required":["measured","checked","findings"]},"editsOnly":{"type":"boolean"},"quality":{"type":"object","properties":{"readyToPost":{"type":"integer","minimum":1,"maximum":10},"below":{"type":"boolean"},"top":{"type":"array","items":{"type":"string"},"maxItems":5}},"required":["readyToPost","below","top"]}},"required":["status","progress","activity","error","url","downloadUrl","expiresAt","bytes","durationMs","width","height","renderedAt"]},"factsCard":{"type":["object","null"],"properties":{"show":{"type":"object","properties":{"kind":{"type":"boolean"},"size":{"type":"boolean"},"locality":{"type":"boolean"},"building":{"type":"boolean"},"price":{"type":"boolean"},"budget":{"type":"boolean"},"timeTaken":{"type":"boolean"}},"required":["kind","size","locality","building","price"]},"lines":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":3},"off":{"type":"boolean"},"priceReveal":{"type":"boolean"},"priceLabel":{"type":"string","maxLength":24},"rera":{"type":"boolean"}},"required":["show","lines"]},"arranged":{"type":["object","null"],"properties":{"shots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":120},"seconds":{"type":"number","minimum":1.5,"maximum":4}},"required":["id","seconds"]},"minItems":1,"maxItems":40},"title":{"type":"string","minLength":1,"maxLength":80},"idea":{"type":["string","null"],"maxLength":60}},"required":["shots","title","idea"]},"harness":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["reveal","owners_words","room_by_room"]},"name":{"type":"string"},"purpose":{"type":"string","enum":["show_our_work","before_after","room_reveal","client_speaks","walkthrough"]},"audience":{"type":"string","enum":["homeowner","builder","design_lover"]},"note":{"type":["string","null"]},"group":{"type":"string"}},"required":["kind","name","purpose","audience","note","group"]},"seller":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["walk_in","view_first","quick_look","numbers_first","home_then_numbers"]},"name":{"type":"string"},"purpose":{"type":"string","enum":["sell","launch"]},"audience":{"type":"string","enum":["buyer","investor"]},"note":{"type":["string","null"]},"group":{"type":"string"}},"required":["kind","name","purpose","audience","note","group"]},"letting":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["move_in","rent_quick_look"]},"name":{"type":"string"},"note":{"type":["string","null"]},"group":{"type":"string"}},"required":["kind","name","note","group"]},"story":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["reel","full","highlights","short"]},"understanding":{"type":["object","null"],"properties":{"who":{"type":"string"},"happened":{"type":"string"},"valued":{"type":"array","items":{"type":"string"}},"arc":{"type":"string"},"speakers":{"type":"array","items":{"type":"object","properties":{"take":{"type":"string"},"speaker":{"type":"string"},"role":{"type":"string","enum":["client","designer","other","unsure"]}},"required":["take","speaker","role"]}}},"required":["who","happened","valued","arc"]},"choices":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"why":{"type":"string"},"cut":{"type":["string","null"]}},"required":["text","why","cut"]}},"review":{"type":["object","null"],"properties":{"ok":{"type":"boolean"},"notes":{"type":"string"},"replanned":{"type":"boolean"},"pictures":{"type":"array","items":{"type":"string"}}},"required":["ok","notes","replanned"]}},"required":["kind","understanding","choices","review"]},"reshapedFrom":{"type":["object","null"],"properties":{"videoId":{"type":"string"},"shape":{"type":"string","enum":["9:16","1:1","16:9"]}},"required":["videoId","shape"]},"chapters":{"type":["array","null"],"items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"name":{"type":"string"}},"required":["atMs","name"]}},"tour":{"type":"boolean"},"youtube":{"type":["object","null"],"properties":{"title":{"type":"string"},"description":{"type":"string"}},"required":["title","description"]},"preview":{"allOf":[{"$ref":"#/components/schemas/FootageEdl"},{"type":["object","null"]}]}},"required":["id","propertyId","format","shape","status","error","request","title","note","lines","conflicts","edl","durationMs","createdAt","plannedAt","music","render","factsCard"]}}},"required":["videos"]},"UpdatePropertyVideoRequest":{"type":"object","properties":{"music":{"type":"object","properties":{"mood":{"type":"string","enum":["calm","warm","uplifting","elegant","chill"]},"off":{"type":"boolean","enum":[true]}}},"shots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":3,"maxLength":120},"seconds":{"type":"number","minimum":1.5,"maximum":4}},"required":["id","seconds"]},"minItems":1,"maxItems":40}}},"PropertyQuotesResponse":{"type":"object","properties":{"candidates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"fileId":{"type":"string"},"said":{"type":"string"},"forms":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":200},"shortened":{"type":"boolean"}},"required":["text","shortened"]},"maxItems":4},"played":{"type":"boolean"}},"required":["id","fileId","said","forms"]}},"quotes":{"type":"object","properties":{"lower":{"type":["object","null"],"properties":{"from":{"type":"string","maxLength":80},"text":{"type":"string","maxLength":200},"shortened":{"type":"boolean"}},"required":["from","text","shortened"]},"close":{"type":["object","null"],"properties":{"from":{"type":"string","maxLength":80},"text":{"type":"string","maxLength":200},"shortened":{"type":"boolean"}},"required":["from","text","shortened"]},"by":{"type":["string","null"],"maxLength":40}},"required":["lower","close","by"]},"defaultBy":{"type":"string"},"room":{"type":"object","properties":{"lower":{"type":"boolean"},"close":{"type":"boolean"}},"required":["lower","close"]}},"required":["candidates","quotes","defaultBy","room"]},"SetPropertyQuotesRequest":{"type":"object","properties":{"lower":{"type":["object","null"],"properties":{"from":{"type":"string","minLength":1,"maxLength":80},"text":{"type":"string","minLength":1,"maxLength":200},"approved":{"type":"boolean"}},"required":["from","text"]},"close":{"type":["object","null"],"properties":{"from":{"type":"string","minLength":1,"maxLength":80},"text":{"type":"string","minLength":1,"maxLength":200},"approved":{"type":"boolean"}},"required":["from","text"]},"by":{"type":["string","null"],"maxLength":40}}},"PropertyHighlightsResponse":{"type":"object","properties":{"shots":{"type":"array","items":{"type":"object","properties":{"shot":{"type":"integer","minimum":0},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","exclusiveMinimum":0},"space":{"type":"string"},"sourceMs":{"type":"integer","minimum":0},"still":{"type":["string","null"]}},"required":["shot","atMs","durMs","space","sourceMs","still"]}},"highlights":{"type":"array","items":{"type":"object","properties":{"shot":{"type":"integer","minimum":0},"sourceMs":{"type":"integer","minimum":0},"by":{"type":"string","enum":["toast","you"]},"on":{"type":"boolean"},"why":{"type":"string","maxLength":200},"item":{"type":"string","maxLength":32},"box":{"type":["object","null"],"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","minimum":0.04,"maximum":1},"h":{"type":"number","minimum":0.04,"maximum":1}},"required":["x","y","w","h"]},"treatment":{"type":["string","null"],"enum":["trace","spotlight","sweep","pulse","tag"]},"hero":{"type":"boolean"}},"required":["shot","sourceMs","by","on","why","item","box","treatment","hero"]}},"decided":{"type":"boolean"},"max":{"type":"integer","minimum":0}},"required":["shots","highlights","decided","max"]},"PropertyVideoLayersResponse":{"type":"object","properties":{"videoId":{"type":"string"},"renderedAt":{"type":["string","null"]},"width":{"type":"integer","exclusiveMinimum":0},"height":{"type":"integer","exclusiveMinimum":0},"durationMs":{"type":"integer","minimum":0},"layers":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"words":{"type":"string"},"slots":{"type":"object","additionalProperties":{"type":"string"}},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":0},"box":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","minimum":0,"maximum":1},"h":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","w","h"]},"place":{"type":["string","null"]},"ground":{"type":["string","null"]},"editable":{"type":"array","items":{"type":"string"}},"cardId":{"type":"string"},"styleId":{"type":"string"},"clip":{"type":"object","properties":{"url":{"type":"string"},"box":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","minimum":0,"maximum":1},"h":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","w","h"]},"crop":{"type":["object","null"],"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","minimum":0,"maximum":1},"h":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","w","h"]}},"required":["url","box","crop"]}},"required":["ref","kind","name","words","slots","atMs","durMs","box","place","ground","editable"]}},"edits":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":200},"add":{"type":"string","enum":["room_label","tag","words","title"]},"hide":{"type":"boolean"},"slots":{"type":"object","additionalProperties":{"type":"string","maxLength":200}},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":300,"maximum":600000},"at":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"]},"ground":{"type":"string","enum":["plate","fade","bare"]}},"required":["ref"]},"maxItems":200},"settings":{"type":"object","properties":{"music":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-18,"maximum":6},"fadeInMs":{"type":"integer","minimum":0,"maximum":5000},"fadeOutMs":{"type":"integer","minimum":0,"maximum":8000}}},"sounds":{"type":"object","properties":{"transitions":{"type":"boolean"},"cards":{"type":"boolean"}}},"captions":{"type":"object","properties":{"off":{"type":"boolean"},"styleId":{"type":"string","maxLength":64,"pattern":"^hf-[a-z0-9-]+$"},"size":{"type":"string","enum":["small","medium","large"]}}},"grade":{"type":"string","enum":["warm","cool","film","crisp","mono"]},"shots":{"type":"object","additionalProperties":{"type":"object","properties":{"grade":{"anyOf":[{"type":"string","enum":["warm","cool","film","crisp","mono"]},{"type":"string","enum":["none"]}]},"zoom":{"type":"string","enum":["punch","in","out"]},"speed":{"anyOf":[{"type":"number","enum":[0.5]},{"type":"number","enum":[0.75]},{"type":"number","enum":[1.25]},{"type":"number","enum":[1.5]},{"type":"number","enum":[2]}]}}}},"cuts":{"type":"object","additionalProperties":{"type":"string","enum":["cut","door-pass","whip-pan"]}},"clips":{"type":"object","additionalProperties":{"type":"object","properties":{"object":{"type":"string","pattern":"^[0-9a-f]{64}$"},"kind":{"type":"string","enum":["video","photo"]},"fromMs":{"type":"integer","minimum":0,"maximum":36000000}},"required":["object","kind","fromMs"]}},"details":{"type":"object","properties":{"callouts":{"type":"boolean"},"nearby":{"type":"boolean"}}},"route":{"type":"boolean"},"labelStyle":{"type":"string","enum":["glass","minimal","tag","outline","frosted"]}}},"sounds":{"type":"object","properties":{"transitions":{"type":"boolean"},"cards":{"type":"boolean"}},"required":["transitions","cards"]},"visual":{"type":"object","properties":{"grade":{"type":"boolean"},"motion":{"type":"boolean"},"transitions":{"type":"boolean"}},"required":["grade","motion","transitions"]},"details":{"type":"object","properties":{"callouts":{"type":"boolean"},"nearby":{"type":"boolean"}},"required":["callouts","nearby"]},"cards":{"type":"object","properties":{"route":{"type":"boolean"}},"required":["route"]},"planned":{"type":"boolean"}},"required":["videoId","renderedAt","width","height","durationMs","layers"]},"PropertyLayerPreviewRequest":{"type":"object","properties":{"edits":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":200},"add":{"type":"string","enum":["room_label","tag","words","title"]},"hide":{"type":"boolean"},"slots":{"type":"object","additionalProperties":{"type":"string","maxLength":200}},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":300,"maximum":600000},"at":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"]},"ground":{"type":"string","enum":["plate","fade","bare"]}},"required":["ref"]},"maxItems":30},"all":{"type":"boolean"}},"required":["edits"]},"PropertyLayerPreviewResponse":{"type":"object","properties":{"previews":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string"},"clip":{"type":"object","properties":{"url":{"type":"string"},"box":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","minimum":0,"maximum":1},"h":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","w","h"]},"crop":{"type":["object","null"],"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","minimum":0,"maximum":1},"h":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","w","h"]}},"required":["url","box","crop"]},"words":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","minimum":0,"maximum":1},"h":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","w","h"]},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":0}},"required":["ref","clip","atMs","durMs"]}},"logo":{"type":"object","properties":{"url":{"type":"string"},"box":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","minimum":0,"maximum":1},"h":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","w","h"]},"crop":{"type":["object","null"],"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","minimum":0,"maximum":1},"h":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","w","h"]},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":0},"fadeMs":{"type":"integer","minimum":0}},"required":["url","box","crop","atMs","durMs","fadeMs"]},"pending":{"type":"boolean"}},"required":["previews"]},"SetPropertyLayerEditsRequest":{"type":"object","properties":{"edits":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":200},"add":{"type":"string","enum":["room_label","tag","words","title"]},"hide":{"type":"boolean"},"slots":{"type":"object","additionalProperties":{"type":"string","maxLength":200}},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":300,"maximum":600000},"at":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"]},"ground":{"type":"string","enum":["plate","fade","bare"]}},"required":["ref"]},"maxItems":200},"settings":{"type":"object","properties":{"music":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-18,"maximum":6},"fadeInMs":{"type":"integer","minimum":0,"maximum":5000},"fadeOutMs":{"type":"integer","minimum":0,"maximum":8000}}},"sounds":{"type":"object","properties":{"transitions":{"type":"boolean"},"cards":{"type":"boolean"}}},"captions":{"type":"object","properties":{"off":{"type":"boolean"},"styleId":{"type":"string","maxLength":64,"pattern":"^hf-[a-z0-9-]+$"},"size":{"type":"string","enum":["small","medium","large"]}}},"grade":{"type":"string","enum":["warm","cool","film","crisp","mono"]},"shots":{"type":"object","additionalProperties":{"type":"object","properties":{"grade":{"anyOf":[{"type":"string","enum":["warm","cool","film","crisp","mono"]},{"type":"string","enum":["none"]}]},"zoom":{"type":"string","enum":["punch","in","out"]},"speed":{"anyOf":[{"type":"number","enum":[0.5]},{"type":"number","enum":[0.75]},{"type":"number","enum":[1.25]},{"type":"number","enum":[1.5]},{"type":"number","enum":[2]}]}}}},"cuts":{"type":"object","additionalProperties":{"type":"string","enum":["cut","door-pass","whip-pan"]}},"clips":{"type":"object","additionalProperties":{"type":"object","properties":{"object":{"type":"string","pattern":"^[0-9a-f]{64}$"},"kind":{"type":"string","enum":["video","photo"]},"fromMs":{"type":"integer","minimum":0,"maximum":36000000}},"required":["object","kind","fromMs"]}},"details":{"type":"object","properties":{"callouts":{"type":"boolean"},"nearby":{"type":"boolean"}}},"route":{"type":"boolean"},"labelStyle":{"type":"string","enum":["glass","minimal","tag","outline","frosted"]}}}},"required":["edits"]},"PropertyLayerEditsResponse":{"type":"object","properties":{"videoId":{"type":"string"},"edits":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","minLength":1,"maxLength":200},"add":{"type":"string","enum":["room_label","tag","words","title"]},"hide":{"type":"boolean"},"slots":{"type":"object","additionalProperties":{"type":"string","maxLength":200}},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":300,"maximum":600000},"at":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"]},"ground":{"type":"string","enum":["plate","fade","bare"]}},"required":["ref"]},"maxItems":200},"settings":{"type":"object","properties":{"music":{"type":"object","properties":{"gainDb":{"type":"number","minimum":-18,"maximum":6},"fadeInMs":{"type":"integer","minimum":0,"maximum":5000},"fadeOutMs":{"type":"integer","minimum":0,"maximum":8000}}},"sounds":{"type":"object","properties":{"transitions":{"type":"boolean"},"cards":{"type":"boolean"}}},"captions":{"type":"object","properties":{"off":{"type":"boolean"},"styleId":{"type":"string","maxLength":64,"pattern":"^hf-[a-z0-9-]+$"},"size":{"type":"string","enum":["small","medium","large"]}}},"grade":{"type":"string","enum":["warm","cool","film","crisp","mono"]},"shots":{"type":"object","additionalProperties":{"type":"object","properties":{"grade":{"anyOf":[{"type":"string","enum":["warm","cool","film","crisp","mono"]},{"type":"string","enum":["none"]}]},"zoom":{"type":"string","enum":["punch","in","out"]},"speed":{"anyOf":[{"type":"number","enum":[0.5]},{"type":"number","enum":[0.75]},{"type":"number","enum":[1.25]},{"type":"number","enum":[1.5]},{"type":"number","enum":[2]}]}}}},"cuts":{"type":"object","additionalProperties":{"type":"string","enum":["cut","door-pass","whip-pan"]}},"clips":{"type":"object","additionalProperties":{"type":"object","properties":{"object":{"type":"string","pattern":"^[0-9a-f]{64}$"},"kind":{"type":"string","enum":["video","photo"]},"fromMs":{"type":"integer","minimum":0,"maximum":36000000}},"required":["object","kind","fromMs"]}},"details":{"type":"object","properties":{"callouts":{"type":"boolean"},"nearby":{"type":"boolean"}}},"route":{"type":"boolean"},"labelStyle":{"type":"string","enum":["glass","minimal","tag","outline","frosted"]}}}},"required":["videoId","edits"]},"SetPropertyHighlightsRequest":{"type":"object","properties":{"off":{"type":"array","items":{"type":"integer","minimum":0},"maxItems":64},"add":{"type":"array","items":{"type":"object","properties":{"shot":{"type":"integer","minimum":0},"box":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","minimum":0.04,"maximum":1},"h":{"type":"number","minimum":0.04,"maximum":1}},"required":["x","y","w","h"]},"item":{"type":"string","minLength":1,"maxLength":32},"treatment":{"type":"string","enum":["trace","spotlight","sweep","pulse","tag"]}},"required":["shot","box","item"]},"maxItems":8}}},"RenderPropertyVideoRequest":{"type":"object","properties":{"again":{"type":"boolean"},"fresh":{"type":"boolean"}}},"ReshapePropertyVideoRequest":{"type":"object","properties":{"shape":{"type":"string","enum":["9:16","1:1","16:9"]}},"required":["shape"]},"UpdatePropertyFileRequest":{"type":"object","properties":{"before":{"type":"boolean"}},"required":["before"]},"PropertyBeforeAfterResponse":{"type":"object","properties":{"pairs":{"type":"array","items":{"type":"object","properties":{"beforeFileId":{"type":"string"},"afterFileId":{"type":"string"},"afterAtMs":{"type":"integer","minimum":0},"roomId":{"type":["string","null"]},"match":{"type":"integer","minimum":0},"confirmed":{"type":"boolean"}},"required":["beforeFileId","afterFileId","afterAtMs","roomId","match","confirmed"]}},"unmatched":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["ready","matching"]}},"required":["pairs","unmatched","status"]},"ConfirmPropertyBeforeAfterRequest":{"type":"object","properties":{"pairs":{"type":"array","items":{"type":"object","properties":{"beforeFileId":{"type":"string"},"afterFileId":{"type":"string"},"afterAtMs":{"type":"integer","minimum":0}},"required":["beforeFileId","afterFileId","afterAtMs"]},"maxItems":50}},"required":["pairs"]},"BrandKitResponse":{"type":"object","properties":{"brandKit":{"type":"object","properties":{"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"website":{"type":["string","null"]},"licenceNumber":{"type":["string","null"]},"whatsapp":{"type":["string","null"]},"askLine":{"type":["string","null"]},"proofLines":{"type":"array","items":{"type":"string"}},"logo":{"type":["object","null"],"properties":{"assetId":{"type":"string"},"url":{"type":["string","null"]},"width":{"type":["integer","null"]},"height":{"type":["integer","null"]},"tone":{"type":"string","enum":["light","dark"]}},"required":["assetId","url","width","height","tone"]},"colours":{"type":"array","items":{"type":"string"}},"fonts":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":["string","null"]}},"required":["name","phone","website","licenceNumber","whatsapp","askLine","proofLines","logo","colours","fonts","updatedAt"]}},"required":["brandKit"]},"UpdateBrandKitRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":120},"licenceNumber":{"type":"string","maxLength":60},"whatsapp":{"type":"string","maxLength":40},"askLine":{"type":"string","maxLength":60},"proofLines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":2},"colours":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"maxItems":6},"fonts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[\\w .'-]+$"},"maxItems":3}}},"StudioResponse":{"type":"object","properties":{"studio":{"type":"object","properties":{"name":{"type":"string"},"phone":{"type":["string","null"]},"website":{"type":["string","null"]},"licenceNumber":{"type":["string","null"]},"whatsapp":{"type":["string","null"]},"askLine":{"type":["string","null"]},"proofLines":{"type":"array","items":{"type":"string"}},"logo":{"type":["object","null"],"properties":{"assetId":{"type":"string"},"url":{"type":["string","null"]},"width":{"type":["integer","null"]},"height":{"type":["integer","null"]},"tone":{"type":"string","enum":["light","dark"]}},"required":["assetId","url","width","height","tone"]},"colours":{"type":"array","items":{"type":"string"}},"fonts":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":["string","null"]},"id":{"type":"string"},"look":{"type":"object","properties":{"destinations":{"type":"array","items":{"type":"string","enum":["youtube","reels","whatsapp"]},"maxItems":3},"cornerLogo":{"type":"boolean"},"openingCard":{"type":"boolean"}}},"references":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":300,"format":"uri"},"note":{"type":"string","maxLength":200}},"required":["url"]}},"communityCount":{"type":"integer","minimum":0},"flatCount":{"type":"integer","minimum":0},"createdAt":{"type":"string"}},"required":["name","phone","website","licenceNumber","whatsapp","askLine","proofLines","logo","colours","fonts","updatedAt","id","look","references","communityCount","flatCount","createdAt"]}},"required":["studio"]},"CommunityResponse":{"type":"object","properties":{"community":{"type":"object","properties":{"id":{"type":"string"},"studioId":{"type":"string"},"name":{"type":"string"},"area":{"type":["string","null"]},"builder":{"type":["string","null"]},"reraNumber":{"type":["string","null"]},"flatCount":{"type":"integer","minimum":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","studioId","name","area","builder","reraNumber","flatCount","createdAt","updatedAt"]}},"required":["community"]},"StudioListResponse":{"type":"object","properties":{"studios":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"phone":{"type":["string","null"]},"website":{"type":["string","null"]},"licenceNumber":{"type":["string","null"]},"whatsapp":{"type":["string","null"]},"askLine":{"type":["string","null"]},"proofLines":{"type":"array","items":{"type":"string"}},"logo":{"type":["object","null"],"properties":{"assetId":{"type":"string"},"url":{"type":["string","null"]},"width":{"type":["integer","null"]},"height":{"type":["integer","null"]},"tone":{"type":"string","enum":["light","dark"]}},"required":["assetId","url","width","height","tone"]},"colours":{"type":"array","items":{"type":"string"}},"fonts":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":["string","null"]},"id":{"type":"string"},"look":{"type":"object","properties":{"destinations":{"type":"array","items":{"type":"string","enum":["youtube","reels","whatsapp"]},"maxItems":3},"cornerLogo":{"type":"boolean"},"openingCard":{"type":"boolean"}}},"references":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":300,"format":"uri"},"note":{"type":"string","maxLength":200}},"required":["url"]}},"communityCount":{"type":"integer","minimum":0},"flatCount":{"type":"integer","minimum":0},"createdAt":{"type":"string"}},"required":["name","phone","website","licenceNumber","whatsapp","askLine","proofLines","logo","colours","fonts","updatedAt","id","look","references","communityCount","flatCount","createdAt"]}}},"required":["studios"]},"CreateStudioRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":120},"licenceNumber":{"type":"string","maxLength":60},"whatsapp":{"type":"string","maxLength":40},"askLine":{"type":"string","maxLength":60},"proofLines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":2},"colours":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"maxItems":6},"fonts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[\\w .'-]+$"},"maxItems":3},"look":{"type":"object","properties":{"destinations":{"type":"array","items":{"type":"string","enum":["youtube","reels","whatsapp"]},"maxItems":3},"cornerLogo":{"type":"boolean"},"openingCard":{"type":"boolean"}}},"references":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":300,"format":"uri"},"note":{"type":"string","maxLength":200}},"required":["url"]},"maxItems":6}},"required":["name"]},"UpdateStudioRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"phone":{"type":"string","maxLength":40},"website":{"type":"string","maxLength":120},"licenceNumber":{"type":"string","maxLength":60},"whatsapp":{"type":"string","maxLength":40},"askLine":{"type":"string","maxLength":60},"proofLines":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":2},"colours":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"maxItems":6},"fonts":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[\\w .'-]+$"},"maxItems":3},"look":{"type":"object","properties":{"destinations":{"type":"array","items":{"type":"string","enum":["youtube","reels","whatsapp"]},"maxItems":3},"cornerLogo":{"type":"boolean"},"openingCard":{"type":"boolean"}}},"references":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":300,"format":"uri"},"note":{"type":"string","maxLength":200}},"required":["url"]},"maxItems":6}}},"CommunityListResponse":{"type":"object","properties":{"communities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"studioId":{"type":"string"},"name":{"type":"string"},"area":{"type":["string","null"]},"builder":{"type":["string","null"]},"reraNumber":{"type":["string","null"]},"flatCount":{"type":"integer","minimum":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","studioId","name","area","builder","reraNumber","flatCount","createdAt","updatedAt"]}}},"required":["communities"]},"CreateCommunityRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"area":{"type":"string","maxLength":80},"builder":{"type":"string","maxLength":80},"reraNumber":{"type":"string","maxLength":60}},"required":["name"]},"UpdateCommunityRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"area":{"type":"string","maxLength":80},"builder":{"type":"string","maxLength":80},"reraNumber":{"type":"string","maxLength":60}}},"EventAccess":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"CreateEventRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}}},"EventResponse":{"type":"object","properties":{"event":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"fileCount":{"type":"integer","minimum":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","fileCount","createdAt","updatedAt"]},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"kind":{"type":"string","enum":["video","photo","audio"]},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"createdAt":{"type":"string"}},"required":["id","name","size","mime","kind","sha256","state","media","createdAt"]}}},"required":["event","files"]},"EventList":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"fileCount":{"type":"integer","minimum":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","fileCount","createdAt","updatedAt"]}}},"required":["events"]},"UpdateEventRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}}},"RegisterEventFilesRequest":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string","maxLength":100}},"required":["sha256","name","size","mime"]},"minItems":1,"maxItems":500}},"required":["files"]},"RegisterEventFilesResponse":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string"},"state":{"type":"string","enum":["new","resume","have","refused"]},"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"kind":{"type":"string","enum":["video","photo","audio"]},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"createdAt":{"type":"string"}},"required":["id","name","size","mime","kind","sha256","state","media","createdAt"]},"upload":{"type":"object","properties":{"partSize":{"type":"integer","exclusiveMinimum":0},"parts":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","exclusiveMinimum":0},"url":{"type":"string"}},"required":["n","url"]}},"expiresAt":{"type":"string"}},"required":["partSize","parts","expiresAt"]},"reason":{"type":"string"}},"required":["sha256","name","state"]}}},"required":["files"]},"EventFileUploadResponse":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"kind":{"type":"string","enum":["video","photo","audio"]},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"createdAt":{"type":"string"}},"required":["id","name","size","mime","kind","sha256","state","media","createdAt"]},"upload":{"type":"object","properties":{"partSize":{"type":"integer","exclusiveMinimum":0},"parts":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","exclusiveMinimum":0},"url":{"type":"string"}},"required":["n","url"]}},"expiresAt":{"type":"string"}},"required":["partSize","parts","expiresAt"]}},"required":["file","upload"]},"CompleteEventFileRequest":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","exclusiveMinimum":0},"etag":{"type":"string","minLength":1,"maxLength":200}},"required":["n","etag"]},"minItems":1,"maxItems":10000}},"required":["parts"]},"EventFileResponse":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"kind":{"type":"string","enum":["video","photo","audio"]},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"createdAt":{"type":"string"}},"required":["id","name","size","mime","kind","sha256","state","media","createdAt"]}},"required":["file"]},"EventFileMediaResponse":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"kind":{"type":"string","enum":["video","photo","audio"]},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"createdAt":{"type":"string"}},"required":["id","name","size","mime","kind","sha256","state","media","createdAt"]},"media":{"type":"object","properties":{"state":{"type":["string","null"],"enum":["pending","processing","ready","failed"]},"proxy":{"type":["object","null"],"properties":{"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"type":"number"}},"required":["url","width","height","fps"]},"audio":{"type":["object","null"],"properties":{"url":{"type":"string"}},"required":["url"]},"display":{"type":["object","null"],"properties":{"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"}},"required":["url","width","height"]},"stills":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"}},"required":["atMs","url","width","height"]}},"expiresAt":{"type":["string","null"]},"transcript":{"type":["object","null"],"properties":{"language":{"type":["string","null"]},"words":{"type":"array","items":{"type":"object","properties":{"w":{"type":"string"},"s":{"type":"integer"},"e":{"type":"integer"},"speaker":{"type":"string"}},"required":["w","s","e","speaker"]}}},"required":["language","words"]}},"required":["state","proxy","audio","display","stills","expiresAt","transcript"]}},"required":["file","media"]},"EventReadingResponse":{"type":"object","properties":{"reading":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","failed"]},"step":{"type":["string","null"],"enum":["waiting","listening","looking","done"]},"activity":{"type":["string","null"]},"progress":{"type":"integer","minimum":0,"maximum":100},"error":{"type":["string","null"]},"summary":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"kind":{"type":"string","enum":["talk","conversation","performance","ceremony","procession","arrival","audience","group_photo","candid","venue","meal","other"]},"what":{"type":"string"},"people":{"type":"array","items":{"type":"string"}},"quality":{"type":"string","enum":["good","soft","shaky","blocked","dark"]}},"required":["startMs","endMs","kind","what","people","quality"]}},"moments":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"what":{"type":"string"},"strength":{"type":"integer","minimum":1,"maximum":5},"source":{"type":"string","enum":["picture","sound"]}},"required":["atMs","what","strength","source"]}},"voices":{"type":"array","items":{"type":"object","properties":{"voice":{"type":"string"},"speaker":{"type":"string"},"speakingMs":{"type":"integer","minimum":0},"personId":{"type":["string","null"]}},"required":["voice","speaker","speakingMs","personId"]}},"children":{"type":"boolean"},"sound":{"type":["object","null"],"properties":{"words":{"type":"integer","minimum":0},"sungWords":{"type":"integer","minimum":0},"language":{"type":["string","null"]},"music":{"type":"array","items":{"type":"object","properties":{"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0}},"required":["startMs","endMs"]}}},"required":["words","sungWords","language","music"]}},"required":["fileId","segments","moments","voices","children","sound"]}},"people":{"type":"array","items":{"type":"object","properties":{"personId":{"type":"string"},"description":{"type":"string"},"role":{"type":"string","enum":["main","host","speaker","performer","guest"]},"child":{"type":"boolean"},"name":{"type":["string","null"]},"title":{"type":["string","null"]},"featured":{"type":"boolean"},"files":{"type":"integer","minimum":0},"speakingMs":{"type":"integer","minimum":0}},"required":["personId","description","role","child","name","title","featured","files","speakingMs"]}},"skipped":{"type":"array","items":{"type":"string"}},"corrections":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["name"]},"personId":{"type":"string","minLength":1,"maxLength":60},"name":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":80}},"required":["kind","personId","name"]},{"type":"object","properties":{"kind":{"type":"string","enum":["merge"]},"into":{"type":"string","minLength":1,"maxLength":60},"from":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"minItems":1,"maxItems":50}},"required":["kind","into","from"]},{"type":"object","properties":{"kind":{"type":"string","enum":["feature"]},"personId":{"type":"string","minLength":1,"maxLength":60},"featured":{"type":"boolean"}},"required":["kind","personId","featured"]}]}},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","status","step","activity","progress","error","summary","files","people","skipped","corrections","createdAt","finishedAt"]}},"required":["reading"]},"EventCorrectionsRequest":{"type":"object","properties":{"corrections":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["name"]},"personId":{"type":"string","minLength":1,"maxLength":60},"name":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":80}},"required":["kind","personId","name"]},{"type":"object","properties":{"kind":{"type":"string","enum":["merge"]},"into":{"type":"string","minLength":1,"maxLength":60},"from":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"minItems":1,"maxItems":50}},"required":["kind","into","from"]},{"type":"object","properties":{"kind":{"type":"string","enum":["feature"]},"personId":{"type":"string","minLength":1,"maxLength":60},"featured":{"type":"boolean"}},"required":["kind","personId","featured"]}]},"minItems":1,"maxItems":50}},"required":["corrections"]},"EventFormatsResponse":{"type":"object","properties":{"formats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["highlight_reel"]},"name":{"type":"string"},"description":{"type":"string"},"needs":{"type":"array","items":{"type":"string"}},"available":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string"}},"shapes":{"type":"array","items":{"type":"string","enum":["16:9","9:16","1:1"]}},"defaultShape":{"type":"string","enum":["16:9","9:16","1:1"]},"lengthS":{"type":"object","properties":{"default":{"type":"integer"},"min":{"type":"integer"},"max":{"type":"integer"}},"required":["default","min","max"]}},"required":["id","name","description","needs","available","missing","shapes","defaultShape","lengthS"]}},"childrenFiles":{"type":"integer","minimum":0}},"required":["formats","childrenFiles"]},"EventVideoResponse":{"type":"object","properties":{"video":{"type":"object","properties":{"id":{"type":"string"},"eventId":{"type":"string"},"format":{"type":"string","enum":["highlight_reel"]},"shape":{"type":"string","enum":["16:9","9:16","1:1"]},"status":{"type":"string","enum":["planning","planned","failed"]},"error":{"type":["string","null"]},"lengthS":{"type":"integer"},"ask":{"type":["string","null"]},"childrenAllowed":{"type":"boolean"},"title":{"type":["string","null"]},"beats":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["line","moment"]},"fileId":{"type":"string"},"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"text":{"type":"string"},"personId":{"type":["string","null"]},"show":{"type":"string","enum":["speaker","moments","moment"]},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":0},"shots":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":0}},"required":["fileId","startMs","endMs","atMs","durMs"]}}},"required":["kind","fileId","startMs","endMs","text","personId","show","atMs","durMs","shots"]}},"edl":{"allOf":[{"$ref":"#/components/schemas/FootageEdl"},{"type":["object","null"]}]},"durationMs":{"type":["integer","null"],"minimum":0},"music":{"type":["object","null"],"properties":{"title":{"type":"string"},"artist":{"type":"string"},"licence":{"type":"string"},"licenseUrl":{"type":"string"},"url":{"type":"string"},"credit":{"type":"string"},"mood":{"type":["string","null"],"enum":["calm","warm","uplifting","elegant","chill"]}},"required":["title","artist","licence","licenseUrl","url","credit","mood"]},"createdAt":{"type":"string"},"plannedAt":{"type":["string","null"]},"render":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["rendering","rendered","failed"]},"progress":{"type":"number","minimum":0,"maximum":1},"activity":{"type":["string","null"]},"stopping":{"type":"boolean"},"error":{"type":["string","null"]},"url":{"type":["string","null"]},"downloadUrl":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"bytes":{"type":["integer","null"],"minimum":0},"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"renderedAt":{"type":["string","null"]},"review":{"type":["object","null"],"properties":{"measured":{"type":"boolean"},"checked":{"type":"array","items":{"type":"string"}},"findings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"type":"string","enum":["fix","note"]},"atMs":{"type":["integer","null"],"minimum":0},"endMs":{"type":["integer","null"],"minimum":0},"message":{"type":"string"}},"required":["code","severity","atMs","endMs","message"]}}},"required":["measured","checked","findings"]},"editsOnly":{"type":"boolean"},"quality":{"type":"object","properties":{"readyToPost":{"type":"integer","minimum":1,"maximum":10},"below":{"type":"boolean"},"top":{"type":"array","items":{"type":"string"},"maxItems":5}},"required":["readyToPost","below","top"]}},"required":["status","progress","activity","error","url","downloadUrl","expiresAt","bytes","durationMs","width","height","renderedAt"]}},"required":["id","eventId","format","shape","status","error","lengthS","ask","childrenAllowed","title","beats","edl","durationMs","music","createdAt","plannedAt","render"]}},"required":["video"]},"CreateEventVideoRequest":{"type":"object","properties":{"format":{"type":"string","enum":["highlight_reel"]},"shape":{"type":"string","enum":["16:9","9:16","1:1"]},"lengthS":{"type":"integer","minimum":20,"maximum":180},"ask":{"type":"string","minLength":3,"maxLength":500},"childrenAllowed":{"type":"boolean"}},"required":["format"]},"EventVideoList":{"type":"object","properties":{"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"eventId":{"type":"string"},"format":{"type":"string","enum":["highlight_reel"]},"shape":{"type":"string","enum":["16:9","9:16","1:1"]},"status":{"type":"string","enum":["planning","planned","failed"]},"error":{"type":["string","null"]},"lengthS":{"type":"integer"},"ask":{"type":["string","null"]},"childrenAllowed":{"type":"boolean"},"title":{"type":["string","null"]},"beats":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["line","moment"]},"fileId":{"type":"string"},"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"text":{"type":"string"},"personId":{"type":["string","null"]},"show":{"type":"string","enum":["speaker","moments","moment"]},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":0},"shots":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"atMs":{"type":"integer","minimum":0},"durMs":{"type":"integer","minimum":0}},"required":["fileId","startMs","endMs","atMs","durMs"]}}},"required":["kind","fileId","startMs","endMs","text","personId","show","atMs","durMs","shots"]}},"edl":{"allOf":[{"$ref":"#/components/schemas/FootageEdl"},{"type":["object","null"]}]},"durationMs":{"type":["integer","null"],"minimum":0},"music":{"type":["object","null"],"properties":{"title":{"type":"string"},"artist":{"type":"string"},"licence":{"type":"string"},"licenseUrl":{"type":"string"},"url":{"type":"string"},"credit":{"type":"string"},"mood":{"type":["string","null"],"enum":["calm","warm","uplifting","elegant","chill"]}},"required":["title","artist","licence","licenseUrl","url","credit","mood"]},"createdAt":{"type":"string"},"plannedAt":{"type":["string","null"]},"render":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["rendering","rendered","failed"]},"progress":{"type":"number","minimum":0,"maximum":1},"activity":{"type":["string","null"]},"stopping":{"type":"boolean"},"error":{"type":["string","null"]},"url":{"type":["string","null"]},"downloadUrl":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"bytes":{"type":["integer","null"],"minimum":0},"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"renderedAt":{"type":["string","null"]},"review":{"type":["object","null"],"properties":{"measured":{"type":"boolean"},"checked":{"type":"array","items":{"type":"string"}},"findings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"severity":{"type":"string","enum":["fix","note"]},"atMs":{"type":["integer","null"],"minimum":0},"endMs":{"type":["integer","null"],"minimum":0},"message":{"type":"string"}},"required":["code","severity","atMs","endMs","message"]}}},"required":["measured","checked","findings"]},"editsOnly":{"type":"boolean"},"quality":{"type":"object","properties":{"readyToPost":{"type":"integer","minimum":1,"maximum":10},"below":{"type":"boolean"},"top":{"type":"array","items":{"type":"string"},"maxItems":5}},"required":["readyToPost","below","top"]}},"required":["status","progress","activity","error","url","downloadUrl","expiresAt","bytes","durationMs","width","height","renderedAt"]}},"required":["id","eventId","format","shape","status","error","lengthS","ask","childrenAllowed","title","beats","edl","durationMs","music","createdAt","plannedAt","render"]}}},"required":["videos"]},"RenderEventVideoRequest":{"type":"object","properties":{"again":{"type":"boolean"}}},"ShowcaseItem":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"madeFrom":{"type":"string"},"kind":{"type":"string","description":"motion | faceless | talking-head. Tolerate another value."},"shape":{"type":"string","enum":["wide","tall","square"]},"durationMs":{"type":"integer"},"videoUrl":{"type":"string"},"previewUrl":{"type":["string","null"]},"posterUrl":{"type":"string"},"credits":{"type":"array","items":{"type":"string"}},"language":{"type":["string","null"],"default":null},"input":{"type":["object","null"],"properties":{"kind":{"type":"string","description":"recording | script | request | link | pr | document | shoot | clips | audio. Tolerate another value."},"text":{"type":["string","null"]},"url":{"type":["string","null"]},"colours":{"type":"array","items":{"type":"string"}},"stillUrls":{"type":"array","items":{"type":"string"}},"clipUrl":{"type":["string","null"]},"videoUrl":{"type":["string","null"],"default":null},"audioUrl":{"type":["string","null"],"default":null},"peaks":{"type":"array","items":{"type":"integer"},"default":[]},"count":{"type":["integer","null"]},"pages":{"type":["integer","null"],"default":null},"fileUrl":{"type":["string","null"],"default":null},"durationMs":{"type":["integer","null"]}},"default":null,"required":["kind","text","url","colours","stillUrls","clipUrl","count","durationMs"]},"group":{"type":["object","null"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"part":{"type":"integer"}},"default":null,"required":["id","title","part"]},"versions":{"type":["object","null"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"part":{"type":"integer"},"label":{"type":["string","null"]},"note":{"type":["string","null"]}},"default":null,"required":["id","title","part","label","note"]}},"required":["slug","title","madeFrom","kind","shape","durationMs","videoUrl","previewUrl","posterUrl","credits"]},"ShowcaseListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ShowcaseItem"}}},"required":["items"]},"ShowcaseEventRequest":{"type":"object","properties":{"type":{"type":"string","enum":["play","open","make","view"]}},"required":["type"],"additionalProperties":false},"Share":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"shape":{"type":"string","enum":["wide","tall","square"]},"durationMs":{"type":"integer"},"credits":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"reason":{"type":["string","null"]},"projectId":{"type":["string","null"]},"motionJobId":{"type":["string","null"]},"slug":{"type":["string","null"]},"posterUrl":{"type":["string","null"]},"createdAt":{"type":"string"},"reviewBy":{"type":["string","null"]}},"required":["id","title","kind","shape","durationMs","credits","status","reason","projectId","motionJobId","slug","posterUrl","createdAt","reviewBy"]},"ShareListResponse":{"type":"object","properties":{"enabled":{"type":"boolean"},"limits":{"type":"object","properties":{"pending":{"type":"integer"},"maxDurationMs":{"type":"integer"},"maxBytes":{"type":"integer"},"reviewDays":{"type":"integer"}},"required":["pending","maxDurationMs","maxBytes","reviewDays"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/Share"}}},"required":["enabled","limits","items"]},"ShareCreateRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["talking-head","faceless","motion"]},"projectId":{"type":["string","null"],"format":"uuid","default":null},"motionJobId":{"type":["string","null"],"format":"uuid","default":null},"shape":{"type":"string","enum":["wide","tall","square"]},"durationMs":{"type":"integer","exclusiveMinimum":0,"maximum":600000},"bytes":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":524288000,"default":null},"credits":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300},"maxItems":60,"default":[]},"everyoneAgreed":{"type":"boolean","enum":[true]},"children":{"type":"string","enum":["none","guardian"]}},"required":["title","kind","shape","durationMs","everyoneAgreed","children"],"additionalProperties":false},"ShareCreateResponse":{"type":"object","properties":{"share":{"$ref":"#/components/schemas/Share"},"upload":{"type":["object","null"],"properties":{"video":{"type":"object","properties":{"key":{"type":"string"},"contentType":{"type":"string"},"url":{"type":"string"}},"required":["key","contentType","url"]},"poster":{"type":"object","properties":{"key":{"type":"string"},"contentType":{"type":"string"},"url":{"type":"string"}},"required":["key","contentType","url"]},"expiresInS":{"type":"integer"}},"required":["video","poster","expiresInS"]}},"required":["share","upload"]},"ClientConfig":{"type":"object","properties":{"min_supported_version":{"type":"string","description":"Below this version: block, and show `message`. Compare as semver. `0.0.0` means no limit."},"recommended_version":{"type":"string","description":"Below this version: a nudge the user can dismiss. `0.0.0` means none."},"message":{"type":"string","description":"What to say when blocking or nudging. May be empty."}},"required":["min_supported_version","recommended_version","message"]},"AccountExport":{"type":"object","properties":{"exportedAt":{"type":"string","description":"When the file was made (ISO 8601)."},"user":{"type":["object","null"],"additionalProperties":{},"description":"The account row, without secrets. Null if the account has no row."},"omitted":{"type":"array","items":{"type":"object","properties":{"what":{"type":"string"},"why":{"type":"string"}},"required":["what","why"]},"description":"What is not in the file and why, e.g. the video itself, which Toast never had."}},"required":["exportedAt","user","omitted"],"additionalProperties":{},"description":"Every other key is one table: an array of its rows."},"AccountDeleteResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"deleted":{"type":"object","properties":{"userId":{"type":"string","description":"The deleted account’s id."},"usageRecordsDeleted":{"type":"integer"},"projectsDeleted":{"type":"integer"},"userDeleted":{"type":"boolean","description":"False: the account was already gone. Still a success."},"providerKeyDeleted":{"type":"boolean","description":"The account’s AI key at the provider was deleted. False = there was none, or it failed."},"cacheKeysPurged":{"type":"integer"},"assetObjectsDeleted":{"type":"integer","description":"Stored pictures and files erased."},"assetObjectsFailed":{"type":"integer","description":"Stored objects that could not be erased now; a background sweep collects them."},"assetPurgeErrored":{"type":"boolean","description":"Storage could not be listed, so both asset counts mean nothing. Do not retry: the account is already gone."}},"required":["userId","usageRecordsDeleted","projectsDeleted","userDeleted","providerKeyDeleted","cacheKeysPurged","assetObjectsDeleted","assetObjectsFailed","assetPurgeErrored"]},"identityDeleted":{"type":"boolean","description":"The sign-in identity was deleted too. False = it could not be, and is cleaned up separately."}},"required":["ok","deleted","identityDeleted"]},"Keyterms":{"type":"object","properties":{"keyterms":{"type":"array","items":{"type":"string"},"description":"Names and words the transcription should get right. POST replaces the whole list."}},"required":["keyterms"]},"OkResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"UsageTotalsResponse":{"type":"object","properties":{"totals":{"type":"array","items":{"type":"object","properties":{"service":{"type":"string","description":"The provider or service. Tolerate new ones."},"units":{"type":"number","description":"The service’s own units: seconds, tokens or requests."},"costUsd":{"type":"number","description":"What Toast paid, in US dollars. Not the user’s balance."}},"required":["service","units","costUsd"]}}},"required":["totals"]},"UsageHistoryResponse":{"type":"object","properties":{"history":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"The UTC day, `YYYY-MM-DD`."},"service":{"type":"string","description":"The provider or service, e.g. `elevenlabs`. Tolerate new ones."},"units":{"type":"number","description":"The service’s own units: seconds, tokens or requests."},"costUsd":{"type":"number","description":"What Toast paid, in US dollars. Not the user’s balance."}},"required":["date","service","units","costUsd"]},"description":"Oldest day first; one row per day and service that had any use."}},"required":["history"]},"EditSessionCreateRequest":{"type":"object","properties":{"projectId":{"type":"string","description":"The caller’s project. Someone else’s, or a missing one, is 404."},"actionType":{"type":"string","description":"What the user did. A free string: use the ones existing clients send (accept, reject, modify, manual_remove, manual_restore, instruction, undo, redo, broll_popup_resolved, …)."},"segmentId":{"type":"string"},"aiConfidence":{"type":"number","description":"How sure the model was about what the user acted on."},"removalReason":{"type":"string"},"instructionText":{"type":"string","description":"What the user typed. User content."},"metadata":{"type":"object","additionalProperties":{},"description":"Anything that fits no column above."}},"required":["projectId","actionType"]},"EditSessionCreateResponse":{"type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"userId":{"type":"string"},"actionType":{"type":"string"},"segmentId":{"type":["string","null"]},"aiConfidence":{"type":["number","null"]},"removalReason":{"type":["string","null"]},"instructionText":{"type":["string","null"]},"metadata":{},"createdAt":{"type":"string","description":"ISO 8601."}},"required":["id","projectId","userId","actionType","segmentId","aiConfidence","removalReason","instructionText","createdAt"]}},"required":["session"]},"FeedbackSubmitRequest":{"type":"object","properties":{"email":{"type":"string","description":"Where Toast can answer. Must be a valid address."},"message":{"type":"string","description":"What happened, 1 to the server’s maximum characters."},"attachment":{"type":"string","description":"Base64. An image or a text file only, at most 5 MB decoded. Never a video: it is refused."},"attachmentMime":{"type":"string","description":"`image/*` or `text/*`. Anything else is 415."},"attachmentName":{"type":"string"}},"required":["email","message"]},"FeedbackSubmitResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"id":{"type":"string","description":"The email service’s id for the message, when it gave one."}},"required":["ok"]},"PlainError":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"ReferralState":{"type":"object","properties":{"enabled":{"type":"boolean","description":"False: the programme is off. Show nothing, and every other field is empty."},"code":{"type":["string","null"],"description":"The caller’s code. Made on first read."},"path":{"type":["string","null"],"description":"The link’s path on the web app, e.g. `/r/abc123`. Join it to the site’s origin."},"rewardLabel":{"type":["string","null"],"description":"What each side gets, in the caller’s currency, ready to show."},"invited":{"type":"integer","description":"Friends who joined through the link and still have an account."},"rewarded":{"type":"integer","description":"Rewards the caller has had. Stays counted when a friend later deletes their account."},"cap":{"type":"integer","description":"The most rewards one person can have."}},"required":["enabled","code","path","rewardLabel","invited","rewarded","cap"]},"ReferralClaimRequest":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_-]{6,32}$","description":"The code from the link."}},"required":["code"]},"ReferralClaimResponse":{"type":"object","properties":{"claimed":{"type":"boolean","description":"True when this account is now tied to the link. A repeat of the same claim is true."},"reason":{"type":["string","null"],"enum":["off","unknown","self","too_late","already","full"],"description":"Why not. A client needs no message for any of them: forget the code and carry on."}},"required":["claimed","reason"]},"ReferralFinishedRequest":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid","description":"The caller’s project whose video has just finished exporting."}},"required":["projectId"]},"ReferralFinishedResponse":{"type":"object","properties":{"rewarded":{"type":"boolean","description":"True only on the call that paid. Every later call is false."}},"required":["rewarded"]},"VideoReport":{"type":"object","properties":{"id":{"type":"string"},"videoKind":{"type":"string","enum":["project","motion","property","event"]},"videoId":{"type":"string"},"category":{"type":"string","enum":["not_what_i_asked","looks_wrong","sound","words","did_not_finish","other"]},"note":{"type":["string","null"]},"momentsMs":{"type":"array","items":{"type":"integer"}},"status":{"type":"string","enum":["refunded","waiting","noted","declined"]},"amountMinor":{"type":["integer","null"]},"currency":{"type":["string","null"]},"createdAt":{"type":"string"},"decidedAt":{"type":["string","null"]}},"required":["id","videoKind","videoId","category","note","momentsMs","status","amountMinor","currency","createdAt","decidedAt"]},"VideoReportListResponse":{"type":"object","properties":{"enabled":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/VideoReport"}}},"required":["enabled","items"]},"VideoReportCreateRequest":{"type":"object","properties":{"videoKind":{"type":"string","enum":["project","motion","property","event"]},"videoId":{"type":"string","format":"uuid"},"category":{"type":"string","enum":["not_what_i_asked","looks_wrong","sound","words","did_not_finish","other"]},"note":{"type":["string","null"],"maxLength":1000,"default":null},"momentsMs":{"type":"array","items":{"type":"integer","minimum":0,"maximum":21600000},"maxItems":10,"default":[]}},"required":["videoKind","videoId","category"],"additionalProperties":false},"ShareCredit":{"type":"object","properties":{"id":{"type":"string"},"videoKind":{"type":"string","enum":["project","motion","property","event"]},"videoId":{"type":"string"},"platform":{"type":"string","enum":["instagram","youtube","x","linkedin","facebook"]},"postUrl":{"type":"string"},"handle":{"type":["string","null"]},"status":{"type":"string","enum":["uploading","waiting","approved","rejected"]},"amountMinor":{"type":["integer","null"]},"currency":{"type":["string","null"]},"waiverUsed":{"type":"boolean"},"showcase":{"type":"boolean"},"reviewNote":{"type":["string","null"]},"createdAt":{"type":"string"},"decidedAt":{"type":["string","null"]}},"required":["id","videoKind","videoId","platform","postUrl","handle","status","amountMinor","currency","waiverUsed","showcase","reviewNote","createdAt","decidedAt"]},"ShareCreditState":{"type":"object","properties":{"enabled":{"type":"boolean"},"caption":{"type":"string"},"maxRewards":{"type":"integer"},"rewarded":{"type":"integer"},"cleanNextVideo":{"type":"boolean"},"limits":{"type":"object","properties":{"pending":{"type":"integer"},"screenshotMaxBytes":{"type":"integer"}},"required":["pending","screenshotMaxBytes"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/ShareCredit"}},"closed":{"type":["string","null"],"enum":["ended","budget"]},"video":{"type":["object","null"],"properties":{"videoKind":{"type":"string","enum":["project","motion","property","event"]},"videoId":{"type":"string"},"costMinor":{"type":"integer"},"backMinor":{"type":"integer"},"currency":{"type":["string","null"]},"marked":{"type":"boolean"}},"required":["videoKind","videoId","costMinor","backMinor","currency","marked"]}},"required":["enabled","caption","maxRewards","rewarded","cleanNextVideo","limits","items","closed","video"]},"ShareCreditCreateRequest":{"type":"object","properties":{"videoKind":{"type":"string","enum":["project","motion","property","event"]},"videoId":{"type":"string","format":"uuid"},"platform":{"type":"string","enum":["instagram","youtube","x","linkedin","facebook"]},"postUrl":{"type":"string","maxLength":500},"handle":{"type":["string","null"],"maxLength":100,"default":null},"showcase":{"type":"boolean","default":false},"screenshot":{"type":"object","properties":{"contentType":{"type":"string","enum":["image/png","image/jpeg","image/webp"]},"bytes":{"type":"integer","minimum":1,"maximum":5242880}},"required":["contentType","bytes"],"additionalProperties":false}},"required":["videoKind","videoId","platform","postUrl","screenshot"],"additionalProperties":false},"ShareCreditCreateResponse":{"type":"object","properties":{"credit":{"$ref":"#/components/schemas/ShareCredit"},"upload":{"type":"object","properties":{"url":{"type":"string"},"contentType":{"type":"string","enum":["image/png","image/jpeg","image/webp"]},"expiresInS":{"type":"integer"}},"required":["url","contentType","expiresInS"]}},"required":["credit","upload"]},"ScreensResponse":{"type":"object","properties":{"set":{"type":"object","properties":{"id":{"type":"string"},"attest":{"type":"string","enum":["no_private_data","permission"]},"recordings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":0},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"createdAt":{"type":"string"}},"required":["id","name","position","size","mime","sha256","state","media","createdAt"]}},"reading":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["queued","running","done","failed"]},"activity":{"type":["string","null"]},"progress":{"type":"integer","minimum":0,"maximum":100},"error":{"type":["string","null"]},"summary":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","exclusiveMinimum":0},"title":{"type":"string"}},"required":["step","title"]}},"screens":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"recordingId":{"type":"string"},"startMs":{"type":"integer","minimum":0},"endMs":{"type":"integer","minimum":0},"atMs":{"type":"integer","minimum":0},"what":{"type":"string"},"words":{"type":"string"},"action":{"type":"string"},"step":{"type":"integer","exclusiveMinimum":0},"sensitive":{"type":"boolean"},"sensitiveWhy":{"type":"string"},"boxes":{"type":"array","items":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}},"required":["x","y","w","h"]}},"choice":{"type":"string","enum":["show","blur","leave"]},"name":{"type":["string","null"]}},"required":["id","recordingId","startMs","endMs","atMs","what","words","action","step","sensitive","sensitiveWhy","boxes","choice","name"]}},"skipped":{"type":"array","items":{"type":"string"}}},"required":["status","activity","progress","error","summary","steps","screens","skipped"]},"used":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","attest","recordings","reading","used","createdAt","updatedAt"]},"quote":{"type":"object","properties":{"priceMinor":{"type":["integer","null"],"minimum":0},"currency":{"type":["string","null"]}},"required":["priceMinor","currency"]}},"required":["set","quote"]},"ScreensAccess":{"type":"object","properties":{"enabled":{"type":"boolean"},"maxFiles":{"type":"integer","exclusiveMinimum":0},"maxFileSeconds":{"type":"integer","exclusiveMinimum":0},"maxTotalSeconds":{"type":"integer","exclusiveMinimum":0}},"required":["enabled","maxFiles","maxFileSeconds","maxTotalSeconds"]},"CreateScreensRequest":{"type":"object","properties":{"attest":{"type":"string","enum":["no_private_data","permission"]}},"required":["attest"]},"UpdateScreensRequest":{"type":"object","properties":{"order":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":10},"screens":{"type":"array","items":{"type":"object","properties":{"screenId":{"type":"string","minLength":1,"maxLength":120},"choice":{"type":"string","enum":["show","blur","leave"]},"name":{"type":"string","maxLength":80}},"required":["screenId","choice"]},"minItems":1,"maxItems":500}}},"RegisterScreenRecordingsRequest":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string","maxLength":100},"durationMs":{"type":"integer","exclusiveMinimum":0}},"required":["sha256","name","size","mime"]},"minItems":1,"maxItems":10}},"required":["files"]},"RegisterScreenRecordingsResponse":{"type":"object","properties":{"recordings":{"type":"array","items":{"type":"object","properties":{"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string"},"state":{"type":"string","enum":["new","resume","have","refused"]},"recording":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":0},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"createdAt":{"type":"string"}},"required":["id","name","position","size","mime","sha256","state","media","createdAt"]},"upload":{"type":"object","properties":{"partSize":{"type":"integer","exclusiveMinimum":0},"parts":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","exclusiveMinimum":0},"url":{"type":"string"}},"required":["n","url"]}},"expiresAt":{"type":"string"}},"required":["partSize","parts","expiresAt"]},"reason":{"type":"string"}},"required":["sha256","name","state"]}}},"required":["recordings"]},"ScreenRecordingUploadResponse":{"type":"object","properties":{"recording":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":0},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"createdAt":{"type":"string"}},"required":["id","name","position","size","mime","sha256","state","media","createdAt"]},"upload":{"type":"object","properties":{"partSize":{"type":"integer","exclusiveMinimum":0},"parts":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","exclusiveMinimum":0},"url":{"type":"string"}},"required":["n","url"]}},"expiresAt":{"type":"string"}},"required":["partSize","parts","expiresAt"]}},"required":["recording","upload"]},"CompleteScreenRecordingRequest":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"n":{"type":"integer","exclusiveMinimum":0},"etag":{"type":"string","minLength":1,"maxLength":200}},"required":["n","etag"]},"minItems":1,"maxItems":10000}},"required":["parts"]},"ScreenRecordingResponse":{"type":"object","properties":{"recording":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":0},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"createdAt":{"type":"string"}},"required":["id","name","position","size","mime","sha256","state","media","createdAt"]}},"required":["recording"]},"ScreenRecordingMediaResponse":{"type":"object","properties":{"recording":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer","minimum":0},"size":{"type":"integer","exclusiveMinimum":0},"mime":{"type":"string"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"type":"string","enum":["uploading","uploaded","verified","rejected"]},"media":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["pending","processing","ready","failed"]},"error":{"type":"string"},"probe":{"type":"object","properties":{"durationMs":{"type":["integer","null"],"minimum":0},"width":{"type":["integer","null"],"exclusiveMinimum":0},"height":{"type":["integer","null"],"exclusiveMinimum":0},"fps":{"type":["number","null"],"exclusiveMinimum":0},"codec":{"type":["string","null"]},"hasAudio":{"type":"boolean"},"hdr":{"type":"boolean"}},"required":["durationMs","width","height","fps","codec","hasAudio","hdr"]},"stills":{"type":"integer","minimum":0},"proxy":{"type":"boolean"},"audio":{"type":"boolean"},"display":{"type":"boolean"}},"required":["state","stills","proxy","audio","display"]},"createdAt":{"type":"string"}},"required":["id","name","position","size","mime","sha256","state","media","createdAt"]},"media":{"type":"object","properties":{"state":{"type":["string","null"],"enum":["pending","processing","ready","failed"]},"proxy":{"type":["object","null"],"properties":{"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"fps":{"type":"number"}},"required":["url","width","height","fps"]},"audio":{"type":["object","null"],"properties":{"url":{"type":"string"}},"required":["url"]},"display":{"type":["object","null"],"properties":{"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"}},"required":["url","width","height"]},"stills":{"type":"array","items":{"type":"object","properties":{"atMs":{"type":"integer","minimum":0},"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"}},"required":["atMs","url","width","height"]}},"expiresAt":{"type":["string","null"]},"transcript":{"type":["object","null"],"properties":{"language":{"type":["string","null"]},"words":{"type":"array","items":{"type":"object","properties":{"w":{"type":"string"},"s":{"type":"integer"},"e":{"type":"integer"},"speaker":{"type":"string"}},"required":["w","s","e","speaker"]}}},"required":["language","words"]}},"required":["state","proxy","audio","display","stills","expiresAt","transcript"]}},"required":["recording","media"]},"AvatarAccess":{"type":"object","properties":{"enabled":{"type":"boolean"},"langs":{"type":"array","items":{"type":"string","enum":["en","hi","te"]}},"attestation":{"type":"string"}},"required":["enabled","langs","attestation"]},"AvatarSummary":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"pitch":{"type":"string"},"kind":{"type":"string","enum":["photoreal","stylised"]},"gender":{"type":"string","enum":["woman","man","other"]},"age":{"type":"string","enum":["20s","30s","40s","50s","60s","70s+"]},"energy":{"type":"integer","minimum":1,"maximum":5},"langs":{"type":"array","items":{"type":"string","enum":["en","hi","te"]}},"goodFor":{"type":"array","items":{"type":"string","enum":["news","explainer","product","update","invitation","comedy","kids","story","tips","satire"]}},"note":{"type":["string","null"]},"satireOnly":{"type":"boolean"},"portraitUrl":{"type":["string","null"]},"sampleUrl":{"type":["string","null"]}},"required":["id","name","pitch","kind","gender","age","energy","langs","goodFor","note","satireOnly","portraitUrl","sampleUrl"]},"AvatarList":{"type":"object","properties":{"avatars":{"type":"array","items":{"$ref":"#/components/schemas/AvatarSummary"}}},"required":["avatars"]},"AvatarVideoResponse":{"type":"object","properties":{"id":{"type":"string"},"avatarId":{"type":"string"},"lang":{"type":"string","enum":["en","hi","te"]},"use":{"type":"string","enum":["news","explainer","product","update","invitation","comedy","kids","story","tips","satire"]},"aspect":{"type":"string","enum":["9:16"]},"status":{"type":"string","enum":["draft","scripted","making","ready","failed","cancelled"]},"activity":{"type":"string"},"progress":{"type":"integer","minimum":0,"maximum":100},"text":{"type":"string"},"script":{"type":["object","null"],"properties":{"text":{"type":"string"},"source":{"type":"string","enum":["ai","user"]},"seconds":{"type":"number"}},"required":["text","source","seconds"]},"video":{"type":["object","null"],"properties":{"url":{"type":["string","null"]},"durMs":{"type":"integer"}},"required":["url","durMs"]},"label":{"type":"string"},"disclosure":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","avatarId","lang","use","aspect","status","activity","progress","text","script","video","label","disclosure","createdAt"]},"CreateAvatarVideoRequest":{"type":"object","properties":{"avatarId":{"type":"string","minLength":1,"maxLength":64},"lang":{"type":"string","enum":["en","hi","te"]},"use":{"type":"string","enum":["news","explainer","product","update","invitation","comedy","kids","story","tips","satire"]},"text":{"type":"string","minLength":1,"maxLength":6000},"aspect":{"type":"string","enum":["9:16"],"default":"9:16"},"attested":{"type":"boolean","enum":[true]}},"required":["avatarId","lang","use","text","attested"]},"AvatarVideoList":{"type":"object","properties":{"videos":{"type":"array","items":{"$ref":"#/components/schemas/AvatarVideoResponse"}}},"required":["videos"]},"PutAvatarScriptRequest":{"type":"object","properties":{"script":{"type":"string","minLength":1,"maxLength":3000}},"required":["script"]},"AvatarEstimateResponse":{"type":"object","properties":{"seconds":{"type":"number"},"costUsd":{"type":"number"},"wallet":{"type":["object","null"],"properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO 4217 code, e.g. \"INR\", \"JPY\". Any code: do not switch on a fixed list."},"priceMinor":{"type":"integer","description":"What it will probably cost. 0 for something free (a pitch)."},"requiredMinor":{"type":"integer","description":"What the wallet must hold to start: also what is held while it runs."},"balanceMinor":{"type":"integer","description":"Spendable now (running jobs’ holds already out)."},"allowed":{"type":"boolean","description":"False: it would be refused now. Nothing was started or spent."},"shortfallMinor":{"type":"integer","description":"How much more the wallet needs. 0 when allowed."},"topUpMinor":{"type":"integer","description":"What an \"Add money\" button should offer: the shortfall, or the minimum top-up if that is more. 0 when allowed."},"settlesAtActualCost":{"type":"boolean","description":"True when the final charge is the job’s measured cost (motion), so it may differ from `priceMinor`; false when the price is fixed by the input (minutes of takes)."}},"required":["currency","priceMinor","requiredMinor","balanceMinor","allowed","shortfallMinor","topUpMinor","settlesAtActualCost"]}},"required":["seconds","costUsd","wallet"]}},"parameters":{}},"paths":{"/ai/segment":{"post":{"operationId":"aiSegment","summary":"Call 1 — core editing decisions (segments, chapters, highlights, intra-sentence cuts). Stateful, must run first; hard-fails on upstream error.","tags":["ai"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiSegmentRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiSegmentResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"User quota or platform budget exhausted (`user_quota_exhausted` / `platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"Every upstream AI provider failed (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/ai/broll":{"post":{"operationId":"aiBroll","summary":"Call 2 — B-roll keyword suggestions (keywords, not assets). Soft-degrades to 200 on upstream failure.","tags":["ai"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiBrollRequest"}}}},"responses":{"200":{"description":"Success, or a soft-degraded result (`status: \"degraded\"`) when every upstream provider failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiBrollResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"User quota or platform budget exhausted (`user_quota_exhausted` / `platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/ai/effects":{"post":{"operationId":"aiEffects","summary":"Call 3 — raw visual-effect suggestions (the client assembles with its face track + catalog). Soft-degrades.","tags":["ai"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiEffectsRequest"}}}},"responses":{"200":{"description":"Success, or a soft-degraded result (`status: \"degraded\"`) when every upstream provider failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiEffectsResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"User quota or platform budget exhausted (`user_quota_exhausted` / `platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/ai/beats":{"post":{"operationId":"aiBeats","summary":"The beat plan (#1053) — a visual change every 2–3 s: HyperFrames cards, zooms and on-screen text, each timed from the word timings it lands on. Soft-degrades.","tags":["ai"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiBeatsRequest"}}}},"responses":{"200":{"description":"Success, or a soft-degraded result (`status: \"degraded\"`) when every upstream provider failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiBeatsResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"User quota or platform budget exhausted (`user_quota_exhausted` / `platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/ai/roman-captions":{"post":{"operationId":"aiRomanCaptions","summary":"Caption words in English letters (Roman Hindi, session 74): distinct transcript words in, the same words written the way creators type them out, index for index. A word it cannot write comes back unchanged. Soft-degrades.","tags":["ai"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiRomanCaptionsRequest"}}}},"responses":{"200":{"description":"Success, or a soft-degraded result (`status: \"degraded\"`) when every upstream provider failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiRomanCaptionsResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"User quota or platform budget exhausted (`user_quota_exhausted` / `platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/ai/translate":{"post":{"operationId":"aiTranslate","summary":"Captions and card titles in another language (session 75): caption lines (speaking order) and cards (their text slots) in, the same out translated, index for index. A line it cannot translate comes back unchanged; card slots are guarded (a circled word stays in its sentence, a chart keeps its numbers). Lines carry no times: time them with @toast/shared spreadTranslatedWords. Soft-degrades.","tags":["ai"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiTranslateRequest"}}}},"responses":{"200":{"description":"Success, or a soft-degraded result (`status: \"degraded\"`) when every upstream provider failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiTranslateResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"User quota or platform budget exhausted (`user_quota_exhausted` / `platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/ai/viral-clips":{"post":{"operationId":"aiViralClips","summary":"Call 4 — viral clip candidates for short-form export. Soft-degrades.","tags":["ai"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiViralClipsRequest"}}}},"responses":{"200":{"description":"Success, or a soft-degraded result (`status: \"degraded\"`) when every upstream provider failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiViralClipsResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"User quota or platform budget exhausted (`user_quota_exhausted` / `platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/ai/music-mood":{"post":{"operationId":"aiMusicMood","summary":"Call 5 — music mood / genre / energy suggestion. Soft-degrades.","tags":["ai"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiMusicMoodRequest"}}}},"responses":{"200":{"description":"Success, or a soft-degraded result (`status: \"degraded\"`) when every upstream provider failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiMusicMoodResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"User quota or platform budget exhausted (`user_quota_exhausted` / `platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/ai/transitions":{"post":{"operationId":"aiTransitions","summary":"Call 6 — raw GPU transition suggestions (the client validates boundaries + resolves burns). Soft-degrades.","tags":["ai"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiTransitionsRequest"}}}},"responses":{"200":{"description":"Success, or a soft-degraded result (`status: \"degraded\"`) when every upstream provider failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiTransitionsResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"User quota or platform budget exhausted (`user_quota_exhausted` / `platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/ai/converse":{"post":{"operationId":"aiConverse","summary":"Conversational editor (FR-11) — natural language → edit operations. Hard-fails on upstream error.","tags":["ai"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiConverseRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/aiConverseResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"User quota or platform budget exhausted (`user_quota_exhausted` / `platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"Every upstream AI provider failed (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/audio/denoise":{"post":{"operationId":"audioDenoise","summary":"Denoise a WAV clip via CleanVoice noise removal. The body is raw `audio/wav`; a 200 returns the clean `audio/wav` track. On any provider failure the client falls back to the raw track.","tags":["audio"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","enum":["cleanvoice"],"description":"Denoise provider. CleanVoice-only; default: cleanvoice."},"required":false,"name":"provider","in":"query"},{"schema":{"type":"number","minimum":0,"description":"Audio duration (seconds) — meters usage and scales the CleanVoice poll timeout."},"required":false,"name":"duration_sec","in":"query"},{"schema":{"type":"string","description":"Project to attribute usage to."},"required":false,"name":"projectId","in":"query"}],"requestBody":{"required":true,"content":{"audio/wav":{"schema":{"type":"string","description":"Raw WAV audio bytes (PCM s16le, mono, 16 kHz).","format":"binary"}}}},"responses":{"200":{"description":"The denoised WAV track.","content":{"audio/wav":{"schema":{"type":"string","description":"Raw WAV audio bytes (PCM s16le, mono, 16 kHz).","format":"binary"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Per-user plan quota exhausted (`user_quota_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Provider not configured (`internal`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The audio provider failed (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Platform budget exhausted (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/audio/transcribe":{"post":{"operationId":"audioTranscribe","summary":"Transcribe a WAV clip (ElevenLabs Scribe v2). The body is raw `audio/wav`. ≤ 10 min transcribes synchronously (200 TranscribeResult); longer audio mints a durable job (202 AsyncJobAccepted) tracked over SSE/poll.","tags":["audio"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"BCP-47 language hint; omitted → auto-detect."},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","description":"Comma-separated vocabulary bias terms."},"required":false,"name":"keyterms","in":"query"},{"schema":{"type":"number","minimum":0,"description":"Audio duration (ms) — meters usage and picks the sync (≤ 600000) vs async lane."},"required":false,"name":"duration_ms","in":"query"},{"schema":{"type":"string","description":"Project to attribute usage to; REQUIRED for the async (long-form) lane."},"required":false,"name":"projectId","in":"query"}],"requestBody":{"required":true,"content":{"audio/wav":{"schema":{"type":"string","description":"Raw WAV audio bytes (PCM s16le, mono, 16 kHz).","format":"binary"}}}},"responses":{"200":{"description":"The synchronous transcript (words + audio events + language).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscribeResult"}}}},"202":{"description":"Long-form audio accepted for async transcription — track via `streamUrl` (SSE) or `pollUrl`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncJobAccepted"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Per-user plan quota exhausted (`user_quota_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"The projectId is not owned by the caller (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Provider not configured (`internal`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The audio provider failed (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Platform budget exhausted (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/audio/dictate":{"post":{"operationId":"audioDictate","summary":"An instruction said instead of typed: a WAV of at most 120 s (raw `audio/wav`) is heard by ElevenLabs Scribe v2 once and the words come back as one line for the box it was said into, for the user to correct. NOTHING IS STORED (no transcript cache, unlike /audio/transcribe). Scribe names the language itself; `lang` is a hint. Metered as Scribe seconds, no minutes charged; 30 a minute.","tags":["audio"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"ISO 639 language hint (`hi`, `te`); omitted or malformed -> auto-detect."},"required":false,"name":"lang","in":"query"}],"requestBody":{"required":true,"content":{"audio/wav":{"schema":{"type":"string","description":"Raw WAV audio bytes (PCM s16le, mono, 16 kHz).","format":"binary"}}}},"responses":{"200":{"description":"The words heard (empty when nobody spoke), the language and the length heard.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DictateResult"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Per-user plan quota exhausted (`user_quota_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Provider not configured (`internal`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The audio provider failed (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Platform budget exhausted (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/audio/speak":{"post":{"operationId":"audioSpeak","summary":"Speak a written script (ElevenLabs flash v2.5) and return the narration WITH exact sentence timings. The other direction from /audio/transcribe: script in, audio + transcript out. Unlike the other two audio routes the body is JSON, not raw audio. OWN VOICE (session 82): send `ownVoice` { profileId, sampleBase64 } instead of `voiceId` to speak in the caller’s consented voice with eleven_v3 (re-timed by Scribe); it costs `own_voice_minutes` extra (0.5 per narrated minute), is refused with 402 before anything is spent when the balance cannot cover narration + surcharge, 404 for an unknown or deleted profile, 403 when the recording is not the consented one. `voiceId` accepts STOCK voices only (400 otherwise).","tags":["audio"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeakRequest"}}}},"responses":{"200":{"description":"The spoken narration (base64 MP3) and the transcript derived from the provider alignment. USE `transcript` FOR TIMINGS — never estimate them from the script you submitted; a 90-second script is not 90 seconds of audio.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeakResult"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Per-user plan quota exhausted (`user_quota_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"`ownVoice.sampleBase64` is not the recording the profile consented to, or own voice is not enabled for this account (`GET /voices` `enabled`) (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"`ownVoice.profileId` is unknown, another user’s, or deleted (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Provider not configured (`internal`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The audio provider failed (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Platform budget exhausted (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects":{"get":{"operationId":"listProjects","summary":"List the caller’s projects, newest `updatedAt` first. Metadata only — no media.","tags":["projects"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The caller’s projects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProjectsResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"operationId":"createProject","summary":"Create a project. `durationMs` is optional here — PATCH it after ingest, when it is measured rather than predicted.","tags":["projects"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}}},"responses":{"201":{"description":"The created project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Per-user project cap reached. NOTE this route predates `sendError()` and answers with a FLAT `{ error, reason }` body, NOT the ErrorEnvelope — published as-is so a generated client does not fail to parse a real response. Surface it as “delete something”, not as a generic failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectLimitError"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/library":{"get":{"operationId":"getLibrary","summary":"Everything the caller made, in one list, newest change first: edited projects (`type: project`, the same Project as GET /projects) and motion videos (`type: motion`, as GET /motion/jobs: no links, empty `activity`). Use it for a \"My projects\" screen. Skip an unknown `type`. Motion items appear only while the motion engine is on; they have no delete yet.","tags":["projects"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The caller’s projects and motion videos.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}":{"get":{"operationId":"getProject","summary":"Fetch one project. A project belonging to another user reads as 404, never 403.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProjectResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"patchProject","summary":"Partial update. UNKNOWN KEYS ARE STRIPPED SILENTLY — a field absent from the request schema is accepted with 200 and then discarded, which is how #935 hid for months. Diff against `PatchProjectRequest` before debugging your client.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchProjectRequest"}}}},"responses":{"200":{"description":"Acknowledgement. The updated row is NOT returned — re-GET if you need it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchProjectResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteProject","summary":"Delete a project. IDEMPOTENT — always 204, including for a missing or foreign project. Never 404.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted, or already absent."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/versions":{"get":{"operationId":"listManifestVersions","summary":"Manifest version summaries, newest first. A project keeps its newest 50 versions (D50), so version numbers are monotonic but the list is a SLIDING WINDOW — do not assume version 1 is still fetchable. Each carries `label` (what changed, in the client’s words), `source` (analysis | chat | precision | translate | history) and `restoredFrom` (set on a brought-back version); all three are null on versions saved before 2026-10-18.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Version summaries, without the manifest `data`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListManifestVersionsResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"operationId":"createManifestVersion","summary":"Snapshot the current manifest as a new version, with an optional `label` (what changed, ≤120 characters) and `source` (analysis | chat | precision | translate; `history` is Bring back’s alone). DO NOT send a version number — the server assigns it with an atomic increment (#644), so two concurrent saves each get a distinct one. Send an Idempotency-Key: a retry with the same key answers 200 with the version the first try made, never a second one. Keeps the newest 50.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Any unique token per intended version (a uuid). Reuse it only to retry."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateManifestVersionRequest"}}}},"responses":{"200":{"description":"This Idempotency-Key was already used: the version it made.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateManifestVersionResponse"}}}},"201":{"description":"The created version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateManifestVersionResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/transition-feedback":{"post":{"operationId":"reportTransitionFeedback","summary":"What the user did with each transition in the edit they exported — KEPT the AI’s choice, SWAPPED it for another type, REMOVED it (or switched it off), or ADDED their own — so `/ai/transitions` learns THIS user’s taste: for a type they keep swapping or removing (at least 3 outcomes, approval at or below 0.4), it uses the model’s second choice for that cut instead. Send it once per export, every transition the user could see (not fades, not one on a cut the export does not draw), comparing the AI’s proposal with the exported edit by transition id. IDEMPOTENT per (project, transitionId): a repeat replaces the row, so re-exporting counts once. Transition TYPE IDS only, stored on Toast’s server, deleted with the project or account; nothing about it is sent to a model.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransitionFeedbackRequest"}}}},"responses":{"200":{"description":"How many rows were written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransitionFeedbackResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/judge":{"post":{"operationId":"judgeProjectPart","summary":"JUDGE ONE PART of a finished story or talking-head video (the vertical is the project’s: faceless = story), as a viewer sees it: send small pictures of the export (JPEG, at most 540 px wide, one at each of `judgeFrameTimes(durationMs)` in `@toast/shared`, at most 90 a part as `judgeChunks` splits them), the words drawn on it and said in that stretch with their times, and the codes of the device’s own checks. Toast’s judge (an AI model through OpenRouter, data collection denied, on Toast’s own key) answers each item pass or not, a no with its moment and why. NOTES ONLY. Send the parts in order: part 0 replaces the project’s earlier judgement. Pictures are never stored; the verdicts are. Never the video file or its sound. 404 unless the vertical’s switch and allow-list name the caller (STORY_JUDGE + STORY_JUDGE_USERS, TH_JUDGE + TH_JUDGE_USERS).","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JudgeChunkBody"}}}},"responses":{"200":{"description":"This part’s answer, and every part so far as one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectJudgePartResponse"}}}},"400":{"description":"Request validation failed, a frame wider than 540 px or not the size stated, a frame outside its part, more parts than the length makes, a video over 15 minutes, or a vertical that is not the project’s (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project for this user, or the judge is off for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"No answer came back from the model; nothing was stored and a retry is safe (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"getProjectJudge","summary":"The project’s last judged export, its parts as one answer (an item fails when any part failed it, at its earliest moment), or `{ judge: null }` when none was judged, with its fix rounds (`rounds`, oldest first, #2317). `complete` once every part is in. 404 unless the judge is on for this user.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The last judgement, or null.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectJudgeResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project for this user, or the judge is off for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/judge/pair":{"post":{"operationId":"judgeProjectFixRound","summary":"A FIX ROUND’S BEFORE AND AFTER (#2317): after the user pressed “Fix these N things” (`storyFixes` in `@toast/shared`) and the client applied them and exported again, send the stretch the round changed (`changedStretch`) from both versions — `a` before, `b` after — as small pictures (JPEG, at most 540 px wide, at most 45 each) with the words shown and said. Toast’s judge compares them twice, each version shown first once, and `keepNew` is true only when the new one is better (a tie keeps the old). At most 2 rounds after a judgement, numbered in order. Pictures are never stored; the outcome is. Story only for now. 404 unless STORY_JUDGE + STORY_JUDGE_USERS.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JudgePairBody"}}}},"responses":{"200":{"description":"Whether to keep the new version, and the rounds so far.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JudgePairResponse"}}}},"400":{"description":"Request validation failed, a frame wider than 540 px, not the size stated or outside the stretch, no judgement yet, a round out of order, or no round left (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project for this user, or the judge is off for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"No answer came back from the model; nothing was stored and a retry is safe (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/judge/fixes":{"post":{"operationId":"recordTalkingHeadFixes","summary":"TALKING-HEAD “FIX THIS” (free): the device changed its own edit for some of the judge’s suggestions (`thFixes` works them out from each verdict’s `fix` code, `applyThFixes` applies them as one undo step; both in `@toast/shared`) and records the round here (`status: applied`, the next round number), or puts the last round back (`status: undone`). `judgedAt` must be the current, complete judgement’s. At most 2 rounds a judgement; the same suggestion fixed again replaces its row. Nothing is sent to any model; the user exports again and that export is judged as new. Stored: the suggestion’s item, moment and fix code, what Toast did, the round and its status. 404 unless TH_JUDGE + TH_JUDGE_USERS and TH_FIX_USERS name the caller.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThFixBody"}}}},"responses":{"200":{"description":"Every fix on this judgement so far, and how many rounds are left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThFixResponse"}}}},"400":{"description":"Request validation failed, not the current judgement, the judgement not complete, a round out of order, no round left, or an undo of a round that is not the last (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such talking-head project for this user, or Fix is off for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/judge/fixes/visual":{"post":{"operationId":"makeTalkingHeadFixPicture","summary":"TALKING-HEAD “FIX THIS”, A NEW PICTURE, PAID BY TOAST: for a moment the judge flagged `needs_new_visual`, a new AI picture made from the director’s own words for that moment (never the sentence as said or a frame). The user is never charged; what it cost is recorded as absorbed. Call it before changing the edit, with the round about to be recorded, then lay the picture in and POST /judge/fixes with `action: new_picture`. Toast’s spend is capped (US$1 a judged video, US$2 a project, US$3 a user in 24 h, a daily total across users): a cap answers 200 with `capped` and the line to show. 404 unless TH_JUDGE + TH_JUDGE_USERS, TH_FIX_USERS and DIRECTOR_ENABLED + DIRECTOR_USERS name the caller.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThFixVisualBody"}}}},"responses":{"200":{"description":"The new picture and its record, or the cap reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThFixVisualResponse"}}}},"400":{"description":"Request validation failed, not the current complete judgement, no flagged moment there, a round out of order, or no director picture planned there (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such talking-head project for this user, or this fix is off for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The picture could not be made; nothing was spent (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/director":{"post":{"operationId":"makeDirectorPlan","summary":"Make the DIRECTOR’s plan for a talking-head video: for each sentence, what the viewer sees while it is said (`speaker`, `speaker_words`, `graphic`, `kinetic_text`, `photo_logo`, `stock`, `ai_image`, `ai_clip`) with a plain reason, one look for every graphic, and questions for the speaker (a logo, a spelling, a meaning). Send the kept edit as sentences (text, source-timeline ms, optional word times). The plan answers EVERY sentence in order; one the model skipped stays on the speaker. It REPLACES any stored plan, the user’s changes included. Sends the words, times, shape, language and the project’s speaker name/role to an AI model (OpenRouter, data collection denied); never a frame or audio. 404 unless DIRECTOR_ENABLED + DIRECTOR_USERS.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorPlanRequest"}}}},"responses":{"200":{"description":"The plan, made and stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorPlanResponse"}}}},"400":{"description":"Request validation failed, or the project is not a talking-head video (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project for this user, or the director is off for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"No plan came back from the model; nothing was stored and a retry is safe (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"getDirectorPlan","summary":"The stored director’s plan for this project, or `{ plan: null }` when none was made yet. 404 unless DIRECTOR_ENABLED + DIRECTOR_USERS.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The plan, or null.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorPlanMaybeResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project for this user, or the director is off for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"changeDirectorPlan","summary":"The user’s changes to the director’s plan before Make: change a pick (sentence `n`, pick index, medium / what / on_screen; marked `changed_by_user`), answer the director’s questions by id, or change the look field by field. All or nothing: a change that names a sentence, pick or question the plan does not have applies nothing (400). 404 when there is no plan yet.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorPlanPatch"}}}},"responses":{"200":{"description":"The changed plan, stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorPlanResponse"}}}},"400":{"description":"Request validation failed, or a change names something the plan does not have (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project, no plan yet, or the director is off for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/director/estimate":{"post":{"operationId":"estimateDirectorPlan","summary":"ONE PRICE BEFORE MAKE for the stored director’s plan (#2369): what making it costs Toast per pick, what the user pays (cost × 1.30), the CAP for this video (`DIRECTOR_CAP_USD_PER_MINUTE` of cost per minute of video, US$2 by default, about ₹260 a minute charged), and — when over it — `stepDowns`, the dearest picks stepped down (AI clip → AI picture → `speaker_words`, graphic → `speaker_words`: the speaker with a few words beside them, drawn on the device, never big words, which the motion engine draws) until it fits, for the client to show and PATCH. `wallet` is the quote in the user’s currency while the wallet is on, else null. Writes nothing. 404 unless DIRECTOR_ENABLED + DIRECTOR_USERS.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The price, the cap and the steps under it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorEstimateResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project, no plan yet, or the director is off for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/director/make":{"post":{"operationId":"makeDirectorPlanVideo","summary":"MAKE the director’s plan (#2371): hold its price on the wallet (the estimate + the wallet’s buffer, settled at what was really spent once nothing is left to make; nothing is held while the wallet is off), then start every maker — drawn picks (graphic, big words) as ONE full-frame motion-engine moments job in the video’s look, photos and logos from the entity resolver, stock from the stock search, AI pictures from the metered image model (an AI clip is drawn as a picture until AI video exists). The speaker and the words over them need nothing made: the client draws them, clear of the face. Send the sentences’ words again (the server keeps only the plan). REQUIRES an Idempotency-Key: the same key answers the same make. 409 while another make of this video is making; 400 when the plan is over its cap (step it down first, see /estimate). Poll GET for each item as it lands.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorMakeRequest"}}}},"responses":{"200":{"description":"This Idempotency-Key already started this make.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorMakeResponse"}}}},"202":{"description":"Started; poll GET for each item as it lands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorMakeResponse"}}}},"400":{"description":"No Idempotency-Key, a bad body, or the plan is over its cap (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"The wallet cannot hold the price (`user_quota_exhausted`, with a WalletQuote).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project, no plan yet, or the director is off for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Another make of this video is still making (`plan_in_progress`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"getDirectorMake","summary":"The director’s make as it stands, or `{ make: null }` when the video was never made: each item’s maker, status (`nothing` for the speaker, `queued`, `making`, `ready`, `failed` with a plain note), where it plays (source ms), and what to lay in — a moments clip (GET …/make/clips/{n}/{pick}), a library picture (`assetId`, bytes at /assets/{id}/bytes) or a stock link with its credit. Reading it moves the make on (a moments job that ended) and settles the hold once. `Retry-After` while making.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The make, or null.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorMakeMaybeResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project, or the director is off for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/director/make/clips/{n}/{pick}":{"get":{"operationId":"getDirectorMakeClip","summary":"A made graphic’s clip (WebM, 9:16 or the video’s shape, full frame), same origin so a browser can draw it on the export canvas. Only for an item whose maker is `moments` and status `ready`.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"n","in":"path"},{"schema":{"type":"string"},"required":true,"name":"pick","in":"path"}],"responses":{"200":{"description":"The clip.","content":{"video/webm":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No made graphic for that pick, or the director is off for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/post-text":{"post":{"operationId":"writePostText","summary":"POST TEXT for a finished talking-head or story video: a title (where the platform has one), the description, caption or post, and hashtags for each platform asked (`instagram`, `shorts`, `youtube`, `linkedin`, `x`), written from the WORDS of the edited video (the kept transcript, or a story video’s narration) and fitted to each platform’s limits (the publishing kit’s, `MOTION_KIT_PLATFORMS`; `trimmed` when Toast cut one). `full` is what to paste. Sends the words, the working title and the language to an AI model through OpenRouter only (data collection denied); never a frame, the sound or the video. Stores nothing. Free: no wallet or minutes charge (the user’s AI key pays). Send only when the user asks. 10 a minute.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostTextRequest"}}}},"responses":{"200":{"description":"One text per platform asked, in the order asked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostTextResponse"}}}},"400":{"description":"Request validation failed, or the project is not a talking-head or story video (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"No text came back from the model; nothing was stored and a retry is safe (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/versions/{version}":{"get":{"operationId":"getManifestVersion","summary":"One version, including the full manifest `data`.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Version number, as a path string."},"required":true,"name":"version","in":"path"}],"responses":{"200":{"description":"The version, with `data`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetManifestVersionResponse"}}}},"400":{"description":"Version is not a number (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project or version (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/versions/{version}/restore":{"post":{"operationId":"restoreManifestVersion","summary":"“Bring back” an old version (D19): the server COPIES it into a NEW version at the top of the list — v5 + bring back v2 = v6 with v2’s edit, and v3..v5 stay. Nothing is rolled back. The new version has `source: history`, `restoredFrom` = the old number, and the old one’s label, summary and `data`. The server only writes the version: load the returned `data` into the editor and save it on the device. If the user’s current edit changed since the newest version, POST /projects/{id}/versions it FIRST, or that unsaved work is lost. No body. Send an Idempotency-Key: a retry answers 200 with the same copy. Keeps the newest 50.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"The version number to bring back, as a path string."},"required":true,"name":"version","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Any unique token per intended Bring back (a uuid). Reuse it only to retry."},"required":false,"name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"This Idempotency-Key was already used: the copy it made.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreManifestVersionResponse"}}}},"201":{"description":"The new version, with `data`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreManifestVersionResponse"}}}},"400":{"description":"Version is not a number, or (`details.fields: [data]`) it was saved without a manifest, so there is nothing to bring back (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project or version (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/credits":{"get":{"operationId":"getCredits","summary":"The caller’s minutes balance plus live pricing. THE LAUNCH CALL for any client with a paywall. Grants the one-time free trial on first read, so a new account is never stranded at zero. `pricing` ships in the response so a price change needs no client release.","tags":["credits"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"`project:<id>` when an export of that project STARTS: an approved share for credit (#2030) leaves that one video without the mark (`watermark: false`), and the same project asked again keeps it. Leave it out for a read that makes nothing."},"required":false,"description":"`project:<id>` when an export of that project STARTS: an approved share for credit (#2030) leaves that one video without the mark (`watermark: false`), and the same project asked again keeps it. Leave it out for a read that makes nothing.","name":"video","in":"query"}],"responses":{"200":{"description":"Balance and pricing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalance"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/credits/ledger":{"get":{"operationId":"getCreditLedger","summary":"Immutable history of every minute granted and spent, newest first. Rows are never updated or deleted — a correction is a new compensating row.","tags":["credits"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Rows to return. Default 50, max 200."},"required":false,"description":"Rows to return. Default 50, max 200.","name":"limit","in":"query"}],"responses":{"200":{"description":"Ledger rows, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditLedgerResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/credits/estimate":{"post":{"operationId":"estimateCredits","summary":"CALL THIS BEFORE YOU UPLOAD. Answers whether a video of this ingested duration is affordable, and if not, how many credits to buy. Charging is ALL-OR-NOTHING — a 10-minute video against a 5-minute balance is refused outright, not half-processed — so discovering it here beats discovering it at POST /projects after the user has picked a file. Read-only: debits nothing.","tags":["credits"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditEstimateRequest"}}}},"responses":{"200":{"description":"Affordability, and the shortfall when refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditEstimateResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/credits/checkout":{"post":{"operationId":"createCreditCheckout","summary":"Buy N credits in ONE payment and get a hosted checkout URL. OPEN the URL (browser tab / system browser / Custom Tab) — never embed it, since Razorpay’s iframe is blocked by ad blockers. Credits are granted by the payment WEBHOOK, not by the user returning: poll GET /credits until the balance rises. Send an Idempotency-Key and retry with the SAME one, or the user may end up with two payable links.","tags":["credits"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditCheckoutRequest"}}}},"responses":{"200":{"description":"The hosted checkout link and what it charges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditCheckoutResponse"}}}},"400":{"description":"Request validation failed, or credits are not purchasable in this currency (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Payments are not enabled in this environment (`forbidden`). NOT a permissions error — do not show it as one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Another checkout with this Idempotency-Key is in flight (`idempotency_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/credits/topup":{"post":{"operationId":"createWalletTopUp","summary":"Add money to the wallet: any amount from the currency’s minimum to its maximum (`GET /credits` → `wallet.currencies`), and get a hosted checkout URL. OPEN it, never embed it. The money is added by the payment WEBHOOK, not by the user returning: poll GET /credits until `wallet.balanceMinor` rises. A wallet holds one currency; another enabled one is accepted only while `wallet.canSwitchCurrency`. Send an Idempotency-Key and retry with the SAME one.","tags":["credits"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTopUpRequest"}}}},"responses":{"200":{"description":"The hosted checkout link and what it charges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTopUpResponse"}}}},"400":{"description":"Validation failed, the amount is outside the bounds, the currency is not enabled, or the wallet cannot switch to it (`invalid_input`; `error.message` is a sentence for a person).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Payments or the wallet are not switched on in this environment (`forbidden`). NOT a permissions error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Another top-up with this Idempotency-Key is in flight (`idempotency_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/credits/wallet/history":{"get":{"operationId":"getWalletHistory","summary":"Where the wallet’s money went, newest first, with the balance after each line. A job’s hold, its settle and any overrun Toast paid are ONE line (`kind: job`, `status` running | settled). Tolerate an unknown `kind`: show its `note` and amount.","tags":["credits"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Lines to return. Default 50, max 200."},"required":false,"description":"Lines to return. Default 50, max 200.","name":"limit","in":"query"}],"responses":{"200":{"description":"History lines, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletHistoryResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"The wallet is not switched on in this environment (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/jobs/{id}":{"get":{"operationId":"getJob","summary":"The full job row, including `result`. Sends `Retry-After: 3` while non-terminal and OMITS it once terminal — the absence of that header is your stop-polling signal. Prefer `GET /jobs/{id}/events` where you can.","tags":["jobs"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Job id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The job.","headers":{"Retry-After":{"description":"Seconds to wait before polling again. PRESENT while queued/running/awaiting_input, ABSENT once terminal.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetJobResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such job for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/jobs/{id}/result":{"get":{"operationId":"getJobResult","summary":"The analyze payload `{ manifest, degraded, promptVersion }` for a `done` job. RESULTS EXPIRE — past `expiresAt` the row is swept and this answers 404, not 410, so do not read 404 as “never existed”.","tags":["jobs"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Job id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The analyze result body. Its shape is owned by the analyze pipeline and is deliberately opaque in this contract.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Job missing, not `done` yet, or the result has expired (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/jobs/{id}/events":{"get":{"operationId":"streamJobEvents","summary":"RESUMABLE SSE progress stream. Persist each frame’s `id:` (a monotonic `seq`) and send it back as `Last-Event-ID` on reconnect — every missed event replays from the durable log. This is what a mobile client, which WILL be backgrounded mid-job, should use instead of polling. Do not race this with polling.","tags":["jobs"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Job id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Resume cursor, for clients that cannot set the `Last-Event-ID` header. The header wins when both are sent."},"required":false,"name":"lastEventId","in":"query"}],"responses":{"200":{"description":"An SSE stream. `connected` carries the current max seq and does NOT advance the cursor; `job:complete` / `job:error` / `job:cancelled` are terminal, after which the stream closes. Heartbeat comment frames arrive about every 20 s.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Job missing, or the stream has expired (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/jobs/{id}/cancel":{"post":{"operationId":"cancelJob","summary":"Cancel a queued/running/awaiting_input job. IDEMPOTENT — an already-cancelled job returns 200 with the same body. THIS IS THE SPEND BOUND: a client killed without cancelling keeps paying for work nobody will read, so call it on abandon.","tags":["jobs"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Job id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The cancelled job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetJobResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such job for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Already `done` or `failed` (`job_not_cancellable`). Also returned when the worker finalized the job inside the race window.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/jobs/project/{projectId}":{"get":{"operationId":"listProjectJobs","summary":"All jobs for a project, newest first. OMITS `result` deliberately — it holds the full transcript JSON (multi-MB per row), so fetch the single-job GET when you need it.","tags":["jobs"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Lean job summaries, without `result`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListJobsResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/channels":{"get":{"operationId":"listChannels","summary":"List the caller’s channels, newest `updatedAt` first.","tags":["channels"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The caller’s channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChannelsResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"operationId":"createChannel","summary":"Create a channel. Pass `stylePresetId` to fork a shipped preset into its first style contract in the same request, or omit it — A CHANNEL WITH NO STYLE IS A LEGAL, EXPECTED STATE, not an error to render around.","tags":["channels"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChannelRequest"}}}},"responses":{"201":{"description":"The created channel, and the forked contract when a preset was named (`styleContract` is null otherwise).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChannelResponse"}}}},"400":{"description":"Validation failed, or an unknown `stylePresetId` (`invalid_input`). Fetch GET /styles/presets for the current catalogue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Per-user channel cap reached (`forbidden`). Surface it as “delete a channel”, not as a generic failure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/channels/{id}":{"get":{"operationId":"getChannel","summary":"Fetch one channel. A channel belonging to another user reads as 404, never 403.","tags":["channels"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Channel id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The channel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChannelResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such channel for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"patchChannel","summary":"Rename a channel, and/or move its default style contract pointer. `defaultStyleContractId` and `defaultStyleContractVersion` MUST be sent together — a contract is keyed by both, so half the pair names nothing. This route does not edit a contract’s content; PATCH the contract itself for that.","tags":["channels"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Channel id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchChannelRequest"}}}},"responses":{"200":{"description":"Acknowledgement. The updated row is NOT returned — re-GET if you need it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchChannelResponse"}}}},"400":{"description":"Validation failed, or the pointer names a contract version that does not exist on this channel (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such channel for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteChannel","summary":"Delete a channel. IDEMPOTENT — always 204, including for a missing or foreign channel. A SOFT delete since #1045: the channel disappears from GET /channels and every /channels/{id}/* route answers 404, but its style contracts, projects, scene plans and generated assets all survive, so a project made under it still plans and still finds its images. It used to cascade to the contracts, which left every project under the channel pointing at wording that no longer existed and unable to ever be re-planned. There is no undelete endpoint, so still confirm it in the UI.","tags":["channels"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Channel id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted, or already absent."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/channels/{id}/style-contracts":{"get":{"operationId":"listStyleContracts","summary":"The LATEST version of each style contract on the channel. Older versions are fetched one at a time with `?version=N` — they are never pruned, because a generated asset must stay attributable to the exact wording that produced it.","tags":["channels"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Channel id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Latest version of each contract, newest contract first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListStyleContractsResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such channel for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"operationId":"createStyleContract","summary":"Create a style contract at version 1 — EITHER by forking a shipped preset (`{ presetId }`, the onboarding path) OR by sending a full contract body. Aspect is fixed here: the same look at 16:9 and 9:16 must be TWO contracts, because library reuse is scoped by aspect as well as by style.","tags":["channels"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Channel id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStyleContractRequest"}}}},"responses":{"201":{"description":"The created contract at version 1.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStyleContractResponse"}}}},"400":{"description":"Validation failed, or an unknown `presetId` (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Per-channel style contract cap reached (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such channel for this user (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/channels/{id}/style-contracts/{contractId}":{"get":{"operationId":"getStyleContract","summary":"One style contract. Returns the LATEST version by default; pass `?version=N` for the exact wording an older asset was generated under.","tags":["channels"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Channel id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Style contract id — STABLE ACROSS VERSIONS. Not unique on its own: a contract is keyed by (id, version)."},"required":true,"name":"contractId","in":"path"},{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Exact version to fetch. Omit for the latest."},"required":false,"name":"version","in":"query"}],"responses":{"200":{"description":"The contract at the requested version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetStyleContractResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such channel, contract, or version (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"patchStyleContract","summary":"Edit a style contract. **ANSWERS 201, NOT 200, AND RETURNS A HIGHER `version` THAN THE ONE YOU ADDRESSED** — nothing is modified; version N+1 is INSERTED from the latest version plus your fields. Re-read `version` from the response. It always forks from the latest version, not from the one you read, and there is no concurrency token: two simultaneous edits both succeed and the second wins on the fields it sent.","tags":["channels"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Channel id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Style contract id — STABLE ACROSS VERSIONS. Not unique on its own: a contract is keyed by (id, version)."},"required":true,"name":"contractId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchStyleContractRequest"}}}},"responses":{"201":{"description":"The NEW version. Its `version` is one higher than the version that was current when you called.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetStyleContractResponse"}}}},"400":{"description":"Request validation failed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such channel or contract (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/styles/presets":{"get":{"operationId":"listStylePresets","summary":"The shipped style preset catalogue, with a real generated sample of each look — the same for every user. SERVED RATHER THAN COMPILED IN so a new preset, or a re-rendered sample, reaches a shipped binary with no client release. Only `schematic` and `stylised` registers ship; the photoreal rungs are an unmade pricing decision, not a roadmap item.","tags":["channels"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"description":"The shape of video the creator is making — picks WHICH SAMPLE FRAMES are signed; the catalogue is the same for every aspect. Absent = `16:9`, exactly the response served before this parameter existed. Write it with a colon, URL-encoded (`9%3A16`). A preset not yet rendered in this shape serves its 16:9 frames rather than none, so size each frame from `samples[].aspect`, never from this value. Re-request when the user switches aspect."},"required":false,"name":"aspect","in":"query"}],"responses":{"200":{"description":"The catalogue, plus the sample script it was rendered with. NO default preset is returned, deliberately: a preselected style lets a first-time creator finish setup without opening the picker and then pay to render ~100 images in a look they never chose. Make the user choose — and show them `sampleUrl`, because forcing a choice between twelve names and twelve colour swatches would be worse than the default it replaces. A channel’s own `defaultStyleContract` is different and should be inherited. Sample URLs are SIGNED and EXPIRE (6 h, stable for an hour at a time so image caches hit): cache the response for a session, never to disk, and never store a URL against a channel or project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListStylePresetsResponse"}}}},"400":{"description":"`aspect` is not one of the StyleAspect values (`invalid_input`, `fields: ['aspect']`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/styles/looks":{"get":{"operationId":"listStoryLooks","summary":"The caller’s saved looks (“My looks”), newest first, and how many tries are left today. Sample URLs are signed and expire like the presets’.","tags":["channels"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The saved looks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoryLookList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such look for this caller, or Make your own look is off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"operationId":"makeStoryLook","summary":"MAKE A LOOK from the user’s words (or, with `from`, change one: `words` is then the change, e.g. “warmer”), and draw the three sample scenes in it (~20 s). Answers a DRAFT; `POST /styles/looks/{id}/save` keeps it. Sends the words to an AI model through OpenRouter only (data collection denied) on Toast’s key, and the resulting recipe, with any artist, studio, brand or real-person name rewritten into a plain description, to the image model. Free to the user; one try of the day’s cap (past it: 429 `rate_limit_exceeded`, show the message as is, “Try again tomorrow”).","tags":["channels"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStoryLookRequest"}}}},"responses":{"201":{"description":"The new draft look, with its samples (a sample that could not be drawn has `url: null`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoryLook"}}}},"400":{"description":"The words say what to draw but not how it looks, or are empty (`invalid_input`, `fields: ['words']`): show the message, it asks for colours or the kind of drawing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such look for this caller, or Make your own look is off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"No look came back from the model (`ai_upstream_failed`); nothing was made or counted, a retry is safe.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/styles/looks/{id}/samples":{"post":{"operationId":"redrawStoryLookSamples","summary":"“Draw again”: three new sample pictures in the same look (new seeds). The old ones leave the library. One try of the day’s cap (past it: 429 `rate_limit_exceeded`).","tags":["channels"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The look’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The look with its new samples.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoryLook"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such look for this caller, or Make your own look is off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/styles/looks/{id}/save":{"post":{"operationId":"saveStoryLook","summary":"“Use this look”: keep the look in My looks (optionally renamed). Idempotent.","tags":["channels"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The look’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveStoryLookRequest"}}}},"responses":{"200":{"description":"The look, saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoryLook"}}}},"400":{"description":"A bad name (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such look for this caller, or Make your own look is off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/styles/looks/{id}":{"patch":{"operationId":"renameStoryLook","summary":"Rename a look. A video already made in it keeps its own copy.","tags":["channels"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The look’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameStoryLookRequest"}}}},"responses":{"200":{"description":"The look, renamed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoryLook"}}}},"400":{"description":"A bad name (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such look for this caller, or Make your own look is off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteStoryLook","summary":"Delete a look: it leaves My looks and its samples leave the library. Videos made in it are untouched (each has its own copy).","tags":["channels"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The look’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such look for this caller, or Make your own look is off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/styles/looks/{id}/contract":{"post":{"operationId":"useStoryLook","summary":"The look as a channel’s style contract at an aspect: the one made earlier for this look, channel and aspect, else a new copy (`presetId: null`). Pass the answer as a project’s `styleContractId`/`styleContractVersion`. Sends nothing to anyone.","tags":["channels"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The look’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseStoryLookRequest"}}}},"responses":{"200":{"description":"The contract to make the video under.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseStoryLookResponse"}}}},"400":{"description":"`channelId` or `aspect` missing or wrong (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such look or channel for this caller, or the feature is off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/assets":{"get":{"operationId":"listAssets","summary":"The caller’s asset library, newest first, cursor-paginated. Includes `rejected` assets — this is the user’s own library, and hiding their own rejections would confuse; search excludes them instead. Never lists a rendered card or caption clip, a depth map, a deleted row or one whose bytes are gone: fetch a clip by its id through `/assets/{id}/bytes`.","tags":["assets"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Only assets bound to this channel."},"required":false,"name":"channelId","in":"query"},{"schema":{"type":"string","description":"Only assets generated under this style contract."},"required":false,"name":"styleContractId","in":"query"},{"schema":{"type":["integer","null"],"description":"Narrow to one contract version. Meaningless without `styleContractId`."},"required":false,"name":"styleContractVersion","in":"query"},{"schema":{"type":"string","description":"Aspect ratio, e.g. `16:9`. A 16:9 asset is never reusable in a 9:16 project."},"required":false,"name":"aspect","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Filter by the human verdict."},"required":false,"name":"approved","in":"query"},{"schema":{"type":"string","description":"Single tag to filter by (lower-cased on write)."},"required":false,"name":"tag","in":"query"},{"schema":{"type":"string","description":"Only assets first made for this project."},"required":false,"name":"projectId","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"`true`: only pictures a card’s picture slot (`imageSlots`) accepts — images, never a card clip or depth map, never an uploaded reference photo of a cast member. Build a card picture picker on this and it never offers one `POST /cards/render` refuses."},"required":false,"name":"pictures","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Page size, default 50, max 200."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page’s `nextCursor`. Cursor, not offset — the library grows while it is being read."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"One page of the library. `nextCursor` is null on the last page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAssetsResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/subjects/extract":{"post":{"operationId":"extractSubjects","summary":"Find the RECURRING subjects a script needs to keep visually consistent — character | creature | object | place | motif. NOT just characters: the Milky Way has no face and must still be the same galaxy in scenes 12 and 30. COSTS MONEY (one LLM pass over the whole transcript) and takes seconds — never call it to refresh a list, use GET. REPLACES rather than merges: already-locked subjects are preserved untouched, everything unsettled is re-read. An EMPTY result is normal and correct for an abstract script with no cast.","tags":["subjects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the cast belongs to."},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractSubjectsRequest"}}}},"responses":{"200":{"description":"The full cast in play (this project’s, plus inherited channel-scoped subjects) and the lock gate. `replaced` is true when a prior extraction existed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractSubjectsResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/subjects":{"get":{"operationId":"listSubjects","summary":"The cast in play for this project — its own extracted subjects plus any channel-scoped ones it inherits (the mascot case) — ordered by how many scenes need each. Free; this is what a list refresh should call. READ `gate`, DO NOT RECOMPUTE IT.","tags":["subjects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the cast belongs to."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Include this channel’s channel-scoped subjects. Omit and you get only the project’s own."},"required":false,"name":"channelId","in":"query"}],"responses":{"200":{"description":"Subjects and the lock gate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSubjectsResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/subjects/{sid}":{"get":{"operationId":"getSubject","summary":"One subject. 404 for another user’s, rather than 403.","tags":["subjects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the cast belongs to."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Subject id (uuid)."},"required":true,"name":"sid","in":"path"}],"responses":{"200":{"description":"The subject.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSubjectResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"patchSubject","summary":"Settle or correct a subject. Setting `lockedBy` REQUIRES a `referenceAssetId` (on this request or already on the row) — a lock without an image is not a lock. Get one from `POST /projects/{id}/subjects/{sid}/reference`, which at the shipping registers also locks it for you, so most clients never send `lockedBy` at all. `appearance` must describe WHAT the subject is, never HOW it is drawn: style words are REJECTED with 400 rather than stripped, because a leaked \"hand-drawn\" duplicates the channel’s style contract and silently half-breaks a restyle. `sceneCount`, `originProjectId` and the style binding are not patchable — they are facts about where the subject came from, not decisions about it.","tags":["subjects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the cast belongs to."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Subject id (uuid)."},"required":true,"name":"sid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSubjectRequest"}}}},"responses":{"200":{"description":"The updated subject and the recomputed gate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSubjectResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteSubject","summary":"Drop a subject the user says does not recur. HARD delete, unlike `DELETE /assets/{id}`: a subject carries no bytes and no lineage — it is a decision, and an un-made decision should leave no trace. The reference asset it pointed at is NOT deleted; the user paid for it.","tags":["subjects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the cast belongs to."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Subject id (uuid)."},"required":true,"name":"sid","in":"path"}],"responses":{"200":{"description":"Gone, plus the recomputed gate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSubjectResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/subjects/{sid}/reference":{"post":{"operationId":"generateSubjectReference","summary":"Draw the subject. This is what makes a lock POSSIBLE — nothing else fills `referenceAssetId`, and PATCH refuses a `lockedBy` without one. The prompt is composed SERVER-SIDE from the subject’s `appearance` and its OWN pinned style contract version, through the same composer every scene goes through; there is no field to override it, because four clients writing their own portrait prompt is four different canonical images for one character. FREE AND IDEMPOTENT on a second call: a subject that already has a reference comes back with `reused: true` and nothing is drawn or billed — pass `regenerate: true` to spend again. At the shipping registers (`silent`, `review`) it comes back `autoLocked: true` with `lockedBy` already set, so do not PATCH a lock after it; under `choose`/`required` the candidates are in `variantAssetIds` and your PATCH is what settles it. `variants` is honoured only under those two ceremonies. The reference is NOT what scenes are conditioned on — per-scene conditioning costs 13x and drags the reference’s background into every frame; identity is carried by `appearance` and the pinned `seed`.","tags":["subjects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the cast belongs to."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Subject id (uuid)."},"required":true,"name":"sid","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSubjectReferenceRequest"}}}},"responses":{"200":{"description":"Already drawn and `regenerate` was not set. `reused` is true, `assetIds` is empty, nothing was billed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSubjectReferenceResponse"}}}},"201":{"description":"Drawn. `assetIds` are the candidates from THIS call; `autoLocked` says whether the ceremony settled the subject without asking.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSubjectReferenceResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"A spend ceiling was reached (`user_quota_exhausted`). Checked BEFORE the provider is called.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such subject (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"Every candidate failed at the image provider (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Asset storage is not configured on this server (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/subjects/{sid}/reference/upload":{"post":{"operationId":"uploadSubjectReference","summary":"Lock a subject from a picture the user ALREADY HAS — the strongest lock and the only free one. THE BODY IS THE IMAGE: raw `image/jpeg`, `image/png` or `image/webp`, up to 12 MB, the same shape `/v1/audio/*` uses for a WAV. There is therefore no JSON body, and the attestation rides in the QUERY STRING. **LIKENESS GATE:** uploading for a `character` REQUIRES exactly one of `isSelf=true` or `hasPermission=true` — neither is a 400, both is a 400, and every other subject kind needs no attestation at all. A photograph a vision pass reads as a child is refused unless the uploader said it is of themselves, and the stored asset is soft-deleted in the same request; that check fails SOFT, so a vision outage reads as ‘not a minor’ rather than as an accusation. **WHAT AN UPLOAD ACTUALLY DOES:** the picture is never sent to the image model. It is read ONCE into `subject.appearance`, and those WORDS are what get injected into every prompt naming the subject — per-scene conditioning was measured and dropped. The image stays behind as the vision gate’s identity target. So `appearance` is the interesting field in the response, and a null one means the reading failed: the subject still locked, on whatever description it already had. The stored asset carries `provider: ‘upload’`, which is why it never appears in `GET /assets/search` and is refused by `POST /assets/{id}/edit`.","tags":["subjects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the cast belongs to."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Subject id (uuid)."},"required":true,"name":"sid","in":"path"},{"schema":{"type":["boolean","null"]},"required":false,"name":"isSelf","in":"query"},{"schema":{"type":["boolean","null"]},"required":false,"name":"hasPermission","in":"query"}],"requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","description":"The reference photograph itself. JPEG, PNG or WebP, up to 12 MB.","format":"binary"}},"image/png":{"schema":{"type":"string","description":"The reference photograph itself. JPEG, PNG or WebP, up to 12 MB.","format":"binary"}},"image/webp":{"schema":{"type":"string","description":"The reference photograph itself. JPEG, PNG or WebP, up to 12 MB.","format":"binary"}}}},"responses":{"201":{"description":"Stored and locked. `appearance` is what was read off the picture; `deduplicated` true means these exact bytes were already in the library and the existing asset was adopted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSubjectReferenceResponse"}}}},"400":{"description":"`invalid_input` — a `character` upload with no attestation or with both flags set, a body that is not a JPEG/PNG/WebP, or a picture refused as a minor. The message is written for a person and can be shown as-is.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such subject (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"The image is larger than 12 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Asset storage is not configured on this server (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/plan":{"post":{"operationId":"planScenes","summary":"Turn a narration transcript into the video’s whole visual track — an ordered, CONTIGUOUS, EXHAUSTIVE scene list at the MEASURED rate of ~10 scenes per minute (a 10-minute video is ~100 images, not ~45). COSTS MONEY: one LLM pass over the whole transcript, tens of seconds — never call it to refresh a list, use GET. Send the transcript with SENTENCE TIMINGS: every boundary is derived from them and the model is never asked for a millisecond, because a number that fails to tile the timeline is a gap, and a gap is black screen. REPLACES any existing plan and NEVER deletes a generated image — `retainedAssets` counts what stayed in the library, where `GET /assets/search` will offer it back. `gate` is the lock gate, carried so the review gate reads one source: `gate.blocking` stops GENERATE, not PLAN. `drops` is not an error, but a large one means a plan quietly worse than the one paid for — surface it and offer a re-plan. Capped at 15 minutes of narration. ONE PASS AT A TIME PER PROJECT: while one runs, another POST answers 409 `plan_in_progress` — poll `GET /projects/{id}/scenes` instead. SAME INPUT, NO SECOND CHARGE: an identical body and unchanged cast within ~30 minutes, while that plan is still current, returns it with `reused: true` and no model call; send `fresh: true` to re-plan deliberately. Both guards need Redis and are OFF (never failing) without it, so keep your own button disabled while a request is in flight.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanScenesRequest"}}}},"responses":{"200":{"description":"The plan, its scenes, the cost/wait summary, the lock gate, and what the planner dropped. `reused: true` means no model was called — the same input was planned within ~30 minutes and that plan is still current.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanScenesResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"A planning pass for this project is ALREADY RUNNING (`plan_in_progress`), from this or another client. Nothing was charged. `details.startedAt` is when it began. Do NOT re-post in a loop: poll `GET /projects/{id}/scenes` — `planning` stays non-null while it runs, and a `plan` whose `createdAt` is at or after `startedAt` is its result.","headers":{"Retry-After":{"description":"Seconds before polling `GET /projects/{id}/scenes` again.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/generate":{"post":{"operationId":"generateScenes","summary":"Start the batch image run that fills the scene plan — or REJOIN the one already running. A 10-minute video is ~100 images at a MEASURED 13.9 s each including retries, so this is a **~30-minute job**; it answers 202 immediately and the work happens in a durable queue tracked through `GET /jobs/{id}` and its SSE stream (one `scene:generated` frame per image, so a progress screen can show pictures arriving rather than a bar). RESUME IS STRUCTURAL: a scene either has an `assetId` or it does not, and only the ones that do not are generated — so posting again after closing the tab rejoins (`resumed: true`) rather than starting a second run, a crash or a deploy resumes where it stopped, and re-running a finished plan costs nothing. Before paying for a frame the library is checked for an EXACT match (same prompt, same style contract version, same aspect, not rejected) and a hit costs no money and no time. CANCEL through `POST /jobs/{id}/cancel`: the run re-reads the job status before every paid call, so a cancel at scene 12 of 100 is not charged for scene 13. Both spend ceilings apply per image, not just at submit. A run that fills 97 of 100 scenes finishes `done`, not `failed` — the plan keeps the three and a re-run retries them.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"}],"responses":{"202":{"description":"The run, new or rejoined, with what the pending scenes will cost and how long they will take.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateScenesResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/animate/access":{"get":{"operationId":"storyClipsAccess","summary":"Whether this account may make moving scenes (`STORY_CLIPS_USERS`). Show the Moving scenes control only when `enabled`.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Whether moving scenes are on for this account.","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/animate/quote":{"post":{"operationId":"quoteStoryClips","summary":"The price of moving scenes BEFORE Make, once the pictures exist. Per scene: can it move (and in plain words why not: words, a real person, a child, a map, your own picture…), does this choice move it, its clip length and price; then the total, the wait and the wallet’s verdict. `mode: key` moves the opening and the longest holds (~30% of the time), `every` every scene that can (videos up to 3 minutes), `scenes` exactly `sceneIds`. At most 20 moving scenes per video (`capped`). Pure read: no hold, no charge.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoryClipQuoteRequest"}}}},"responses":{"200":{"description":"The quote.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoryClipQuote"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/animate":{"post":{"operationId":"animateScenes","summary":"Start making the chosen scenes move, holding the quoted price. Async: 202 with the job; follow `GET /jobs/{id}/events` (`clip:update` per scene, then `job:complete`) or poll `GET /jobs/{id}`. You pay only for clips that pass Toast’s checks (cost × 1.30); a clip that fails is made once more at Toast’s cost, and if it fails again the scene keeps its still, free. An active run is returned (`resumed: true`), never doubled. Cancel with `POST /jobs/{id}/cancel`. 402 `user_quota_exhausted` with `wallet` when the wallet cannot start it.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoryClipQuoteRequest"}}}},"responses":{"202":{"description":"The run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoryClipAnimateResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/{sceneId}/animate":{"post":{"operationId":"animateScene","summary":"One scene: \"Make it move\", \"Swap for a new clip\" (at most 3 per scene) or \"Try once more\"; `gentler: true` asks for less movement. Same job, hold and checks as the batch route. 400 when the scene cannot move, with the reason.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Scene id (uuid)."},"required":true,"name":"sceneId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoryClipSceneRequest"}}}},"responses":{"202":{"description":"The run for this scene.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoryClipAnimateResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/clips":{"get":{"operationId":"listSceneClips","summary":"Every scene of the current plan that has had a clip run, with its state and plain-words message. A `ready` clip’s bytes: `GET /assets/{assetId}/bytes`.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The clips.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SceneClipList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes":{"get":{"operationId":"listScenes","summary":"The project’s scene plan, in order. FREE — this is what a list refresh should call. `plan` is null before the first planning call. READ `summary`, DO NOT RECOMPUTE IT: it carries the cost in USD ten-thousandths for the scenes not yet generated, and `estimatedSeconds` from a MEASURED 13.9 s per image including retries, which is why a 10-minute video is a ~30-minute job. `planning` is `{ startedAt }` while a `POST /scenes/plan` pass is running (from any client) and null otherwise — the resume signal after a refresh: poll every ~5 s and take a `plan` whose `createdAt` is at or after `startedAt` as its result; `planning` going null with no such plan means the pass failed. Always null on a server without Redis.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The plan, its scenes and the summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListScenesResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"operationId":"addScene","summary":"Add a scene, expressed as a SPLIT — there is no append. Scenes tile the timeline contiguously and exhaustively, so every millisecond already belongs to a scene and a new one must take its time from a neighbour; a plan that merely gained a row would overlap or leave a gap, and a gap is BLACK SCREEN in a scene list that looks fine. `index` names the scene to split, `atMs` is the moment inside it where the new scene starts. A split ON a boundary or outside the scene is REFUSED with 400, not clamped, because either half would be zero-length. The parent keeps the front half AND its generated image; the new half starts with no image, so it shows up in the estimate as work still to do rather than as a frame that silently repeats. `subject` is optional and style words in it are rejected with 400, exactly as on PATCH. Returns the WHOLE re-indexed list.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSceneRequest"}}}},"responses":{"201":{"description":"The full re-indexed scene list and the recomputed summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSceneResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/{sceneId}":{"patch":{"operationId":"patchScene","summary":"Edit one scene. `startMs` is the ONLY timing knob and it moves a BOUNDARY: the previous scene’s end follows it, so exactly two holds change and total coverage is untouched. Scene 0’s start is pinned at 0, and a move that would cross a neighbour is REFUSED with 400 rather than clamped — clamping commits a different edit from the one the user made. `subject` must describe WHAT is in the frame, never HOW it is drawn: style words are REJECTED with 400, because they duplicate the channel’s style contract and silently half-break a restyle. Returns the WHOLE list: a timeline edit is a whole-timeline fact.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Scene id (uuid)."},"required":true,"name":"sceneId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSceneRequest"}}}},"responses":{"200":{"description":"The full scene list and the recomputed summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SceneListResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteScene","summary":"Drop a scene. The PREVIOUS scene absorbs its time so coverage never falls below 100% of runtime (deleting scene 0 pulls the next one back to 0 instead), and everything after it is re-indexed. The scene’s generated IMAGE is not deleted — it stays in the library the user paid for, which is what makes this reversible. A plan cannot lose its only scene: 400.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Scene id (uuid)."},"required":true,"name":"sceneId","in":"path"}],"responses":{"200":{"description":"Gone, plus the re-indexed list and the recomputed summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSceneResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/{sceneId}/find-stock":{"post":{"operationId":"findStockPhoto","summary":"SEARCH AGAIN for one scene of a story video made from stock photos (`pictureSource: stock`), from its description as it is now. Nothing is drawn and nothing is charged. SYNCHRONOUS, usually 5-20 s; keep the row pending, there is no job to poll. `outcome` is `found`, or why not: `no_fit` (the search ran and no photo was good enough), `limited` (a stock site answered 429, so nothing can be said about fit; try again in a minute) or `error`. On a miss a picture the scene already had stays, and the scene carries `stockMiss`. Call it after a PATCH that changes `subject`: a saved description does not search by itself. A project that is not stock is refused with a 400. Limited to 20 a minute per caller.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Scene id (uuid)."},"required":true,"name":"sceneId","in":"path"}],"responses":{"200":{"description":"The outcome and the full scene list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindStockPhotoResponse"}}}},"400":{"description":"The project is not made from stock photos (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"The user reached a spend ceiling (`user_quota_exhausted`). The search spends model calls, so it stops with the rest.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such scene for this caller and project (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/{sceneId}/redraw":{"post":{"operationId":"redrawScene","summary":"Draw this ONE frame again — same prompt, new seed. COSTS MONEY (one image) and is SYNCHRONOUS, unlike `/scenes/generate`: a single image is ~14 s, and minting a job to poll for a one-row result is more machinery than the affordance describes. The prompt is composed server-side by the SAME function the batch run uses, so a redraw cannot drift from the frames around it, and there is no field to override it. Library reuse is deliberately NOT consulted — you are asking for a different image, and an exact library hit would hand back the very frame you are replacing. Both spend ceilings apply. The new frame is SCORED before the response returns, so a redraw whose purpose was to fix drift does not come back looking clean merely because nobody had looked at it yet. `unchanged: true` means the provider returned bytes we already hold: you were still billed, and the useful next move is a different description or `/assets/{id}/edit`. PAINTED LETTERING IS REDRAWN (2026-09-14): every draw is checked for a signature, title or printed margin the image model added on its own, and a dirty one is drawn again with a new seed, up to the server's `FACELESS_LETTERING_MAX_REDRAWS` (default 2), with no extra draw started after `FACELESS_LETTERING_SYNC_BUDGET_MS` (default 45 s) — so allow for that plus one image deadline and one check. You are CHARGED FOR ONE IMAGE either way (the settle is capped at the one-image reserve); `costMinorUnits` is what every draw cost the provider and `letteringRedraws` counts the extra ones. If the kept frame is still dirty its scene carries `letteringDefect`. On `hand-lettered` styles painted words (unless the scene quotes them) and photographs count, not the edges of a drawn board; a light printed margin is measured off the pixels on every style.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Scene id (uuid)."},"required":true,"name":"sceneId","in":"path"}],"responses":{"200":{"description":"The redrawn frame, the full scene list, and what it cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedrawSceneResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/{sceneId}/rewrite":{"post":{"operationId":"rewriteScene","summary":"Ask for a BETTER DESCRIPTION of this one frame — the fix for a flagged beat, written for the user instead of demanded from them. COSTS MONEY, but a fraction of a cent: one small LLM pass on the user’s own key, no image, no ledger row, ~3 s. ⚠️ IT SAVES NOTHING. The suggestion comes back and stops there; adopting it is `PATCH /projects/{id}/scenes/{sceneId}` with the returned `subject`, after the user has read it. A client that applies it automatically has turned a decision into a silent edit to the thing being bought. It never SPLITS the scene either — splitting is `POST /projects/{id}/scenes`, and it adds an image to the run. The suggestion is held to the same bars a user’s own edit is: no style words (the channel must stay restylable) and no asking the image model to spell; a suggestion that breaks either is refused upstream and you get a 502, so press again or let the user type their own. `risksBefore` is recomputed server-side and `risksAfter` is the SAME checker re-run over the suggestion — it CAN still be non-empty, which is worth showing rather than hiding. `unchanged: true` means the model handed back what it was given.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Scene id (uuid)."},"required":true,"name":"sceneId","in":"path"}],"responses":{"200":{"description":"A suggested description. Nothing has been saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewriteSceneResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such scene for this caller and project (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"`ai_upstream_failed` — the provider failed, or the suggestion broke a rule a human’s edit would also have been refused for. Nothing was saved; a retry is a new press.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/layout":{"post":{"operationId":"sceneLayout","summary":"WHAT MUST STAY VISIBLE on each drawn picture, so a client can lay captions, cards and other text out AROUND it (#1053 phase 2). The answer is a list of GRID CELLS per scene: a column letter and a row number (`B3`), on a 4 x 6 grid for a portrait picture or 6 x 4 for a landscape one, A1 top-left; the cells hold people or the main subject. COSTS MONEY once per picture (~$0.0033, a vision model on the user’s own key), and only for pictures not read before: the answer is stored, so calling this again is free and only a REDRAWN picture is read again. Pictures the user uploaded, and licensed photos or logos, are never sent and come back `read: false`. `read: false` otherwise means the picture could not be read this time — lay it out from its pixels and call again later. Takes a few seconds per unread picture, four at a time.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The cells to keep clear, per scene.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SceneLayoutResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No scene plan for this caller and project (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/depth":{"post":{"operationId":"sceneDepth","summary":"A DEPTH MAP for each drawn picture (#1053 phase 3), so a client can move the camera THROUGH a still — parallax, near things travelling more than far things — instead of zooming a flat picture. Each map is an 8-bit grey PNG, 255 = nearest, 518 px wide with the picture’s aspect (scale it to the picture); `relief` says how much depth STRUCTURE the picture has (0.23 an empty beach, 0.85 a room full of people and tables) — draw the parallax version of `push-in` / `pull-out` only when it is high, and the ordinary move otherwise. FREE to the user: computed by Toast’s own renderer, ~2-4 s per picture, two at a time, once — the map is stored, so calling again is free and only a REDRAWN picture gets a new one. Every scene list also carries `depth` once a map exists. Pictures the user uploaded, and licensed photos or logos, are never sent and come back `depth: null`; so does a picture whose map could not be made this time (`failed` counts them — call again later).","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The depth map per scene, or null.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SceneDepthResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No scene plan for this caller and project (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/{sceneId}/image":{"post":{"operationId":"uploadSceneImage","summary":"Put the USER’S OWN picture on a frame. The body is the picture itself. FREE: nothing is generated, so nothing is charged, and it is never scored — the vision gate judges drawings against their prompts, and this picture had no prompt. It is stored as an `upload`, which means it is never sent to an image model or the vision model, never offered by `/assets/search`, and refused by `/assets/{id}/edit`. The frame then counts as filled, so `/scenes/generate` skips it. Scenes carry `assetSource: \"upload\"` so a client can say so rather than calling it a drawing.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Scene id (uuid)."},"required":true,"name":"sceneId","in":"path"}],"requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","description":"The user’s own picture. JPEG, PNG or WebP, up to 12 MB. Any shape — the renderer cover-crops it to the video.","format":"binary"}},"image/png":{"schema":{"type":"string","description":"The user’s own picture. JPEG, PNG or WebP, up to 12 MB. Any shape — the renderer cover-crops it to the video.","format":"binary"}},"image/webp":{"schema":{"type":"string","description":"The user’s own picture. JPEG, PNG or WebP, up to 12 MB. Any shape — the renderer cover-crops it to the video.","format":"binary"}}}},"responses":{"201":{"description":"Stored and on the frame. `deduplicated` true means these exact bytes were already in the library and that asset was reused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSceneImageResponse"}}}},"400":{"description":"`invalid_input` — an empty body, or bytes that are not a JPEG, PNG or WebP whatever the content type said.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such scene for this caller and project (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"The picture is larger than 12 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Asset storage is not configured on this server (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/projects/{id}/scenes/{sceneId}/entities/{index}/image":{"post":{"operationId":"uploadSceneEntityImage","summary":"Use the USER’S OWN photo or logo for ONE real person or company in a frame — for a name with no licensed picture (`miss: \"no_picture\"`), or one that matched several people (`miss: \"ambiguous\"`). The body is the picture. FREE, never scored, and stored as an `upload`: never sent to an image model or the vision model, never offered by `/assets/search`, refused by `/assets/{id}/edit`. The entity becomes `status: \"found\"`, `source: \"upload\"`, with NO licence and NO credit line — it is the user’s picture and Toast claims no licence for it. A person is placed as a photo, an organization or product as a logo on a plate, exactly as a Commons picture is. A later PATCH that gives the name a different `context` looks it up again and replaces this picture.","tags":["scenes"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Project id (uuid). The script the plan belongs to."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Scene id (uuid)."},"required":true,"name":"sceneId","in":"path"},{"schema":{"type":"string","description":"The entity’s position in the scene’s `entities` as the list stands: `0` or `1`."},"required":true,"name":"index","in":"path"}],"requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","description":"The user’s own picture. JPEG, PNG or WebP, up to 12 MB. Any shape — the renderer cover-crops it to the video.","format":"binary"}},"image/png":{"schema":{"type":"string","description":"The user’s own picture. JPEG, PNG or WebP, up to 12 MB. Any shape — the renderer cover-crops it to the video.","format":"binary"}},"image/webp":{"schema":{"type":"string","description":"The user’s own picture. JPEG, PNG or WebP, up to 12 MB. Any shape — the renderer cover-crops it to the video.","format":"binary"}}}},"responses":{"201":{"description":"Stored and placed on that entity. The whole scene list comes back, as from every mutating scene call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSceneImageResponse"}}}},"400":{"description":"`invalid_input` — an empty body, bytes that are not a JPEG, PNG or WebP, or an `index` that is not 0 or 1.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such scene for this caller and project, or no entity at that position (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"The picture is larger than 12 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Asset storage is not configured on this server (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/assets/search":{"get":{"operationId":"searchAssets","summary":"Find a reusable asset. TWO ORTHOGONAL AXES: `q` matches what an image DEPICTS (prompt, sceneText, caption, tags); `styleMatch` + `aspect` decide whether it LOOKS appropriate. `styleMatch` is REQUIRED and has no default — pass `same` with a `styleContractId` (every faceless caller: an asset may only be reused inside the style it was made for, and a photoreal frame in a stick-figure video is worse than generating a fresh image), or `any` only if your project genuinely has no style contract, which today means talking-head b-roll. Rejected assets are never returned. Ordered by `usageCount` desc.","tags":["assets"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Free text, matched against what the image DEPICTS: prompt, caption, sceneText and tags. Every word must appear somewhere. Text matching, not embeddings — synonyms will miss."},"required":true,"name":"q","in":"query"},{"schema":{"type":"string","enum":["same","any"],"description":"REQUIRED, no default. `same` scopes hard to `styleContractId` (which then becomes required) — use it for anything with a style. `any` drops the style constraint and exists only for callers that have no style contract at all. A wide search must be asked for, never arrived at by omitting a parameter."},"required":true,"name":"styleMatch","in":"query"},{"schema":{"type":"string","description":"The style the results must belong to. REQUIRED when `styleMatch=same`; ignored when `any`."},"required":false,"name":"styleContractId","in":"query"},{"schema":{"type":["integer","null"],"description":"Narrow to one contract version."},"required":false,"name":"styleContractVersion","in":"query"},{"schema":{"type":"string","description":"Strongly recommended — a scene planner should always pass it. A 16:9 asset in a 9:16 project is a crop that throws away most of the frame."},"required":false,"name":"aspect","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Default 50, max 200."},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Reusable candidates, most-used first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchAssetsResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/assets/{id}":{"get":{"operationId":"getAsset","summary":"One asset with full metadata and a freshly signed `url`.","tags":["assets"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Asset id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The asset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAssetResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such asset, or it belongs to someone else (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"patchAsset","summary":"Record the human verdict, re-tag, or set a caption. Approve and reject are one decision with two names — setting either clears the other. Prompt, seed, model, cost and bytes are immutable: they are the provenance record.","tags":["assets"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Asset id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAssetRequest"}}}},"responses":{"200":{"description":"The updated asset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAssetResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such asset (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteAsset","summary":"SOFT delete. The asset leaves list and search immediately; the row survives so an asset edited from it stays explicable, and the bytes are collected by a later pass.","tags":["assets"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Asset id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Acknowledgement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAssetResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such asset (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/assets/{id}/bytes":{"get":{"operationId":"getAssetBytes","summary":"The image ITSELF, served from this API rather than from storage. Use `asset.url` for anything you DISPLAY — it is a presigned URL straight to R2 and costs us no egress. Use this only when you must READ THE PIXELS: draw into a canvas, re-encode, hash, or feed a video encoder. A browser that fetches a cross-origin image without CORS headers still renders it, but the canvas is then TAINTED and every pixel read throws `SecurityError`, which presents as \"thumbnails work, the renderer does not\". This route is same-origin for a browser client, so it is never opaque. NATIVE CLIENTS (iOS, Android, toastOS) are not bound by CORS and should keep using `url`. `ETag` is the asset’s stored SHA-256, so send `If-None-Match` and expect 304 on a re-read.","tags":["assets"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Asset id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The image bytes, in the asset’s own `mimeType`.","content":{"image/webp":{"schema":{"type":"string","description":"The stored image bytes (WebP today).","format":"binary"}}}},"304":{"description":"The `If-None-Match` ETag matched; the body is empty and the bytes you hold are current."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such asset, or it belongs to someone else (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"410":{"description":"The row exists but its stored bytes are gone (`asset_bytes_missing`). Not a 404 — the asset is real; the picture is what is missing. Do not retry: offer a redraw or a replacement. A 500 `internal` until 2026-10-30.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Storage failed while reading the bytes (`internal`). Retrying later may work.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Asset storage is not configured on this server (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/assets/generate":{"post":{"operationId":"generateAsset","summary":"Generate an image, store it in R2 and index it — one operation, because provider URLs expire in about an hour. Returns 201. If identical bytes are already in the library, `deduplicated` is true, nothing new is stored and nothing is charged.","tags":["assets"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAssetRequest"}}}},"responses":{"201":{"description":"The stored asset. `deduplicated` true means it already existed and may predate this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAssetResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"A spend ceiling was reached — per-user-per-day or per-project (`user_quota_exhausted`). Checked BEFORE the provider is called.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"The image provider is rate-limiting us (`rate_limit_exceeded`); `retry_after` carries the provider’s own requested delay in seconds. This is the normal path under load, not an exception.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The image provider failed (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Asset storage is not configured on this server (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/assets/{id}/edit":{"post":{"operationId":"editAsset","summary":"Change ONE thing about an image and keep the rest, conditioned on the source. Send an INSTRUCTION (\"keep everything the same, only make her expression shocked\"), not a description — a description re-rolls the character and loses the identity the edit exists to preserve. Costs 13x a generation ($0.0400 vs $0.0030): the only model that can condition on an image is `flux-kontext-pro`. Both generation spend ceilings apply. The new asset inherits the source’s channel, project, style contract, cast, `sceneText` and ASPECT; `model`, `aspect` and `seed` are not accepted.","tags":["assets"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Asset id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditAssetRequest"}}}},"responses":{"200":{"description":"The model returned the source’s own bytes — `unchanged` is true, `asset` is the SOURCE, no new row or lineage was written, and the call was still billed. Retrying the same instruction will not help; a different one might.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditAssetResponse"}}}},"201":{"description":"The edited asset. `editedFromId` points back at the source, and the source’s `supersededBy` now points here — but `supersededBy` holds ONE id, so walk an edit tree by querying children on `editedFromId`, never by following it forward.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditAssetResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"A spend ceiling was reached — per-user-per-day or per-project (`user_quota_exhausted`). Checked BEFORE the provider is called.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such asset (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"The image provider is rate-limiting us (`rate_limit_exceeded`); `retry_after` carries the provider’s own requested delay in seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The image provider failed (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Asset storage is not configured on this server (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/entities/resolve":{"post":{"operationId":"resolveEntities","summary":"A name spoken in a script, to a REAL photograph or logo that may be put on screen. For each `{ name, kind }` (1-10): the Wikidata item (kind-checked — a `person` must be a human), a freely licensed photo (people) or logo (companies/products) from Wikimedia Commons, with Brandfetch as the logo fallback when the server has a key, and the official website domain. Found pictures are STORED in the caller’s library (`assetId`), never offered by `/assets/search` and refused by `/assets/{id}/edit`. SEND CANONICAL NAMES: \"UPI\" resolves to a university, \"Unified Payments Interface\" to the payment system. `status: missing` is normal — show the name instead, never draw the person. `attributionRequired` pictures (CC BY*, GODL-India) must be credited; a logo is its owner’s trademark whatever its licence. WHAT LEAVES: the names to Wikidata/Commons, and a domain to Brandfetch.","tags":["assets"],"security":[{"clerkJwt":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveEntitiesRequest"}}}},"responses":{"200":{"description":"One entry per requested entity, in request order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveEntitiesResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Asset storage is not configured on this server (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/proxy/stock/resolve":{"get":{"operationId":"resolveStockLink","summary":"A FRESH media link for a Pixabay item, by the id at the end of its page URL (`attribution.source_url`). Pixabay image links expire and Toast caches search results for seven days, so a stored link can answer 4xx: call this, then fetch the returned link at once (it is temporary too - never store it). Only the id is sent to Pixabay. Pexels and Wikimedia links do not expire.","tags":["stock"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","enum":["pixabay"],"description":"Only Pixabay issues links that expire; Pexels and Wikimedia links are stable."},"required":true,"description":"Only Pixabay issues links that expire; Pexels and Wikimedia links are stable.","name":"provider","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,12}$","description":"The provider's item id. For Pixabay it is the number that ends the item's page URL (`attribution.source_url`, e.g. `https://pixabay.com/photos/peanut-butter-toast-684021/` -> `684021`)."},"required":true,"description":"The provider's item id. For Pixabay it is the number that ends the item's page URL (`attribution.source_url`, e.g. `https://pixabay.com/photos/peanut-butter-toast-684021/` -> `684021`).","name":"id","in":"query"},{"schema":{"type":"string","enum":["image","video"],"description":"Which Pixabay catalog the id belongs to."},"required":true,"description":"Which Pixabay catalog the id belongs to.","name":"media","in":"query"}],"responses":{"200":{"description":"A working link, and a thumbnail when Pixabay gives one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockResolveResponse"}}}},"400":{"description":"provider, id or media is missing or malformed (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Pixabay no longer has the item (`not_found`) - drop the clip.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"Pixabay did not answer (`ai_upstream_failed`) - retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/cards/catalog":{"get":{"operationId":"listCardCatalog","summary":"The cards that can be rendered: id, purpose, the slots each one takes and which are required. The SAME for every user. Fetch it rather than compiling a copy — adding a card is a data change on the server, and four clients with four hardcoded lists disagree the moment one ships. `attribution`, when non-null, is a credit the output MUST carry.","tags":["cards"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The catalog. Cache it for a session; it changes only when we deploy a card.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardCatalogResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The render service is not configured or not reachable (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/cards/captions":{"get":{"operationId":"listCaptionStyles","summary":"The HyperFrames CAPTION styles: id, title, the options each takes, and whether it is still a draft. The SAME for every user. A caption is not a card - it is drawn from the video’s timed words - so these are never in /cards/catalog. Draw one with POST /cards/render: its id as cardId, its options in slots, and the clip’s timed words in words.","tags":["cards"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The caption styles. Cache it for a session; it changes only when we deploy a style.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptionStylesResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The render service is not configured or not reachable (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/cards/previews/{file}":{"get":{"operationId":"getCardPreview","summary":"A card’s or caption style’s PREVIEW PICTURE (#1059): a 384x216 WebP drawn with example words. Public, no auth (Toast’s own artwork, the same for everyone), so an image view loads it directly. Use the `preview` path the catalog gives; its `r` changes when the card is redesigned. Cached a day.","tags":["cards"],"parameters":[{"schema":{"type":"string","description":"`<card id>.webp`, as in the catalog’s `preview`."},"required":true,"name":"file","in":"path"}],"responses":{"200":{"description":"The picture.","content":{"image/webp":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"No such card, or it has no preview (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The render service is not configured or not reachable (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/cards/render":{"post":{"operationId":"renderCards","summary":"Render premium graphics cards as TRANSPARENT CLIPS the client composites over its own footage — the video never leaves the device. ASYNC: returns 202 and a job id; track it through /jobs/*. `width`/`height` are the size of the CARD, not the frame — a client that sends the frame size gets a mostly-empty clip at about ten times the cost. Renders are content-addressed, so re-posting a batch costs only the cards that are new.","tags":["cards"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderCardsRequest"}}}},"responses":{"202":{"description":"Queued. The job’s `result` is a `RenderCardsResult`; a card that could not be drawn is `ok: false` on its own entry and does NOT fail the job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderCardsAccepted"}}}},"400":{"description":"A malformed card, naming its index and what was wrong — including an unknown `cardId` or an undeclared slot (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project for this caller (`not_found`). Another user’s project is indistinguishable from one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The render service is not configured or not reachable (`ai_upstream_failed`). Nothing was charged; retry is safe.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/scripts/understand":{"post":{"operationId":"understandScript","summary":"Sort a script DOCUMENT into the narration to speak, the direction the author already wrote, and the production furniture that is neither. Send the WHOLE document — the trimming is what you are asking for. THE ANSWER IS LINE SPANS, never rewritten text: every field points at 1-indexed lines of what you submitted, so the split can be shown against the user’s own file. COSTS MONEY on a cache miss (one LLM pass over the document); identical bytes are free for 7 days. Nothing here is applied — subjects, beats and the style note are OFFERED, to be passed on after the user agrees. Read `crossCheck` and stop when it disagrees.","tags":["scripts"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnderstandScriptRequest"}}}},"responses":{"200":{"description":"The split. `narration` is joined with \"\\n\" to be spoken, and that is load-bearing — a newline breaks a sentence in the alignment, so one span is one scene and one generated image. `statedRuntime` is read off the document deterministically, never by the model. NO TIMINGS: a 1:30 script is not 1:30 of audio, and every scene boundary comes from the alignment `POST /audio/speak` returns.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnderstandScriptResponse"}}}},"400":{"description":"Empty document, or past the 60,000-character cap (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The reading could not be made (`ai_upstream_failed`). Nothing is cached; retry is safe.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/voices":{"post":{"operationId":"createVoice","summary":"Record CONSENT to narrate in a voice: the recording (16 kHz mono 16-bit WAV, 45 s to 2 min, base64) and the attestation (\"my voice\" or \"I have the speaker’s permission\"). The server checks the recording (the same `checkVoiceSample` as `@toast/shared` — run it first to show the user the numbers), asks Scribe whether one person is speaking, and stores ONLY its sha256 fingerprint, the attestation and the numbers. TOAST DOES NOT KEEP THE RECORDING: keep it on the device and send it with every own-voice `/audio/speak`. The same bytes again return the existing profile (200).","tags":["audio"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVoiceRequest"}}}},"responses":{"200":{"description":"This exact recording was already consented; nothing new was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceProfile"}}}},"201":{"description":"The consent record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceProfile"}}}},"400":{"description":"The body, the WAV format, a failed sample check (its sentences in `message`), two speakers heard, or five live voices already (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Own voice is not enabled for this account; `GET /voices` says so in `enabled` (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"listVoices","summary":"The caller’s live voice profiles, newest first, and `enabled`: whether this account may use an own voice at all (a server-side allowlist while the speech plan is capped). Offer \"My voice\" only when it is true.","tags":["audio"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"Live profiles; deleted ones are not listed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceProfileList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/voices/{id}":{"delete":{"operationId":"deleteVoice","summary":"\"Delete my voice\". The profile can never speak again from this moment. Idempotent. No voice exists at ElevenLabs to delete — none outlives one request. Delete the recording on the device too.","tags":["audio"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Voice profile id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted (or already was).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteVoiceResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such voice for this caller (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/object-layers/access":{"get":{"operationId":"getObjectLayerAccess","summary":"Whether this account may use object layers: click a person or object in its video and attach a label that follows it. A server-side allow-list (`OBJECT_LAYER_USERS`). Offer the Objects mode only when `enabled` is true. Nothing about the video is sent: tracking runs on the device.","tags":["projects"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"Whether the Objects mode may be offered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectLayerAccess"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/object-layers/chat":{"post":{"operationId":"objectLabelChat","summary":"The object editor’s chat: what the user typed about the labels on their video becomes label edits (`label`, `hide`, `show`, `delete`, `place`), applied in order on the device. Send each label’s id, text and time window and, when an object is clicked and not yet labelled, its time as `pinned`; never a box, outline, track or frame. An op never names an id the request did not carry; `pinned` only with `label`. A model failure is 200 with `answered: false` and no ops. Needs the account on `OBJECT_LAYER_USERS` (403) and passes the AI spend gate (402 / 503). Stores nothing.","tags":["projects"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectLabelChatRequest"}}}},"responses":{"200":{"description":"The label edits and a reply for the user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectLabelChatResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"This account’s AI usage limit is reached (`user_quota_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"The account is not on the object editor’s allow-list (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The service is at capacity (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/access":{"get":{"operationId":"getFilmAccess","summary":"Whether to offer the AI video door to this account (`FILM_ENABLED` + the allow-list `FILM_USERS`), the modes, and the seconds each mode may ask for. Read it again on sign-in; the list changes without a release. Never 404.","tags":["projects"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"Whether Film may be offered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmAccess"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film":{"post":{"operationId":"createFilm","summary":"Start an AI video (`product`: 5–60 s, needs `rightsAttested: true`, the tick “This is my product, or I have the rights to show it”) or film (`story`: 15–600 s) from a brief. Answers the film in `draft`. Stores the brief and settings; sends nothing to anyone. Send an Idempotency-Key: a retry with the same key answers 200 with the film the first try made.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Any unique token per intended film (a uuid). Reuse it only to retry."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFilmRequest"}}}},"responses":{"200":{"description":"This Idempotency-Key was already used: the film it made.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"201":{"description":"Created, in draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"400":{"description":"The body: seconds out of range for the mode, or a product film without the rights tick (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"listFilms","summary":"The caller’s 50 newest films, newest first.","tags":["projects"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The films.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/{id}":{"get":{"operationId":"getFilm","summary":"One film: its settings, status, progress in plain words (`progress.words`, show as is) and its shot plan (null before one exists).","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The film.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteFilm","summary":"Delete the film and its plan. Permanent.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/{id}/plan":{"put":{"operationId":"putFilmPlan","summary":"Replace the shot plan with the user’s edit (every shot, in order; unique ids the client may mint; a spoken `line` needs a `speaker`; the first shot cannot continue a previous one). Answers the film with the plan at version + 1, `source: user`, status `planned`. Send `baseVersion` (the version you edited): an older one answers 409 `idempotency_conflict`, reload then edit. Once making has started the plan is fixed (409 `job_not_cancellable`). Sends nothing to anyone.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutFilmPlanRequest"}}}},"responses":{"200":{"description":"Saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"400":{"description":"The shots (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"A newer plan was saved since `baseVersion` (`idempotency_conflict`), or the film is already being made (`job_not_cancellable`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"operationId":"planFilm","summary":"Toast’s planner writes the shot list for a PRODUCT film (story films: not yet, 400): from the brief and the product AS WORDS read off its photos (name, description, label words, which sides), never a photo, to an AI model (OpenRouter, data collection denied). Lengths add up to the film’s; product shots are 2–8 s. REPLACES the stored plan (`source: toast`, version + 1) and drops every picture drawn for the old one. Needs a photo first (400). 502 `ai_upstream_failed` when no usable plan came back; nothing changed.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Planned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"400":{"description":"A story film, or no product photo yet (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"This account’s AI usage limit is reached (`user_quota_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Making has started (`job_not_cancellable`), or the film changed meanwhile (`idempotency_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"No usable plan came back (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The service is at capacity (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/{id}/photos":{"post":{"operationId":"addFilmPhoto","summary":"Add a photo of the product to a product film (up to 5; while draft or planned). THE BODY IS THE PHOTO: raw `image/jpeg`, `image/png` or `image/webp`, up to 12 MB, no JSON. Toast stores it privately and an AI model (through OpenRouter, data collection denied) checks whether a person shows (any part of one: refused, deleted, 400 with a sentence to show) and reads the product, which side this is, the label’s words exactly as printed and where the label is; the label is cut out on Toast’s own server as the reference for the label check. A photo that could not be checked is deleted and answers 502 `ai_upstream_failed` (try again). The same photo twice answers 200 with nothing new. Answers the film with `product` (name, description, merged `labelWords`, `photos`). The photo is never sent to an image or video model here.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","description":"The photo itself (JPEG, PNG or WebP, up to 12 MB).","format":"binary"}},"image/png":{"schema":{"type":"string","description":"The photo itself (JPEG, PNG or WebP, up to 12 MB).","format":"binary"}},"image/webp":{"schema":{"type":"string","description":"The photo itself (JPEG, PNG or WebP, up to 12 MB).","format":"binary"}}}},"responses":{"200":{"description":"This photo is already in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"201":{"description":"Added and read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"400":{"description":"Not a photo, a sixth photo, a story film, or refused for what it shows (`invalid_input`; `error.message` says why, for a person).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Making has started (`job_not_cancellable`), or the film changed meanwhile (`idempotency_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The photo could not be checked; nothing was kept (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/{id}/photos/{assetId}":{"delete":{"operationId":"removeFilmPhoto","summary":"Remove one photo from a product film; the photo and its label crop are deleted. Answers the film (`product` is null once no photo is left).","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"The photo’s asset id, from `product.photos[].assetId`."},"required":true,"name":"assetId","in":"path"}],"responses":{"200":{"description":"Removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Making has started (`job_not_cancellable`), or the film changed meanwhile (`idempotency_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/{id}/keyframes":{"post":{"operationId":"drawFilmKeyframes","summary":"Draw each shot’s OPENING PICTURE, with the product in it: an AI image model (ByteDance’s Seedream, through Replicate) is given expiring links to the film’s product photos and a prompt built only from the shot’s words and the product as words. No `shotIds`: every shot with no picture. With `shotIds`: redraw those (each shot at most 3 draws in all; edit its words to start afresh). Up to 4 at a time; a request may take about a minute. A redraw replaces and deletes the old picture and clears its approval. Answers the film with `keyframes` in plan order and `progress.words` naming any that failed; 502 when none could be drawn.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrawFilmKeyframesRequest"}}}},"responses":{"200":{"description":"Drawn (see `progress.words` for any that failed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"400":{"description":"No plan or no photo yet, an unknown shot, or a fourth draw (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"This account’s AI usage limit is reached (`user_quota_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Making has started (`job_not_cancellable`), or the film changed meanwhile (`idempotency_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"No picture could be drawn (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The service is at capacity (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/{id}/keyframes/approve":{"post":{"operationId":"approveFilmKeyframes","summary":"Approve the pictures of these shots (`shotIds` absent = all). Make uses only approved pictures. A redraw or a plan edit that changes a shot’s words clears its approval.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveFilmKeyframesRequest"}}}},"responses":{"200":{"description":"Approved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"400":{"description":"No pictures yet (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The film changed meanwhile (`idempotency_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/{id}/characters/sheets":{"post":{"operationId":"drawFilmCharacters","summary":"AN AI DRAMA (P2.2): draw each character of the planned cast in four views (front, three-quarter, profile, full body) from its description, for the user to approve; then every shot they are in uses the sheet. `names` absent = every character; `views` given = redraw those views (at most 3 draws a view). A redraw clears the approval. Off until the privacy page carries sentence D2 (400 until then). Takes up to about a minute.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrawFilmCharactersRequest"}}}},"responses":{"200":{"description":"The film with the characters drawn (`cast.characters[].sheet`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"400":{"description":"Not an AI drama, not yet available, no plan yet, an unknown name or too many draws (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Already being made, or the film changed meanwhile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"Nothing could be drawn just now (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/{id}/characters/approve":{"post":{"operationId":"approveFilmCharacters","summary":"Approve the character sheets (`names` absent = every character whose four views are drawn).","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveFilmCharactersRequest"}}}},"responses":{"200":{"description":"Approved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"400":{"description":"No characters yet (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The film changed meanwhile (`idempotency_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/{id}/estimate":{"post":{"operationId":"estimateFilm","summary":"THE PRICE BEFORE MAKE for the stored plan: per shot the video model tried first (quality first, Kling 4 as the escalation; only models Toast can call today), its price, the expected cost of a kept clip (price ÷ measured pass rate) and its ceiling (3× the first try); the sum (`costUsd`, what the price is built from) and the worst case (`worstUsd`, past the price is Toast’s). `wallet` = the price in the user’s currency (cost × 1.30, at least US$4) against their balance, null while the wallet is off. `unroutable` shots must change before Make. Writes nothing.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The estimate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmEstimateResponse"}}}},"400":{"description":"No plan yet (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/{id}/make":{"post":{"operationId":"makeFilm","summary":"MAKE: every approved keyframe becomes a clip on the video model that does that shot best (Kling 4 or Omni 1.2 via Replicate), each checked in code (the label read by OCR on Toast’s own worker; a garbled label is made again) and retried under the shot’s 3× ceiling. Needs every shot’s picture approved (400) and an Idempotency-Key (400): a retry with the same key answers 200 with the same make, never a second paid one. With the wallet on, holds the estimate’s price (402 `user_quota_exhausted` with a `wallet` quote when the balance cannot cover it); settles when the make finishes at what the READY shots cost × 1.30 (at least US$4), failed shots never charged, nothing made = nothing charged. Answers 202 with the film `making`; poll GET /film/{id} (Retry-After) for `make.shots[]` and `progress.words`. Sends each shot’s keyframe (an expiring link) and Toast’s shot words to the video model; never the brief, a photo or audio.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Required: a unique token per intended make (a uuid). Reuse it only to retry."},"required":true,"name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"This Idempotency-Key already started this make.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"202":{"description":"Making.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"400":{"description":"No Idempotency-Key, a story film, pictures not all approved, or a shot no model can make (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"The wallet cannot cover the price (`user_quota_exhausted`, with a `wallet` quote).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Already being made (`plan_in_progress`), or the film changed meanwhile (`idempotency_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The service is at capacity (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/{id}/assemble":{"post":{"operationId":"assembleFilm","summary":"Put a finished make’s READY clips together again into one video (after a failure; a make does this by itself when it finishes): on Toast’s own renderer, in plan order, a CC BY music bed (credit in `video.musicCredit`), at 1080 px. Answers 202 with the film `making`; poll GET /film/{id} until `video` is set and the status is `ready`. Sends nothing to a third party.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"202":{"description":"Putting it together.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"400":{"description":"No made shot to put together (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The film was stopped (`job_not_cancellable`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/{id}/shapes":{"post":{"operationId":"createFilmShape","summary":"The same film in another shape, MADE AGAIN (its own pictures, clips and video; never a crop of the first), after the first video is finished. Answers a new film (`shapeOf` = the original, status `planned`) with the original’s photos and shots, which cannot change on it; then draw its pictures, approve, estimate and Make as for any film. Priced at its real cost × 1.30 with NO second US$4 minimum (once per film). Asked on a shape, the original is used. A shape the film already has answers that film with 200, so a retry never makes a second. Its shapes are listed in each family member’s `shapes`; GET /film lists originals only. Deleting the original deletes its shapes.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFilmShapeRequest"}}}},"responses":{"200":{"description":"The film already has this shape: that film.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"201":{"description":"The new shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"400":{"description":"Not a product film, no finished video yet, the shape it already is, or a bad shape (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/{id}/post-text":{"post":{"operationId":"writeFilmPostText","summary":"POST TEXT for a finished film: per platform asked, a title, a caption and hashtags within that platform’s limits, written by an AI model from the film’s own words (its brief, the product as read off its photos, and each shot’s description; the body carries none of them). Every `full` ends with the AI-generation disclosure and the music’s credit, put in by Toast. Sent only when the user asks (through OpenRouter, `data_collection: deny`); free; nothing kept. Each call writes anew.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmPostTextRequest"}}}},"responses":{"200":{"description":"One text per platform asked, in the order asked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostTextResponse"}}}},"400":{"description":"No finished video yet, or a bad body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The model gave nothing usable (`ai_upstream_failed`); nothing kept, a retry is safe.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/{id}/cancel":{"post":{"operationId":"cancelFilm","summary":"Stop the film (from draft, planned, keyframes or making). Answers it `cancelled`.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The film’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Cancelled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such film for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Already ready, failed or cancelled (`job_not_cancellable`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/series":{"post":{"operationId":"createFilmSeries","summary":"Start an AI drama series from a premise: a title, 2–20 episodes of 60–600 s each, shape, look and language. Answers the series in `draft` with no bible. Stores the premise and settings; sends nothing to anyone. Send an Idempotency-Key: a retry with the same key answers 200 with the series the first try made.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Any unique token per intended series (a uuid). Reuse it only to retry."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFilmSeriesRequest"}}}},"responses":{"200":{"description":"This Idempotency-Key was already used: the series it made.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmSeriesResponse"}}}},"201":{"description":"Created, in draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmSeriesResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"listFilmSeries","summary":"The caller’s 50 newest series, newest first.","tags":["projects"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The series.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmSeriesList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/series/{id}":{"get":{"operationId":"getFilmSeries","summary":"One series: its settings, `activity` (a sentence to show as is), its bible (null before one exists) and the episodes made so far.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The series’ id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The series.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmSeriesResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteFilmSeries","summary":"Delete the series, its episodes and every picture of both. Permanent.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The series’ id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/series/{id}/bible":{"post":{"operationId":"planFilmSeriesBible","summary":"Toast writes the series bible from the premise: the arc, one line per episode, rules every episode keeps, the cast (looks, voice, how each acts in silence), the places and the usual setting. Replaces any bible (its pictures are dropped). The premise and settings go to an AI model through OpenRouter (data collection denied). 502 `ai_upstream_failed`: nothing kept, a retry is safe.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The series’ id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Planned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmSeriesResponse"}}}},"400":{"description":"Toast is not writing series bibles on this server right now (`invalid_input`); write it with PUT instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The series changed meanwhile (`idempotency_conflict`): reload, then try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The AI model failed or answered nothing usable (`ai_upstream_failed`). Nothing was kept.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"operationId":"putFilmSeriesBible","summary":"Replace the bible with the user’s edit (every character, place, rule and outline line). A character or place keeps its drawn pictures while its description is unchanged; any change takes its approval away. Send `baseVersion` (the version you edited): an older one answers 409 `idempotency_conflict`. Sends nothing to anyone.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The series’ id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutFilmSeriesBibleRequest"}}}},"responses":{"200":{"description":"Saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmSeriesResponse"}}}},"400":{"description":"The bible (`invalid_input`): repeated names, or an outline line past the series’ episodes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"A newer bible was saved since `baseVersion` (`idempotency_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/series/{id}/characters/sheets":{"post":{"operationId":"drawFilmSeriesCharacters","summary":"Draw the views (front, three-quarter, profile, full body) each character of the bible lacks (`names` absent = all), or redraw `views`; at most 3 draws a view. The face views are cut to the head and shoulders on Toast’s side. A prompt from the character’s description, the view and the look goes to an AI image model; no photo of anyone. A redrawn character must be approved again. 400 with no bible or an unknown name; 502 `ai_upstream_failed` when nothing could be drawn (try again).","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The series’ id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrawFilmCharactersRequest"}}}},"responses":{"200":{"description":"Drawn; `bible.cast[].sheet` has the pictures (GET /assets/{assetId}/bytes).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmSeriesResponse"}}}},"400":{"description":"No bible, an unknown name, or a view drawn 3 times already (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The series changed while drawing (`idempotency_conflict`): reload, then draw again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"Nothing could be drawn (`ai_upstream_failed`). Nothing was kept.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/series/{id}/characters/upload":{"post":{"operationId":"uploadFilmSeriesCharacter","summary":"Make a bible character from the user’s OWN picture: a drawing or a picture made with AI. THE BODY IS THE PICTURE: raw `image/jpeg`, `image/png` or `image/webp`, up to 12 MB, no JSON; `name` says which character. Toast stores it privately and an AI model (through OpenRouter, data collection denied) checks it once: a photo of a real person, a child or a known character from a film, show or game is refused (400 with a sentence to show) and deleted. An accepted picture is sent to an AI image model to draw the four views; the character’s description becomes the picture’s and it must be approved again. 502 `ai_upstream_failed`: could not check or draw just now (try again).","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The series’ id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"The bible character this picture is."},"required":true,"name":"name","in":"query"}],"requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Checked and drawn; `bible.cast[].sheet` has the views, `uploadAssetId` the picture.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmSeriesResponse"}}}},"400":{"description":"Refused (a real person’s photo, a child, a known character), not an image, or no such character (`invalid_input`). Show `error.message` as is.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The series changed meanwhile (`idempotency_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The picture could not be checked or drawn just now (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/series/{id}/characters/approve":{"post":{"operationId":"approveFilmSeriesCharacters","summary":"Approve these characters’ sheets (`names` absent = every character with all four views). Every episode’s pictures and clips of an approved character use its sheet. Sends nothing to anyone.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The series’ id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveFilmCharactersRequest"}}}},"responses":{"200":{"description":"Approved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmSeriesResponse"}}}},"400":{"description":"No characters yet (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The series changed meanwhile (`idempotency_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/series/{id}/places/pictures":{"post":{"operationId":"drawFilmSeriesPlaces","summary":"Draw an establishing picture of each place of the bible without one (`names` absent), or redraw `names`; at most 3 draws a place. A prompt from the place’s description, the series’ setting and its look goes to an AI image model, in the series’ shape. A redrawn place must be approved again. 400 with no places or an unknown name; 502 `ai_upstream_failed` when nothing could be drawn.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The series’ id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrawFilmSeriesPlacesRequest"}}}},"responses":{"200":{"description":"Drawn; `bible.places[].assetId` is the picture.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmSeriesResponse"}}}},"400":{"description":"No places, an unknown name, or a place drawn 3 times already (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The series changed while drawing (`idempotency_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"Nothing could be drawn (`ai_upstream_failed`). Nothing was kept.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/series/{id}/places/approve":{"post":{"operationId":"approveFilmSeriesPlaces","summary":"Approve these places’ pictures (`names` absent = every place with a picture). Sends nothing to anyone.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The series’ id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveFilmSeriesPlacesRequest"}}}},"responses":{"200":{"description":"Approved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmSeriesResponse"}}}},"400":{"description":"No places yet (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The series changed meanwhile (`idempotency_conflict`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/film/series/{id}/episodes":{"post":{"operationId":"createFilmSeriesEpisode","summary":"Make episode `episode` of the series: a story film (`/film/{id}`) whose brief is the bible’s line for it and the story so far, carrying the series’ approved cast (with their sheets) and approved places. Every character must be approved first. Then the film’s usual steps: plan (against the fixed cast and places), keyframes (each place’s picture a reference), estimate, Make. Answers the series with the episode in `episodes`; the same number again answers 200 with nothing new. Sends nothing to anyone.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The series’ id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFilmSeriesEpisodeRequest"}}}},"responses":{"200":{"description":"That episode was already made.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmSeriesResponse"}}}},"201":{"description":"Made; its film is in `episodes`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilmSeriesResponse"}}}},"400":{"description":"No bible, a character not yet approved, or a number past the series (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or Film is switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/object-layers/removals":{"get":{"operationId":"listObjectRemovals","summary":"The caller’s last 20 removals, newest first, to come back to one that is running or ready to check.","tags":["projects"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The removals.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectRemovalList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such removal for this caller, or removal is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"operationId":"createObjectRemoval","summary":"Start removing one person from a video of up to 5 minutes, every trace of them (body, shadow, reflection, a hand reaching in). THE WHOLE VIDEO IS UPLOADED to Toast’s private storage (only through this route, only after the user presses Remove and ticks attest). Send the file’s size, type and length (over 5 minutes or 8 GB is refused before upload) and the click (seconds + up to 8 [x, y] points in the video’s pixels). Answers the part links (12 h): PUT each part, keep each ETag, then POST …/complete.","tags":["projects"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateObjectRemovalRequest"}}}},"responses":{"201":{"description":"Created, uploading, with the part links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectRemovalUploadResponse"}}}},"400":{"description":"The body, not a video, or over 5 minutes / 8 GB (invalid_input).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not remove people yet; GET /object-layers/access says so (forbidden).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such removal for this caller, or removal is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"File storage is not configured on this server (internal).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/object-layers/removals/{id}":{"get":{"operationId":"getObjectRemoval","summary":"The removal: status, activity (plain words) and progress while it runs (Retry-After: 5; ~35 minutes for 5 minutes of video), then per camera position the check card (the shot with everything taken out outlined in red beside the result) and the emptySet the image model painted, price, and once applied the finished video (result, 1 h link).","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The removal’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The removal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectRemovalResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such removal for this caller, or removal is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"updateObjectRemoval","summary":"While ready: per camera, choice leave (its shots stay as they are), choice remove, or redo true (paint its empty set again; at most 3 times). A change makes the video again (another round, ~15 minutes, painting/composing); poll GET. Sending nothing new answers 200.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The removal’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateObjectRemovalRequest"}}}},"responses":{"200":{"description":"Nothing changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectRemovalResponse"}}}},"202":{"description":"Another round started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectRemovalResponse"}}}},"400":{"description":"Not ready, an unknown camera, or no redos left (invalid_input).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such removal for this caller, or removal is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteObjectRemoval","summary":"Delete the removal, the uploaded video and everything made from it; a running job is stopped and an unapplied hold given back. Everything also goes by itself 7 days after the removal. Permanent.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The removal’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such removal for this caller, or removal is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/object-layers/removals/{id}/upload":{"post":{"operationId":"refreshObjectRemovalUpload","summary":"Fresh part links (12 h) while the video is still uploading.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The removal’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The removal and its part links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectRemovalUploadResponse"}}}},"400":{"description":"Not uploading (invalid_input).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not remove people yet; GET /object-layers/access says so (forbidden).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such removal for this caller, or removal is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/object-layers/removals/{id}/complete":{"post":{"operationId":"completeObjectRemovalUpload","summary":"Join the uploaded parts (every part once, with its ETag). A stored size that is not the size sent discards the upload (400; start again). Answers uploaded: then POST …/start.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The removal’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteObjectRemovalUploadRequest"}}}},"responses":{"200":{"description":"The removal, now uploaded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectRemovalResponse"}}}},"400":{"description":"A part missing, or the wrong size (invalid_input).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such removal for this caller, or removal is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/object-layers/removals/{id}/start":{"post":{"operationId":"startObjectRemoval","summary":"Start the removal on Toast’s GPU worker. Idempotency-Key REQUIRED; send {}. With the wallet on it HOLDS the estimate (Toast’s cost × 1.5, plus the wallet’s buffer); apply charges what it really cost × 1.5; failed or deleted before apply = nothing charged. At most 10 starts a day. WHAT LEAVES: the video is processed on GPU servers Toast rents (Modal); ONE frame per camera position the person is in, with the area to clear, goes to Google’s image model through Replicate to paint what was behind them. Poll GET.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The removal’s id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A fresh token per removal you mean to start."},"required":true,"name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The same start again, or already running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectRemovalResponse"}}}},"202":{"description":"Started (queued).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectRemovalResponse"}}}},"400":{"description":"No Idempotency-Key, or not uploaded (invalid_input).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"The wallet cannot cover it (user_quota_exhausted, with the quote).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not remove people yet; GET /object-layers/access says so (forbidden).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such removal for this caller, or removal is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"The removal worker is not configured on this server (internal).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/object-layers/removals/{id}/apply":{"post":{"operationId":"applyObjectRemoval","summary":"Accept the finished video: charges what it cost (with the wallet on) and answers applied with result, a 1 h link to the video (at most 1920 px on its long side, H.264, the original sound). Download it to the device; the original stays. Idempotent; send {}.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The removal’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Applied, with the result link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectRemovalResponse"}}}},"400":{"description":"Not ready (invalid_input).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such removal for this caller, or removal is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/voices":{"get":{"operationId":"listMotionVoices","summary":"`enabled`: whether this account may start motion jobs (a server-side allow-list while the engine has no price), and the STOCK narrators it may pick. Offer the engine only when `enabled` is true. A user’s own voice is not offered here.","tags":["motion"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"Whether the engine is available, and the voices.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionVoiceList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"The motion engine is switched off on this server (`not_found`): treat it as absent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/lexicon":{"get":{"operationId":"getMotionLexicon","summary":"How the user said their names and brands should be SPOKEN (#1856): `term` as written, `say` how the narrator says it (\"Hatke\" -> \"Hut-kay\"). Oldest first.","tags":["motion"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionLexicon"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"The motion engine is switched off on this server (`not_found`): treat it as absent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"operationId":"setMotionLexicon","summary":"Replace the WHOLE list (at most 50, a term once). Every later motion job says each term as `say`: the respelling goes to ElevenLabs in place of the word, captions and the screen keep the term. A running job keeps the list it started with.","tags":["motion"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionLexicon"}}}},"responses":{"200":{"description":"The list as stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionLexicon"}}}},"400":{"description":"`invalid_input`: too many, too long, or a term twice."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"`forbidden`: this account may not make motion videos."},"404":{"description":"The motion engine is switched off on this server (`not_found`): treat it as absent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/lexicon/say":{"post":{"operationId":"sayMotionName","summary":"HEAR A NAME before any video (#1856): `text` (a name as written, or how the user typed it should be said) spoken once in a stock narrator voice (the default unless `voiceId`), returned as MP3. The text goes to ElevenLabs; NOTHING IS KEPT (no cache, no row, no object). Metered as speech, never charged. 20 a minute.","tags":["motion"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SayMotionName"}}}},"responses":{"200":{"description":"The spoken name, MP3.","content":{"audio/mpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"`invalid_input`: empty or too long, or not a stock voice."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"`forbidden`: this account may not make motion videos."},"404":{"description":"The motion engine is switched off on this server (`not_found`): treat it as absent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The speech service failed (`ai_upstream_failed`). Try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/jobs":{"post":{"operationId":"createMotionJob","summary":"Start one agent-made motion video from the user’s BRIEF. REQUIRES an Idempotency-Key: a retry with the same key returns the same job (200) and never starts or bills a second run. `direction` is `you-pick` (default: the agent writes three directions and a blind picker chooses; offer this FIRST) or a card of a finished pitch (`{ kind: card, pitchId, card }`), accepted only with the brief the pitch was made from (same request, format, length, language). The request, the user’s looks ledger (looks, directions written, opening lines), the chosen card, the narration and rendered frames go to Anthropic (Claude API); the narration to ElevenLabs; a few music search words to Jamendo. NEVER video: nothing here can carry a file. Poll GET /motion/jobs/{id}.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Any unique token per intended job (a uuid). Reuse it only to retry."},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMotionJobRequest"}}}},"responses":{"200":{"description":"This Idempotency-Key was already used: the same job, in whatever state it is.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobResponse"}}}},"202":{"description":"Started.","headers":{"Retry-After":{"description":"Seconds to wait before polling again. PRESENT while queued/running, ABSENT once the job is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobResponse"}}}},"400":{"description":"The body, a missing Idempotency-Key (or one already used for a pitch), a voice that is not a stock voice, or a card this brief cannot use (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"This video costs more minutes than the balance holds (`user_quota_exhausted`, only while the price is switched on). Nothing was created or spent. Show a buy prompt for `creditsToBuy` credits; `error` is a sentence for a person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionCreditRefusal"}}}},"403":{"description":"This account may not start motion jobs yet; `GET /motion/voices` says so in `enabled` (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"The motion engine is switched off on this server (`not_found`): treat it as absent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The platform’s monthly spend cap is reached (`platform_budget_exhausted`). Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"listMotionJobs","summary":"The caller’s 50 newest motion jobs, newest first, without links (fetch one job for those).","tags":["motion"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The jobs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"The motion engine is switched off on this server (`not_found`): treat it as absent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/jobs/{id}":{"get":{"operationId":"getMotionJob","summary":"One motion job. Jobs take 45–90 minutes: honour `Retry-After` (absent once finished). A finished job carries 1-hour links to the MP4 and a contact sheet (fetch again for fresh ones), the two automatic quality checks (`checks.pass: false` is still a video), and `musicCredits`, which MUST be shown wherever the video is published. While it runs it carries a LIVE FEED: `step` (what the studio is doing now, in plain words written by the server), `stepAt` (run a clock from it), `stepPatience`, `activity` (the newest 60 steps, each with its own `text`) and `progress` (an estimate that never goes backwards). Show the feed, not only the number, and use the server's words as they are.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion job id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The job.","headers":{"Retry-After":{"description":"Seconds to wait before polling again. PRESENT while queued/running, ABSENT once the job is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such job for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteMotionJob","summary":"Delete a finished motion video for good (#1314): the video, every publishing kit made for it, the looks, directions and opening line they added to the user's ledger, and every stored file (MP4, frames, captions, kit thumbnails). The pitch it was built from is kept. A video still being made (or whose kit is) is refused: cancel it first. If a file cannot be deleted the video stays listed, so a retry is always safe; a retry after success answers 404.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion job id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"400":{"description":"The video or its kit is still being made: cancel it first (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video for this caller (or already deleted), or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/jobs/{id}/cancel":{"post":{"operationId":"cancelMotionJob","summary":"Cancel a queued or running job: the spend bound. Idempotent (already cancelled = 200, same body). What a running job had already spent is still metered.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion job id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Cancelled (or already was).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such job for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The job already finished (`job_not_cancellable`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/jobs/{id}/answer":{"post":{"operationId":"answerMotionQuestion","summary":"Answer the running video’s `question` (#1856, PAUSE TO ASK): the narrator was not sure how to say a name and the build waits a few minutes for the person. `say` is how it sounds (saved to their lexicon, as PUT /motion/lexicon would, and used by this video from now on); null = the narrator’s way is fine. Show the question while `job.question` is set; it goes away by itself after `waitS` seconds.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion job id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerMotionQuestion"}}}},"responses":{"200":{"description":"Answered: the job, its question gone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobResponse"}}}},"400":{"description":"A bad body, or Toast is not asking about that name now: the job finished or the wait ran out and the build went on (`invalid_input`). Drop the question.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video being made for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/jobs/{id}/poster":{"put":{"operationId":"chooseMotionPoster","summary":"Choose which of the video's frames (`posterChoices[].n`, 1-8) is its thumbnail. Free. The answer is the job with `thumbnail`, `posterChoice` and `links.poster` on that frame (the list and GET /library show it too).","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion job id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"n":{"type":"integer","minimum":1,"maximum":8}},"required":["n"]}}}},"responses":{"200":{"description":"The job, with its new thumbnail.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobResponse"}}}},"400":{"description":"`n` is not one of this video's frames, or it has none yet (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such job for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/jobs/{id}/posters":{"post":{"operationId":"backfillMotionPosters","summary":"Give a video made before thumbnails existed (a done job with `thumbnail: null`) its 8 strongest frames and its captions file. Toast's own motion runner picks the frames from the stored MP4 (no agent, no money, nothing leaves Toast) and the .srt is built from the narration timings. IDEMPOTENT: a video that already has them answers at once. Synchronous, about 10-60 seconds; call it once.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion job id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The job, with `thumbnail`, `posterChoices` and (when it has narration) `links.captions`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobResponse"}}}},"400":{"description":"The job is not finished or has no video (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such job for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The runner could not choose frames (`ai_upstream_failed`). With `Retry-After`, it was busy with another video: try again then.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/jobs/{id}/reshape":{"post":{"operationId":"reshapeMotionJob","summary":"Make THE SAME VIDEO IN ANOTHER SHAPE (9:16 for Shorts, Reels and TikTok; 1:1 for a feed; or 16:9): the finished video's own project, kept since s95 (`reshapable: true`), is laid out again for the new frame and rendered. Same words, narration, timings, music and look; nothing is spoken or fetched again. The answer is a NEW job (`shapeOf` = this id): poll GET /motion/jobs/{newId}; it is also listed in this video's `shapes`. ONE per shape: a second order for a shape already made or being made returns that job (200), whatever its key; a failed or cancelled one may be ordered again. REQUIRES an Idempotency-Key. About 10-30 minutes; metered, at most US$3 (`usdSoFar`). The video's request, the project Toast's agent wrote (with the narration text in it) and frames of the new render go to Anthropic (Claude API); its audio never leaves Toast's runner. A video made before s95 answers 400: make a new video in that shape instead.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion job id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Required. Reuse only to retry the same order."},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","enum":["16:9","9:16","1:1"]}},"required":["format"]}}}},"responses":{"200":{"description":"That shape is already made or being made, or this Idempotency-Key was already used: that job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobResponse"}}}},"202":{"description":"Started: the new shape's job.","headers":{"Retry-After":{"description":"Seconds to wait before polling again. PRESENT while queued/running, ABSENT once the job is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobResponse"}}}},"400":{"description":"The format (16:9, 9:16 or 1:1, not the video's own), a missing Idempotency-Key, a video not finished, or one whose project was not kept (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"Another shape costs more minutes than the balance holds (`user_quota_exhausted`, only while the price is switched on). Nothing was created or spent. Show a buy prompt for `creditsToBuy` credits; `error` is a sentence for a person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionCreditRefusal"}}}},"403":{"description":"This account may not use the motion engine yet (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The platform's monthly spend cap is reached (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/jobs/{id}/edit":{"post":{"operationId":"editMotionJob","summary":"CHANGE ONE SCENE of a finished video (`editable: true`): the person stops the video at `atS` and says what to change (`note`); Toast changes the scene on screen at that time and puts back ONLY that scene's seconds (plus half a second each side for its transitions), frame for frame, into the video they have. Everything else stays exactly as it was. `{id}` is the version being watched: the original or an earlier edit. The answer is a NEW version (`editOf` = the original's id, `edit` = the order): poll GET /motion/jobs/{newId}; the original lists it in `edits`, and earlier versions are kept (that is the undo). A change whose seams would show is not delivered and costs nothing. REQUIRES an Idempotency-Key. Minutes; metered, at most US$2. The note, the video's project (the composition Toast's agent wrote, with the narration text in it), the frame stopped at and frames of the new render go to Anthropic (Claude API); a changed narration line goes to ElevenLabs. A video made before edits existed answers 400.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion job id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Required. Reuse only to retry the same change."},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"atS":{"type":"number","minimum":0,"maximum":600},"note":{"type":"string","minLength":3,"maxLength":1000},"also":{"type":"array","items":{"type":"object","properties":{"atS":{"type":"number","minimum":0,"maximum":600},"note":{"type":"string","minLength":3,"maxLength":1000}},"required":["atS","note"]},"minItems":1,"maxItems":4},"material":{"type":"object","properties":{"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"use":{"type":"string","enum":["as-is","styled"],"default":"as-is"},"note":{"type":"string","maxLength":200}},"required":["id"]},"minItems":1,"maxItems":3}},"required":["images"]},"wordsOnly":{"type":"boolean","enum":[true]}},"required":["atS","note"]}}}},"responses":{"200":{"description":"This Idempotency-Key was already used: that version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobResponse"}}}},"202":{"description":"Started: the new version's job.","headers":{"Retry-After":{"description":"Seconds to wait before polling again. PRESENT while queued/running, ABSENT once the job is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobResponse"}}}},"400":{"description":"A note of 3-1000 characters, a time inside the video, an Idempotency-Key, a finished video, and one whose project and narration timings were kept (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"A change to this video costs more minutes than the balance holds (`user_quota_exhausted`, only while the price is switched on). Nothing was created or spent. Show a buy prompt for `creditsToBuy` credits; `error` is a sentence for a person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionCreditRefusal"}}}},"403":{"description":"This account may not use the motion engine yet (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The platform's monthly spend cap is reached (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/jobs/{id}/lines":{"get":{"operationId":"getMotionJobLines","summary":"What the narrator says in a finished version, line by line (`atS` = where the line starts). A words-only change (`wordsOnly` on POST /motion/jobs/{id}/edit) replaces the WHOLE line at its time, and a line may be two sentences that the captions show as two cues: fill the box with the line text before the person edits it. Reads stored files only.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion job id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The lines, in order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobLines"}}}},"400":{"description":"The video is not finished, or its project and line timings were not kept (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not use the motion engine yet (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/heroes":{"post":{"operationId":"createMotionHero","summary":"Make a HERO MOMENT for one beat of a talking-head or faceless project: ONE short animated graphic (a number that counts up, a word that lands, a chart that draws) with NO BACKGROUND, exactly `durationS` long, which the client lays over its video, full frame, at the beat's start. Opt-in per beat: show POST /motion/estimate with `stage: 'hero'` first. Over a speaker the face zone is kept clear. Toast checks the clip in code (length, size, transparency, the face zone); one that fails is not delivered and costs nothing. REQUIRES an Idempotency-Key. Minutes, or on the wallet its measured cost x 1.30; at most US$2. The beat's words, its length, the shape, what it plays over and the video's look in words go to Anthropic (Claude API); never a frame of the video. Poll GET /motion/heroes/{id}. A PROPERTY VIDEO's moment (#1751): `property` in place of `projectId` (a planned video of the caller's; `format` must be the video's shape; at most 3 a video); Toast lays it over the video when it is made (POST /properties/{id}/videos/{vid}/render): `hook` opens it, `price` plays with the price, `at` at `atMs`, kept clear of faces. Its words go to Anthropic as above; never a picture or the footage.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Required. Reuse only to retry the same moment."},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid"},"property":{"type":"object","properties":{"propertyId":{"type":"string","minLength":1,"maxLength":64},"videoId":{"type":"string","minLength":1,"maxLength":64},"kind":{"type":"string","enum":["hook","price","at","highlight"]},"atMs":{"type":"integer","minimum":0,"maximum":600000},"shot":{"type":"integer","minimum":0,"maximum":500}},"required":["propertyId","videoId","kind"]},"format":{"type":"string","enum":["16:9","9:16","1:1"]},"words":{"type":"string","minLength":1,"maxLength":600},"durationS":{"type":"number","minimum":2,"maximum":8},"over":{"type":"string","enum":["speaker","picture"]},"look":{"type":"string","maxLength":1500}},"required":["format","words","durationS","over"]}}}},"responses":{"200":{"description":"This Idempotency-Key was already used: that moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionHeroResponse"}}}},"202":{"description":"Started.","headers":{"Retry-After":{"description":"Seconds to wait before polling again. PRESENT while queued/running, ABSENT once the job is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionHeroResponse"}}}},"400":{"description":"The body, or a missing Idempotency-Key (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"This hero moment costs more minutes than the balance holds (`user_quota_exhausted`, only while the price is switched on). Nothing was created or spent. Show a buy prompt for `creditsToBuy` credits; `error` is a sentence for a person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionCreditRefusal"}}}},"403":{"description":"This account may not use the motion engine yet (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such project (or property video) for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The platform's monthly spend cap is reached (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"listMotionHeroes","summary":"A PROPERTY VIDEO's hero moments (#1751), oldest first (at most 20; cancelled and failed ones left out), to show beside the video and poll while one is made (Retry-After).","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"videoId","in":"query"}],"responses":{"200":{"description":"The moments.","headers":{"Retry-After":{"description":"Seconds to wait before polling again. PRESENT while queued/running, ABSENT once the job is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionHeroList"}}}},"400":{"description":"No `videoId` (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"The engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/heroes/{id}":{"get":{"operationId":"getMotionHero","summary":"A hero moment: its status and, once done, `links.clip` (a 1-hour link to the WebM, VP9 with alpha) and `links.sheet` (its frames over a checkerboard). `checks.pass: false` = not delivered, and `checks.problems` says why. Poll while queued or running (Retry-After).","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The hero moment's id (`hero.id`)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The hero moment.","headers":{"Retry-After":{"description":"Seconds to wait before polling again. PRESENT while queued/running, ABSENT once the job is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionHeroResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such hero moment for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteMotionHero","summary":"Delete a FINISHED hero moment: its clip, its check and the moment itself. A property video made again no longer carries it. One still being made: cancel it first (409). Nothing comes back: a delivered moment was paid for.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The hero moment's id (`hero.id`)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such hero moment for this caller (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"It is still being made (`plan_in_progress`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/heroes/{id}/clip":{"get":{"operationId":"getMotionHeroClip","summary":"A finished hero moment's clip as BYTES (video/webm, VP9 with alpha), from the API's own origin. For a browser that draws the clip on a canvas, where a cross-origin read of `links.clip` would taint it; a native client may download `links.clip` instead.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The hero moment's id (`hero.id`)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The WebM.","content":{"video/webm":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such hero moment for this caller, or it was not delivered (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/heroes/{id}/cancel":{"post":{"operationId":"cancelMotionHero","summary":"Stop a hero moment that is queued or running. Its price comes back in full.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The hero moment's id (`hero.id`)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Cancelled (or already cancelled).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionHeroResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such hero moment for this caller (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"It already finished (`job_not_cancellable`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/jobs/{id}/kit":{"post":{"operationId":"createMotionKit","summary":"Order a PUBLISHING KIT for a finished video (`done`, with frames: a video made before thumbnails needs POST /motion/jobs/{id}/posters first): for each platform picked, a title, a description/caption/post and hashtags (YouTube also tags), written to suit it, each platform's limits enforced and the CC BY music credit added by Toast (never left to the model); and one thumbnail designed in the video's look, in every size (YouTube also gets a second variant for its A/B test). Platforms, limits and default sizes: `MOTION_KIT_PLATFORMS`. A few minutes on Claude; metered (what it costs Toast is in `usdSoFar`). REQUIRES an Idempotency-Key: a retry returns the same kit (200). The request, the video's narration and look, frames of the video Toast rendered and the user's notes for \"Other\" go to Anthropic (Claude API). Poll GET /motion/jobs/{id}/kit. A kit can also be ordered with the video: `kit` on POST /motion/jobs.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion job id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Required. Reuse only to retry the same order."},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platforms":{"type":"array","items":{"type":"string","enum":["youtube","shorts","instagram","tiktok","facebook","linkedin","x","other"]},"minItems":1,"maxItems":8},"sizes":{"type":"array","items":{"type":"string","enum":["1280x720","1080x1920","1080x1350","1200x627"]},"minItems":1,"maxItems":4},"other":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"notes":{"type":"string","maxLength":1000}},"required":["name"]},"lang":{"type":"string","pattern":"^[a-z]{2}$"}},"required":["platforms"]}}}},"responses":{"200":{"description":"This Idempotency-Key was already used: the same kit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionKitResponse"}}}},"202":{"description":"Started.","headers":{"Retry-After":{"description":"Seconds to wait before polling again. PRESENT while queued/running, ABSENT once the job is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionKitResponse"}}}},"400":{"description":"The body (`other` needs a name), a missing Idempotency-Key, a video not finished, or one with no frames yet (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"A publishing kit costs more minutes than the balance holds (`user_quota_exhausted`, only while the price is switched on). Nothing was created or spent. Show a buy prompt for `creditsToBuy` credits; `error` is a sentence for a person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionCreditRefusal"}}}},"403":{"description":"This account may not use the motion engine yet (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The platform's monthly spend cap is reached (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"getMotionKit","summary":"The newest publishing kit of a video. While it is made: the same live feed as a job (`progress`, `step`, `stepAt`, `stepPatience`, `activity`; honour `Retry-After`, absent once finished). Once `done`: `texts` (one per platform: `title`, `text`, `hashtags`, `tags`, and `full` — what to paste, within the limit, music credit included) and `thumbnails` (1-hour `url` for an <img> and `download`, per size and variant).","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion job id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The kit.","headers":{"Retry-After":{"description":"Seconds to wait before polling again. PRESENT while queued/running, ABSENT once the job is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionKitResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"This video has no kit yet, no such video, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/sources/read":{"post":{"operationId":"readMotionSource","summary":"Read a SOURCE a video will be about, and show what was found, before any pitch or job (M13): a product’s website, a store or launch page (App Store, Play, Product Hunt, Amazon...) or a PUBLIC GitHub pull request. Toast’s server fetches it (logged out, robots.txt respected, private addresses refused); NOTHING is stored and nothing goes to a model. Show `brand.colours` as swatches and ASK the user whether to make the video in them; send their answer as `palette` on the pitch or job (absent = the agent’s own look). Then send the same `source` on POST /motion/pitches or /motion/jobs: Toast reads it again there and the job keeps that reading. A few seconds; 20 a minute (429 `rate_limit_exceeded` beyond that, or when GitHub’s limit for Toast is used up).","tags":["motion"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadMotionSourceRequest"}}}},"responses":{"200":{"description":"What was read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionSourceReadingResponse"}}}},"400":{"description":"Not a public web address or PR link, a site that cannot be read (robots.txt asks readers like ours not to, unreachable, an error page), or the body (`invalid_input`). The message says which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not use the motion engine yet (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"The pull request does not exist or its repository is private (`not_found`), or the motion engine is off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/material":{"post":{"operationId":"addMotionMaterialImage","summary":"Add one of the user’s OWN PICTURES for a motion video (\"Your material\", s91): a logo, a product shot, a screenshot, a chart, a photo. THE BODY IS THE PICTURE: raw `image/jpeg`, `image/png` or `image/webp`, at most 15 MB (no JSON body; the attestation rides in the query). Anthropic (claude-haiku-5-5, called directly) reads it BEFORE it is stored: what it shows, and whether it shows people or a child. A picture of PEOPLE needs `isSelf=true` or `hasPermission=true` (ask the user first: \"this is me\" / \"I have their permission\"); a picture of a CHILD is refused unless `isSelf=true`; a refused picture is never stored. Otherwise it is turned upright, shrunk to 2560 px at most, its metadata (camera, place) stripped, and kept in the user’s private library; deleted with the video that used it (unless another still does) and with the account. Then name it in a brief: `material.images: [{ id, use: as-is | styled, note? }]` on POST /motion/pitches or /motion/jobs. The same picture added twice answers the same `id`. 30 a minute.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"isSelf","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"hasPermission","in":"query"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}\\/\\d{1,2}$"},"required":false,"name":"shot","in":"query"},{"schema":{"type":"string","maxLength":2000,"format":"uri"},"required":false,"name":"image","in":"query"}],"requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","description":"The picture itself. JPEG, PNG or WebP, up to 15 MB.","format":"binary"}},"image/png":{"schema":{"type":"string","description":"The picture itself. JPEG, PNG or WebP, up to 15 MB.","format":"binary"}},"image/webp":{"schema":{"type":"string","description":"The picture itself. JPEG, PNG or WebP, up to 15 MB.","format":"binary"}}}},"responses":{"201":{"description":"Kept. `what` is what Toast saw (empty if it could not be read); `url` is a 1-hour preview link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionMaterialImageResponse"}}}},"400":{"description":"`invalid_input`: not a JPEG/PNG/WebP picture, one that cannot be opened, a picture of people with no attestation, a child (unless `isSelf`), or both attestations. The message is written for a person: show it as-is.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not use the motion engine yet (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"The motion engine is off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"The picture is larger than 15 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Picture storage is not configured on this server (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/audio/hear":{"post":{"operationId":"hearMotionAudio","summary":"What a recording says, before the user decides what it is FOR (#1799). THE BODY IS THE SOUND: a PCM WAV, at most 180 s and 8 MB (send 16 kHz mono). It goes to ElevenLabs Scribe ONCE and NOTHING IS STORED. The answer has the words as heard, the voices and sounds, and `guess`: `instructions` (a spoken request: put `text` in the request box for the user to correct, then make the video as from typed words) or `soundtrack` (keep it with POST /motion/audio and make the video TO it). Show both choices with the guess pre-selected; the user decides. 20 a minute.","tags":["motion"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"audio/wav":{"schema":{"type":"string","description":"The sound as a PCM WAV (mono or stereo), taken out of any audio or video file ON THE DEVICE: never send a video.","format":"binary"}}}},"responses":{"200":{"description":"What was heard, and the guess.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionAudioHeard"}}}},"400":{"description":"`invalid_input`: not a PCM WAV, shorter than 3 s or longer than 180 s. The message is written for a person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not use the motion engine yet (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"The motion engine is off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Larger than 8 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"ElevenLabs could not hear it just now (`ai_upstream_failed`): try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/audio":{"post":{"operationId":"addMotionAudio","summary":"Keep the user’s own audio as the SOUNDTRACK of a motion video (#1799). THE BODY IS THE SOUND: a PCM WAV as heard (44.1 or 48 kHz, stereo is fine), 3 to 90 s, at most 20 MB. Ask first, and send one tick in the query: `mine=true` (\"this is my own audio\") or `permission=true` (\"I have permission to use it\"); none = 400. Kept private; nothing is read at upload. Then send `audio: { id }` on POST /motion/jobs: the video is made TO it (its length is the audio’s, Toast speaks no narration and adds no music, the audio plays as given with only its loudness set). Deleted with that video and the account; audio no video uses is deleted within a day. 10 a minute.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"mine","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"permission","in":"query"}],"requestBody":{"required":true,"content":{"audio/wav":{"schema":{"type":"string","description":"The sound as a PCM WAV (mono or stereo), taken out of any audio or video file ON THE DEVICE: never send a video.","format":"binary"}}}},"responses":{"201":{"description":"Kept. Send `audio.id` on POST /motion/jobs within a day.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionAudioSoundtrackResponse"}}}},"400":{"description":"`invalid_input`: no rights tick, not a PCM WAV, shorter than 3 s or longer than 90 s. The message is written for a person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not use the motion engine yet (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"The motion engine is off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Larger than 20 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Audio storage is not configured on this server (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/pitches":{"post":{"operationId":"createMotionPitch","summary":"Write three direction cards (title, idea, look, palette, type, motion, hook) for a BRIEF, and build nothing: a few minutes, about US$0.65 (at most US$3), on Opus. Then start a job with `direction: { kind: card, pitchId, card }` and the same brief. Offer this only when the user ASKS to choose: every card enters the user’s ledger, built or not, so later videos avoid all three. REQUIRES an Idempotency-Key (keys are shared with jobs: a key used for a job is refused here). The request and the user’s looks ledger go to Anthropic (Claude API); nothing goes to ElevenLabs or Jamendo. Poll GET /motion/pitches/{id}.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Any unique token per intended pitch (a uuid). Reuse it only to retry."},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMotionPitchRequest"}}}},"responses":{"200":{"description":"This Idempotency-Key was already used: the same pitch, in whatever state it is.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionPitchResponse"}}}},"202":{"description":"Started.","headers":{"Retry-After":{"description":"Seconds to wait before polling again (4). The pitch carries the same live feed as a job. PRESENT while queued/running, ABSENT once the pitch is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionPitchResponse"}}}},"400":{"description":"The body, a missing Idempotency-Key (or one already used for a job), or a voice that is not a stock voice (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"A pitch is free but needs a balance that covers the cheapest video; this account costs more minutes than the balance holds (`user_quota_exhausted`, only while the price is switched on). Nothing was created or spent. Show a buy prompt for `creditsToBuy` credits; `error` is a sentence for a person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionCreditRefusal"}}}},"403":{"description":"This account may not start motion jobs yet (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"The motion engine is switched off on this server (`not_found`): treat it as absent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`), or today’s free drafts are used: pitches and storyboards share one count per rolling 24 hours, lower for an account that has never paid (#2021). Then `error.retry_after` is seconds, up to a day: show `error.message` and do not retry on a timer. A same-key retry of a draft already made is not refused, and builds are not limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The platform’s monthly spend cap is reached (`platform_budget_exhausted`). Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/estimate":{"post":{"operationId":"estimateMotionJob","summary":"What a motion job would cost THIS user now (M12 #1255), to show before Make: `stage` build (with the brief’s `lengthS`, absent = priced as 60 s, and `kit: true` for a kit ordered with it), reshape, kit, pitch or edit. In minutes, like every Toast price (1 credit = 30 minutes): a video costs its length in started half-minutes (30 s = 12, 60 s = 20, +8 per further 30 s), another shape 8, a kit 4, a change to one scene 4; a pitch is free but needs a balance covering a 30 s video (`requiresBalanceMinutes`). `charged: false` = the price is switched off and creates are free (the price is still said). Charged in full when created, refunded in full when a job delivers nothing. Writes nothing.","tags":["motion"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionEstimateRequest"}}}},"responses":{"200":{"description":"The price and whether this balance covers it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionEstimateResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"The motion engine is switched off on this server (`not_found`): treat it as absent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/pitches/{id}":{"get":{"operationId":"getMotionPitch","summary":"One pitch. `cards` holds three once `status` is `done` (empty before). Honour `Retry-After`. A pitch waits behind a running video on the same runner, so it can stay `queued` for a while.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion pitch id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The pitch.","headers":{"Retry-After":{"description":"Seconds to wait before polling again (4). The pitch carries the same live feed as a job. PRESENT while queued/running, ABSENT once the pitch is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionPitchResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such pitch for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/pitches/{id}/cancel":{"post":{"operationId":"cancelMotionPitch","summary":"Cancel a queued or running pitch. Idempotent (already cancelled = 200, same body). What it had already spent is still metered.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion pitch id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Cancelled (or already was).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionPitchResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such pitch for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The pitch already finished (`job_not_cancellable`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/storyboards":{"post":{"operationId":"createMotionStoryboard","summary":"Write the STORYBOARD of one direction for a BRIEF, and build nothing (s100): every scene’s time, what is on screen (`picture`), the narrator’s exact words (`said`) and the words shown (`onScreen`). `direction: { kind: card, pitchId, card }` storyboards that card of a finished pitch (same brief rule as a build from a card); `you-pick` (default) has Toast write three directions, a blind picker choose one, and storyboard it (the three enter the ledger). On Opus; about a minute for a card, a few for you-pick; at most US$3. Free, with the balance rule of a pitch. Show it before Make, let the person change its words, then POST /motion/jobs with `storyboard: { id, scenes }`: the build keeps every spoken and on-screen line word for word (`checks.storyboard`). REQUIRES an Idempotency-Key (shared with pitches and jobs). The request, the ledger and the card go to Anthropic (Claude API); nothing to ElevenLabs or Jamendo. Poll GET /motion/storyboards/{id}.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Any unique token per intended storyboard (a uuid). Reuse it only to retry."},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMotionStoryboardRequest"}}}},"responses":{"200":{"description":"This Idempotency-Key was already used: the same storyboard, in whatever state it is.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionStoryboardResponse"}}}},"202":{"description":"Started.","headers":{"Retry-After":{"description":"Seconds to wait before polling again (4). The storyboard carries the same live feed as a job. PRESENT while queued/running, ABSENT once it is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionStoryboardResponse"}}}},"400":{"description":"The body, a missing Idempotency-Key (or one already used for a pitch or job), a voice that is not a stock voice, or a card this brief cannot use (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"A storyboard is free but needs a balance that covers the cheapest video; this account costs more minutes than the balance holds (`user_quota_exhausted`, only while the price is switched on). Nothing was created or spent. Show a buy prompt for `creditsToBuy` credits; `error` is a sentence for a person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionCreditRefusal"}}}},"403":{"description":"This account may not start motion jobs yet (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"The motion engine is switched off on this server (`not_found`): treat it as absent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`), or today’s free drafts are used: pitches and storyboards share one count per rolling 24 hours, lower for an account that has never paid (#2021). Then `error.retry_after` is seconds, up to a day: show `error.message` and do not retry on a timer. A same-key retry of a draft already made is not refused, and builds are not limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The platform’s monthly spend cap is reached (`platform_budget_exhausted`). Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/storyboards/{id}":{"get":{"operationId":"getMotionStoryboard","summary":"One storyboard. `card` (the direction it is of) and `scenes` once `status` is `done` (null and empty before). Honour `Retry-After`. It waits behind a running video on the same runner, so it can stay `queued` for a while.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion storyboard id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The storyboard.","headers":{"Retry-After":{"description":"Seconds to wait before polling again (4). The storyboard carries the same live feed as a job. PRESENT while queued/running, ABSENT once it is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionStoryboardResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such storyboard for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/storyboards/{id}/cancel":{"post":{"operationId":"cancelMotionStoryboard","summary":"Cancel a queued or running storyboard. Idempotent (already cancelled = 200, same body). What it had already spent is still metered.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion storyboard id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Cancelled (or already was).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionStoryboardResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such storyboard for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The storyboard already finished (`job_not_cancellable`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/series":{"post":{"operationId":"createMotionSeries","summary":"Start a SERIES from a long document: one motion video per chapter, in one look. READ AND SPLIT THE DOCUMENT ON THE DEVICE (`documentChapters` in @toast/shared: PDF bookmarks, else chapter headings), let the user fix the split, then send the CHAPTER LIST (n 1..N in reading order, title, pages, size; NO TEXT) and the brief every episode shares. Nothing is made or spent. `capUsd` (default 12) bounds what the series may spend. REQUIRES an Idempotency-Key. Only the chapter list is stored; a chapter's text is sent when its episode is made.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Any unique token per intended create (a uuid). Reuse it only to retry."},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMotionSeriesRequest"}}}},"responses":{"200":{"description":"This Idempotency-Key was already used: the same series.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionSeriesResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionSeriesResponse"}}}},"400":{"description":"The body, a missing Idempotency-Key, chapters not numbered 1..N, or a voice that is not a stock voice (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not start motion jobs yet (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"The motion engine is switched off on this server (`not_found`): treat it as absent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"listMotionSeries","summary":"The caller's 50 newest series, newest first, without chapters or episodes (fetch one for those).","tags":["motion"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The series.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionSeriesList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"The motion engine is switched off on this server (`not_found`): treat it as absent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/series/{id}":{"get":{"operationId":"getMotionSeries","summary":"One series: its chapters, every episode made (newest first; each is a motion job: GET /motion/jobs/{jobId} for its video and live feed), what it has cost, the cap, `episodeEstimateUsd` (show it before the next episode) and `canMake` (whether POST .../episodes would start one now, and if not why). `look` is set once the first episode is done: every later episode matches it. Honour `Retry-After` while an episode is being made.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion series id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The series.","headers":{"Retry-After":{"description":"Seconds to wait before polling again. PRESENT while queued/running, ABSENT once the job is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionSeriesResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteMotionSeries","summary":"Delete a series for good, with EVERY episode's video, kits, other shapes and stored files (as DELETE /motion/jobs/{id} for each). Refused while an episode is being made: cancel it first. If a file cannot be deleted the series stays listed, so a retry is safe.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion series id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"400":{"description":"An episode is still being made: cancel it first (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller (or already deleted), or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/series/{id}/episodes":{"post":{"operationId":"createMotionEpisode","summary":"Make one EPISODE: chapter `chapter`, from its TEXT (the client still holds the document; at most 40,000 characters are kept). ONE AT A TIME: the first episode made (any chapter) sets the look by writing three directions and a blind pick; once it is done every later episode is built from that look, so they read as one show. The answer is an ordinary motion job: poll GET /motion/jobs/{id}. The chapter text, the request, the user's ledger, the narration and rendered frames go to Anthropic (Claude API); the narration to ElevenLabs; a few music search words to Jamendo. Metered like any motion video; refused once the series has spent `capUsd`. REQUIRES an Idempotency-Key.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion series id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Any unique token per intended create (a uuid). Reuse it only to retry."},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMotionEpisodeRequest"}}}},"responses":{"200":{"description":"This Idempotency-Key was already used: the same job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobResponse"}}}},"202":{"description":"Started.","headers":{"Retry-After":{"description":"Seconds to wait before polling again. PRESENT while queued/running, ABSENT once the job is finished.","required":false,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionJobResponse"}}}},"400":{"description":"The body, a missing Idempotency-Key, no such chapter, another episode still being made (one at a time), or the series has spent its cap (`invalid_input`). `canMake` on GET says which before you ask.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"This episode costs more minutes than the balance holds (`user_quota_exhausted`, only while the price is switched on). Nothing was created or spent. Show a buy prompt for `creditsToBuy` credits; `error` is a sentence for a person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionCreditRefusal"}}}},"403":{"description":"This account may not start motion jobs yet (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The platform's monthly spend cap is reached (`platform_budget_exhausted`). Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/series/{id}/cap":{"put":{"operationId":"setMotionSeriesCap","summary":"Raise or lower what the series may spend (US$). A new episode is refused once the episodes cost this much.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Motion series id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetMotionSeriesCapRequest"}}}},"responses":{"200":{"description":"The series with its new cap.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionSeriesResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such series for this caller, or the engine is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/access":{"get":{"operationId":"getPropertyAccess","summary":"Whether this account may use property videos (a server-side allow-list `PROPERTY_USERS` while the vertical has no price). Offer it only when `enabled` is true. 404 means the vertical is switched off on this server: treat it as absent.","tags":["properties"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"Whether property videos may be offered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyAccess"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property for this caller, or the vertical is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties":{"post":{"operationId":"createProperty","summary":"Create a property: one home, office, plot or project. Every field optional (a dated default name, role `studio`).","tags":["properties"],"security":[{"clerkJwt":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePropertyRequest"}}}},"responses":{"201":{"description":"Created, with no files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not create properties or upload yet; `GET /properties/access` says so in `enabled` (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property for this caller, or the vertical is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"listProperties","summary":"The caller’s properties, most recently changed first (at most 200). `fileCount` counts files whose bytes are stored. Interiors v2: `studioId` or `communityId` lists one studio’s or one community’s flats (ignored for an account INTERIORS_V2 does not let in).","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Only this studio’s flats (interiors v2)."},"required":false,"name":"studioId","in":"query"},{"schema":{"type":"string","description":"Only this community’s flats (interiors v2)."},"required":false,"name":"communityId","in":"query"}],"responses":{"200":{"description":"The properties.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property for this caller, or the vertical is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}":{"get":{"operationId":"getProperty","summary":"One property and every one of its files, oldest first.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The property and its files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property for this caller, or the vertical is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"updateProperty","summary":"Rename, set the role, the facts or the market. `facts` REPLACES the stored facts (send the whole object). Every figure is the user’s own; Toast draws strings as typed. `market: null` clears it.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePropertyRequest"}}}},"responses":{"200":{"description":"Updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property for this caller, or the vertical is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteProperty","summary":"Delete the property, its files and the stored bytes no other property of the caller still uses. Permanent.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property for this caller, or the vertical is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/files":{"post":{"operationId":"registerPropertyFiles","summary":"Register up to 500 files of the shoot by the SHA-256 of their bytes (hash on the device first). One answer per file, in order: `new` or `resume` (upload: PUT each part to its `url`, keep each response’s `ETag`, then POST …/complete), `have` (already here), `elsewhere` (another of the caller’s properties has these bytes; nothing created: ask the user, then POST …/files/reuse), `refused` (`reason`: not video/photo/audio, or over 50 GB). Idempotent. THE FOOTAGE IS STORED by Toast (private, until the property or the file is deleted): with events, the only places Toast keeps a user’s video.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterPropertyFilesRequest"}}}},"responses":{"200":{"description":"One answer per file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterPropertyFilesResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not create properties or upload yet; `GET /properties/access` says so in `enabled` (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property for this caller, or the vertical is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"File storage is not configured on this server (`internal`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/files/reuse":{"post":{"operationId":"reusePropertyFiles","summary":"Add files the caller already stored for ANOTHER property (`elsewhere` from registering) without uploading them again: one stored copy serves both. Hashes not stored elsewhere, or already here, are skipped.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReusePropertyFilesRequest"}}}},"responses":{"200":{"description":"The files added.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReusePropertyFilesResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not create properties or upload yet; `GET /properties/access` says so in `enabled` (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property for this caller, or the vertical is switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/files/{fid}/upload":{"post":{"operationId":"refreshPropertyFileUpload","summary":"Fresh part links for a file still `uploading` (links last 12 h): to resume a long or interrupted upload.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"File id (uuid), from `files[].file.id`."},"required":true,"name":"fid","in":"path"}],"responses":{"200":{"description":"The file and its part links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyFileUploadResponse"}}}},"400":{"description":"The file is not uploading; register it again to upload it again (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not create properties or upload yet; `GET /properties/access` says so in `enabled` (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such file in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/files/{fid}/complete":{"post":{"operationId":"completePropertyFile","summary":"Join the uploaded parts. Send EVERY part with its ETag. The stored size is checked against the size registered: a mismatch rejects the file and deletes its bytes (400). Idempotent: a file already uploaded answers 200 as it is.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"File id (uuid), from `files[].file.id`."},"required":true,"name":"fid","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletePropertyFileRequest"}}}},"responses":{"200":{"description":"The file, now `uploaded`, `media.state: pending`: Toast now re-hashes the stored bytes and prepares its copies. Poll GET /properties/{id} until it is `verified` + `ready`, `rejected` (bytes deleted), or `failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyFileResponse"}}}},"400":{"description":"A part is missing, or the stored size is wrong (the message says which) (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such file in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/media":{"get":{"operationId":"listPropertyMedia","summary":"The links of GET /properties/{id}/files/{fid}/media for EVERY file of the property in one call, without transcripts (ask per file for one). For a screen that shows many files at once (a shot grid): one request, not one per file against the per-user rate limit (100 a minute). Each file’s `media` is empty, with `state` not `ready`, until prepared. Links last 1 h. WHAT LEAVES: nothing (Toast’s own copies). Never the original.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Every file’s id and links, oldest file first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyMediaListResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/files/{fid}/media":{"get":{"operationId":"getPropertyFileMedia","summary":"Short-lived links (1 h) to what Toast PREPARED from one file on its own servers (no third party): a preview video (H.264, long side 960, with the sound), stills with their times, a 16 kHz mono WAV of the sound, a photo’s upright display copy. Stored with the original and deleted with it; no location, device or time tag. Empty, with `state` not `ready`, until prepared. Never the original.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"File id (uuid), from `files[].file.id`."},"required":true,"name":"fid","in":"path"}],"responses":{"200":{"description":"The file and the links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyFileMediaResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such file in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/read":{"post":{"operationId":"readProperty","summary":"Read the property: what every file shows, as time ranges, which files show the same physical room, features, people, and what is wrong with a shot. Waits for files still being prepared (up to 2 h), listens to each sound track once (kept per file), then looks at every file. Idempotency-Key REQUIRED; a second ask while one runs answers that one (200). WHAT LEAVES: each sound track (WAV) to ElevenLabs Scribe; stills of every file to Anthropic models via OpenRouter (Sonnet 5.5 reads, Opus 5.5 checks shots); never the transcript, file names or facts. Poll GET /properties/{id}/reading.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"A new uuid per read; reuse only to retry."},"required":true,"name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The same key again, or a reading of this property already running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyReadingResponse"}}}},"202":{"description":"Started (`status: queued`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyReadingResponse"}}}},"400":{"description":"No Idempotency-Key, the key was used for another property, or no file is stored yet (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not create properties or upload yet; `GET /properties/access` says so in `enabled` (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/reading":{"get":{"operationId":"getPropertyReading","summary":"The newest reading, with the user’s corrections applied. While it runs, `Retry-After: 4`: poll that often and show `activity` (one plain sentence). `files` and `rooms` are filled once `status` is `done`; `skipped` names files that could not be read.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The reading.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyReadingResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property, or never read (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"correctPropertyReading","summary":"Fix the reading: rename a room, merge rooms, move one segment to another room (a new id splits it out), mark a file unusable. The corrections are APPENDED to the property and applied to every reading, so a re-read never loses them. Answers the newest finished reading with them applied; 404 (the corrections still kept) when none has finished.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyCorrectionsRequest"}}}},"responses":{"200":{"description":"The reading with the corrections applied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyReadingResponse"}}}},"400":{"description":"A malformed correction (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property, or no finished reading yet (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/reading/shots":{"patch":{"operationId":"decidePropertyShots","summary":"Check the shots (interiors): Keep or Leave out for the moments the shot check flagged, each named by its file and the issue’s `atMs`. APPENDED to the property, one decision per moment (the latest wins), kept apart from the reading so a re-read keeps them. The reading then carries each issue’s `decision`; a kept moment no longer keeps its shot out of a plan, a left-out one always does. Answers the newest finished reading; 404 (the decisions still kept) when none has finished.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyShotDecisionsRequest"}}}},"responses":{"200":{"description":"The reading with the decisions applied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyReadingResponse"}}}},"400":{"description":"A malformed decision, or more than 500 (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property, or no finished reading yet (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/formats":{"get":{"operationId":"listPropertyFormats","summary":"What Toast can make from THIS property’s shoot: each format, what it needs, whether this shoot has it (`available`), and if not, why (`missing`, plain words). Only formats Toast can plan are listed. Needs a finished reading. With the studio harness on for the user and a studio’s property, also `studio`: the Make questions (purposes, audiences, defaults) and, per purpose, the plans this shoot can carry and why not.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The property."},"required":true,"name":"propertyId","in":"query"}],"responses":{"200":{"description":"The catalogue for this shoot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyFormatsResponse"}}}},"400":{"description":"No `propertyId` (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/shots":{"get":{"operationId":"listPropertyShots","summary":"ARRANGE IT YOURSELF (epic #2079, behind `PROPERTY_HARNESS`): every clean shot of the shoot a studio can pick (one stretch of a file showing one space, nobody in it, no defect), spaces in the order a home is walked, each with its space, the kind of space, what is visible (as read) and its usable seconds; and, for an interior studio, the IDEAS Toast offers from them (a space, a pair of spaces, a theme of the work such as lighting or wall panels), each with the shots it plays. Code over the newest reading: no model, nothing paid. Empty before a reading finishes. Play a shot from GET /properties/{id}/files/{fid}/media. WHAT LEAVES: nothing.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The shots and the ideas.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyShotsResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property, or arranging is not on for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/cut":{"post":{"operationId":"previewPropertyCut","summary":"The cut a shot list makes (epic #2079), to PREVIEW it before anything is planned or made: play `edl` from each file’s proxy, exactly as POST /properties/{id}/videos with the same `shots` would plan it. Shots the reading no longer has are left out (`missing`). Code only: no model, nothing stored, nothing paid. WHAT LEAVES: nothing.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyCutRequest"}}}},"responses":{"200":{"description":"The cut.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyCutResponse"}}}},"400":{"description":"Not read yet, or none of the shots is in the property (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property, or arranging is not on for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/videos":{"post":{"operationId":"planPropertyVideo","summary":"Plan a video of the property: a catalogue `format`, or a `request` in the user’s own words (“just the kitchen”, “all the bedrooms”, “the highlights”). PLANS ONLY: the answer becomes a cut (`edl`, over the property’s stored files) and its `lines` (which sentence plays, what the picture shows); nothing is rendered. Uses the newest finished reading with the user’s corrections. Idempotency-Key REQUIRED. Poll GET /properties/{id}/videos/{vid}. WHAT LEAVES: for a format, the sentences of the clips where someone talks to the camera; for a request, the request as typed and each clean shot’s space, length and features; with either, the reading’s room names and features, to Anthropic’s Sonnet 5.5 via OpenRouter; never a picture, file name or the facts the user typed. A request video has no `lines` and may carry a `note` to show the user. With `harness` (an interior studio, behind `PROPERTY_HARNESS`): one `studio_plan` video per plan the shoot can carry, best first (`plans`, sharing `harness.group`; `video` is the first; `unavailable` says why the others cannot be made); each is planned by Anthropic’s Opus 5.5 with Toast’s direction for the plan, the style or materials lines typed for the facts card and `harness.note` as typed. With `shots` (ARRANGE IT YOURSELF, epic #2079, behind `PROPERTY_HARNESS`): the studio’s own shot list, in order, is the plan: NO model is asked and nothing leaves for planning; the video is `planned` with `arranged` (its shots, `title`, `idea`). To change the shots of a video, POST a new list: the old video stays.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"A new uuid per plan; reuse only to retry."},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePropertyVideoRequest"}}}},"responses":{"200":{"description":"The same key again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyVideoResponse"}}}},"202":{"description":"Planning (`status: planning`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyVideoResponse"}}}},"400":{"description":"No Idempotency-Key, a key used for another property, or the format is not available for this shoot (the message says why) (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not create properties or upload yet; `GET /properties/access` says so in `enabled` (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"listPropertyVideos","summary":"The property’s videos, newest first (at most 100).","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The videos.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyVideoList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/videos/{vid}":{"get":{"operationId":"getPropertyVideo","summary":"One video and its plan. While `planning`, `Retry-After: 3`; while its finished file is being made (`render.status: rendering`), `Retry-After: 5`. A `failed` plan says why in `error`; ask again with a new Idempotency-Key. Preview a `planned` video by playing its `edl` from each file’s proxy (GET /properties/{id}/files/{fid}/media). Once `render.status` is `rendered`, `render.url` plays the finished video and `render.downloadUrl` downloads it (both 1 h: GET again for fresh ones).","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"vid","in":"path"}],"responses":{"200":{"description":"The video.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyVideoResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deletePropertyVideo","summary":"Delete ONE video of the property, permanently: its plan, its finished file, the caption and room-label clips drawn for it and its hero moments (one being made is cancelled). The property, its files and its other videos are untouched. Refused while it is still planning or its finished file is being made: stop the make (POST .../render/cancel), then delete.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"vid","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Still planning, or its finished file is being made (`plan_in_progress`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"updatePropertyVideo","summary":"Change a planned video. Today: its MUSIC, by mood (`calm`, `warm`, `uplifting`, `elegant`, `chill`). Toast picks another CC BY track of that mood from Jamendo (never the one it has) and puts it in the plan; a finished file made with the old music is DELETED (`render` becomes null): make the video again. Or its SHOTS, in place (#2155): `shots` = the new shot list (ids and seconds from GET .../shots), in order; the same video takes the new cut (code, no model), its highlights and the user’s layer edits follow their shots (those on a removed shot, and caption edits, go), the music goes on cut to the new length, and the finished file is DELETED: make it again. WHAT LEAVES: for music, the mood’s own tag words to Jamendo (Toast’s words, never the user’s); for shots, nothing.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"vid","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePropertyVideoRequest"}}}},"responses":{"200":{"description":"The video, with its new music and no finished file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyVideoResponse"}}}},"400":{"description":"Not planned yet, or no track of that mood could be found just now (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Its finished file is being made; change it when that ends (`plan_in_progress`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/videos/{vid}/quotes":{"get":{"operationId":"getPropertyVideoQuotes","summary":"The QUOTE CARD’s choices: every sentence the client said to camera that can be a quote (the main voice of each testimony take, no question), each with the versions Toast can draw (`forms`: as said, fillers dropped, when it is short enough; else up to three runs of whole clauses cut at a comma or dash and marked “…”, `shortened: true`), and this video’s picks (`lower`: an editorial lower third part-way through; `close`: a pull quote just before the end card). Toast never rewords a quote and no model chooses one. WHAT LEAVES: nothing.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"vid","in":"path"}],"responses":{"200":{"description":"The candidates and the picks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyQuotesResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"operationId":"setPropertyVideoQuotes","summary":"Pick a video’s quotes; REPLACES them (null or absent = none there). Each `text` must be one of its candidate’s `forms` exactly; a SHORTENED form is drawn only with `approved: true`, the user’s yes to that exact version (show it to them first). `by`: who said it as typed (null = “The homeowner”). A finished file made with other quotes is DELETED (`render` becomes null): make the video again. The quote is drawn only where no one speaks and no face is under it; with no such place it is left out. WHAT LEAVES: at render, the quote’s words and `by` go to Toast’s own card renderer (no third party, never a model).","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"vid","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPropertyQuotesRequest"}}}},"responses":{"200":{"description":"The video, its finished file cleared when the quotes changed. GET .../quotes for them as stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyVideoResponse"}}}},"400":{"description":"Not planned yet; a candidate this video’s takes do not have; a text that is not one of its forms; a shortened form without `approved: true` (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Its finished file is being made; change it when that ends (`plan_in_progress`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/videos/{vid}/highlights":{"get":{"operationId":"getPropertyVideoHighlights","summary":"CONTEXT-AWARE HIGHLIGHTS (#1747): the shots of a planned video that can carry one (a named space, nobody on camera, at least 2 s; `still` is a short-lived link to the still the decision looked at, for the user to tap an item on), and what each points at: Toast’s decision (`by: toast`, made when the video was planned: `on`, `why`, `item`, `box` in the still as fractions, `treatment`, at most one `hero`) or the user’s (`by: you`). `on: false` = nothing on that shot, `why` says why, or the user removed it. `decided` = the planner has looked. `max` = the most highlights the video carries. WHAT LEAVES: nothing.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"vid","in":"path"}],"responses":{"200":{"description":"The shots and the highlights.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyHighlightsResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"operationId":"setPropertyVideoHighlights","summary":"The user’s changes: `off` removes the highlight on those shots (kept off, never suggested again); `add` puts an item the user TAPPED on a shot (its box on the shot’s still, the words for its tag as typed, how to draw it; default `trace`), replacing what was there. No model. A finished file made with other highlights is DELETED (`render` becomes null): make the video again. WHAT LEAVES: nothing now; at render the tag’s words go to Toast’s own card renderer.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"vid","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPropertyHighlightsRequest"}}}},"responses":{"200":{"description":"The video, its finished file cleared when the highlights changed. GET .../highlights for them as stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyVideoResponse"}}}},"400":{"description":"Not planned yet, or a shot that cannot carry a highlight (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Its finished file is being made; change it when that ends (`plan_in_progress`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/videos/{vid}/layers":{"get":{"operationId":"getPropertyVideoLayers","summary":"EVERY LAYER THE NEWEST MAKE DREW (#2150, epic #2149): each room label, feature tag, opening title, status banner, facts / price / numbers / rent / lead / quote card, proof line, highlight, hero moment, caption clip and the end card on the video’s newest finished file, in the order they show. Each has a STABLE `ref` (two makes of the same plan give a layer the same ref; treat it as an opaque key), its `kind` and `name` in the studio’s words, the `words` the viewer reads and its word `slots`, `atMs`/`durMs`, its `box` as fractions of the frame, its `place` and `ground`, and what a later edit may change (`editable`). `kind`, `place`, `ground` and `editable` are open strings. Stored with the make; a new make replaces it. A PLANNED video not made yet (#2255) answers the layers its first make would draw, from a dry make (nothing drawn, measured, fetched or stored), `planned: true`, no `clip`: where each sits is placed when made; edits PUT now are applied by the first make. Read only, no model. WHAT LEAVES: nothing.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"vid","in":"path"}],"responses":{"200":{"description":"The layers of the newest finished make, or (`planned`) the ones the first make would draw.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyVideoLayersResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"No layers to show (`plan_in_progress`, `message` in plain words): the video is being made, its plan cannot be read into layers, or it was made before layers were kept (\"Make it again to edit its layers.\").","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/videos/{vid}/layers/preview":{"post":{"operationId":"previewPropertyVideoLayerEdits","summary":"THE STUDIO’S PREVIEW OF AN EDIT (#2156, epic #2149): body `{ edits }` as for PUT .../edits (checked the same way). Answers a NEW clip only for an edit that draws its card differently (its words, ground or length, a caption’s spelling, an added layer), drawn now by Toast’s own renderer through the cards job (cached by what is drawn); a hide or a move needs none (lay the stored `clip` from GET .../layers elsewhere). Each clip: `url` (1 h), `box` where it is laid (fractions of the frame, as Toast placed it; move it to the edit’s `at` yourself), `crop`. Nothing is stored on the video. No model. WHAT LEAVES: the typed words go to Toast’s own card renderer.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"vid","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyLayerPreviewRequest"}}}},"responses":{"200":{"description":"A clip for each edit that draws its card differently.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyLayerPreviewResponse"}}}},"400":{"description":"An edit the layers refuse (`invalid_input`, `message` in plain words).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"No layers to preview (`plan_in_progress`): being made, never made, or made before layers were kept.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/videos/{vid}/edits":{"put":{"operationId":"setPropertyVideoLayerEdits","summary":"THE USER’S EDITS OVER THE LAYERS (#2151, epic #2149): the WHOLE list (it replaces the stored one; `[]` clears), each keyed by a layer’s `ref` from GET .../layers, or `own:<id>` with `add` (`room_label`, `tag`, `words`, `title`) for a layer the user adds. Per edit: `hide`, `slots` (the word slots the layer carries, as typed), `atMs`/`durMs`, `at` (its box’s top-left, fractions of the frame), `ground` (`plate`, `fade`, `bare`); a field the layer’s `editable` does not list is refused. Shaped one-to-one on the editor’s card effect. Kept on the video; the finished file stays until POST .../render { again: true } makes it with the edits, over Toast’s choices; the critic never moves or drops an edited layer. `settings` (#2254, optional, left out = kept as stored): the whole video’s settings from the studio’s inspector (the music’s level and fades, the sounds under transitions and cards, the captions’ style, size, place or off; #2256: `grade`, a LUT preset for the video, `shots` per shot key `<sha256>@<ms>` with its grade, zoom and speed, and `cuts` per shot key with the transition into it; only what GET .../layers `visual` says this server draws; a speed changes the video’s length and GET .../videos/:vid answers the cut as it will play; #2257: `clips` per shot key as planned, another file of this property (one its videos may use, never a before photo) shown in the shot’s place for the same time and length, the speech playing on as planned, after which the shot is answered under the clip’s key `<object>@<fromMs>`), mixed and drawn by Toast’s own worker and renderer. No model now. WHAT LEAVES: at the make, the typed words go to Toast’s own card renderer, and an AI model checking the finished video sees them in its frames.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"vid","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPropertyLayerEditsRequest"}}}},"responses":{"200":{"description":"The edits as stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyLayerEditsResponse"}}}},"400":{"description":"An edit the layers refuse (`invalid_input`, `message` in plain words): an unknown ref, a field the layer may not change, an added layer without its words or time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"No layers to edit (`plan_in_progress`): the video is being made, was never made, or was made before layers were kept.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/videos/{vid}/render":{"post":{"operationId":"renderPropertyVideo","summary":"Make the FINISHED FILE of a planned video: rendered from the ORIGINAL uploads on Toast’s own worker (H.264 High, AAC 48 kHz, -14 LUFS, no metadata) and stored with the property (deleted with the video, the property or the account). Idempotent by state: while it renders or once it is made, asking again changes nothing (200); after a failure it starts again (202). Body `{ again: true }` makes a FINISHED video again (202, the new file replaces the old one; after a brand kit change, say); while it renders, still 200. Poll GET /properties/{id}/videos/{vid} (`Retry-After: 5`) for `render.progress` and `render.activity`. A minute of video takes a few minutes. WHAT LEAVES: nothing to a third party.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"vid","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderPropertyVideoRequest"}}}},"responses":{"200":{"description":"Already being made, or made.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyVideoResponse"}}}},"202":{"description":"Making it (`render.status: rendering`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyVideoResponse"}}}},"400":{"description":"The video’s plan failed: plan it again (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The video is still being planned (`plan_in_progress`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/videos/{vid}/render/cancel":{"post":{"operationId":"cancelPropertyVideoRender","summary":"STOP making the finished file (#1859). It stops after the step it is on, never inside one, and keeps what was made: before its first make is written the video goes back to how it was (its last finished file, or no render at all); once a make is done, that make is delivered without a further critic round. `render.stopping` is true until it ends; poll GET /properties/{id}/videos/{vid} as for a render. Idempotent: nothing rendering, or already stopping, is 200. WHAT LEAVES: nothing.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"vid","in":"path"}],"responses":{"200":{"description":"Nothing to stop, or already stopping.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyVideoResponse"}}}},"202":{"description":"Stopping (`render.stopping: true`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyVideoResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/videos/{vid}/reshape":{"post":{"operationId":"reshapePropertyVideo","summary":"THE SAME VIDEO IN ANOTHER SHAPE (#2257, the studio’s Reframe): body `{ shape }` (`9:16`, `1:1` or `16:9`, not the video’s own). A NEW video is planned from this one in code, with no model: the same cut (every shot at the same time for the same length), sound, music, highlights, quotes, cards, settings and layer edits (an edit’s `at` is left out, so the make places it again for the new frame), each shot framed again for the shape: a photo’s camera move done again for the frame; a portrait picture in a 16:9 frame, or one already shown whole, shown whole and never cropped. The new video names the original in `reshapedFrom`; the original is not changed. It is planned, not made: make it with POST /properties/{id}/videos/{new id}/render (a full make, every label, card and caption placed for the new frame). No hero moment is carried over. IDEMPOTENT without a header: the same video, shape and plan answer the same new video (200). Over the footage caps: 429 `rate_limit_exceeded`, `message` in plain words. WHAT LEAVES: nothing.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"vid","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReshapePropertyVideoRequest"}}}},"responses":{"200":{"description":"The same new video, asked for again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyVideoResponse"}}}},"201":{"description":"The new video, planned (`status: planned`, `render: null`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyVideoResponse"}}}},"400":{"description":"Not planned yet, or already that shape (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such video in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/files/{fid}":{"delete":{"operationId":"deletePropertyFile","summary":"Remove one file. Its stored bytes go too unless another of the caller’s properties uses them; an unfinished upload is aborted.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"File id (uuid), from `files[].file.id`."},"required":true,"name":"fid","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such file in this property (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"updatePropertyFile","summary":"Mark a PHOTO as a before photo (the space as it was before the work), or not. A before photo is never a shot of a video by itself: it is only used as the before half of a pair the user confirmed (GET/PUT /properties/{id}/before-after). At the next reading the reader is told it is a before photo (the word, with its stills, to Anthropic via OpenRouter) so it names the space it became. WHAT LEAVES: nothing now.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"File id (uuid), from `files[].file.id`."},"required":true,"name":"fid","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePropertyFileRequest"}}}},"responses":{"200":{"description":"The file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyFileResponse"}}}},"400":{"description":"A video or audio file marked before, or a bad body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such file in this property, or before/after is not on for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/properties/{id}/before-after":{"get":{"operationId":"getPropertyBeforeAfter","summary":"For each before photo, the finished shot at the SAME ANGLE that Toast’s own worker found (OpenCV, numbers only, no third party), to show the user for a yes; before photos with no such shot are `unmatched` and get nothing (Toast never makes a before picture). Worked out again whenever the files or the before marks change: then 202 with `status: matching` and Retry-After 3; ask again. WHAT LEAVES: nothing to any third party.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The pairs (`status: ready`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyBeforeAfterResponse"}}}},"202":{"description":"Toast’s worker is looking (`status: matching`, empty lists); Retry-After 3.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyBeforeAfterResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property, or before/after is not on for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"operationId":"confirmPropertyBeforeAfter","summary":"The pairs the user confirmed are the same view; REPLACES the confirmed set (an empty list = none). Each must be one GET proposed (same before photo, finished file and time), one per before photo. Only a confirmed pair is ever used in a video. WHAT LEAVES: nothing.","tags":["properties"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Property id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPropertyBeforeAfterRequest"}}}},"responses":{"200":{"description":"The pairs, confirmed ones marked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyBeforeAfterResponse"}}}},"400":{"description":"A pair Toast did not propose, a before photo in two pairs, or the photos changed since GET (ask again) (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such property, or before/after is not on for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/brand-kit":{"get":{"operationId":"getBrandKit","summary":"The maker’s brand kit: business name, phone, website, an agent’s licence number and the logo, saved once and drawn on the END CARD of every property video (an end card needs a name). Every field null until saved. `logo.url` lasts an hour.","tags":["brand"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The kit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandKitResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is on neither allow-list (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Neither the property nor the event vertical is on here (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"operationId":"updateBrandKit","summary":"Save the kit’s words. A field left out is kept; \"\" clears it. Drawn on the video as typed. A finished video keeps the kit it was made with: make it again after a change. WHAT LEAVES: stored by Toast; drawn by Toast’s own renderer. No third party.","tags":["brand"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBrandKitRequest"}}}},"responses":{"200":{"description":"Saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandKitResponse"}}}},"400":{"description":"A field is too long (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is on neither allow-list (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Neither the property nor the event vertical is on here (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/brand-kit/logo":{"put":{"operationId":"uploadBrandKitLogo","summary":"Set the logo. The BODY IS THE PICTURE. Stored in the user’s library (`provider: upload`, never sent to a model, never offered by search), upright, without metadata, at most 1200 px a side, as PNG; its tone is read from its pixels (`light` = drawn on a dark ground). Replaces the old logo, which is deleted.","tags":["brand"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"image/png":{"schema":{"type":"string","description":"The logo. PNG, JPEG or WebP (never SVG), up to 8 MB; a PNG with a see-through background is best.","format":"binary"}},"image/jpeg":{"schema":{"type":"string","description":"The logo. PNG, JPEG or WebP (never SVG), up to 8 MB; a PNG with a see-through background is best.","format":"binary"}},"image/webp":{"schema":{"type":"string","description":"The logo. PNG, JPEG or WebP (never SVG), up to 8 MB; a PNG with a see-through background is best.","format":"binary"}}}},"responses":{"200":{"description":"Stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandKitResponse"}}}},"400":{"description":"Not a PNG, JPEG or WebP picture, judged from the bytes (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is on neither allow-list (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Neither the property nor the event vertical is on here (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Larger than 8 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"File storage is not configured on this server (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteBrandKitLogo","summary":"No logo: the end card sets the business name as the mark. The logo is deleted from the library.","tags":["brand"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"Removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandKitResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is on neither allow-list (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Neither the property nor the event vertical is on here (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/studios":{"get":{"operationId":"listStudios","tags":["studios"],"security":[{"clerkJwt":[]}],"summary":"The caller’s interior studios, most recently changed first, each with its brand (the brand kit’s fields), look, reference links and its communities and flats counted.","responses":{"200":{"description":"The studios.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioListResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is not on INTERIORS_V2_USERS (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not on here, or no such studio or community of the caller (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"operationId":"createStudio","tags":["studios"],"security":[{"clerkJwt":[]}],"summary":"Make a studio: a name and any brand kit field, its look and reference links. An account’s FIRST studio copies its brand kit (logo too) for every field left out, once. WHAT LEAVES: stored by Toast; drawn by Toast’s own renderer on its flats’ videos; a reference link is never opened.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStudioRequest"}}}},"responses":{"201":{"description":"Made.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is not on INTERIORS_V2_USERS (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not on here, or no such studio or community of the caller (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/studios/{id}":{"get":{"operationId":"getStudio","tags":["studios"],"security":[{"clerkJwt":[]}],"summary":"One studio. `logo.url` lasts an hour.","parameters":[{"schema":{"type":"string","description":"Studio id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The studio.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is not on INTERIORS_V2_USERS (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not on here, or no such studio or community of the caller (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"updateStudio","tags":["studios"],"security":[{"clerkJwt":[]}],"summary":"Change a studio. A field left out is kept; \"\" clears it ([] a list); the name cannot be cleared; `look` and `references` are replaced whole. A finished video keeps the brand it was made with.","parameters":[{"schema":{"type":"string","description":"Studio id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStudioRequest"}}}},"responses":{"200":{"description":"Saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is not on INTERIORS_V2_USERS (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not on here, or no such studio or community of the caller (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteStudio","tags":["studios"],"security":[{"clerkJwt":[]}],"summary":"Delete a studio with no flats; its communities go with it.","parameters":[{"schema":{"type":"string","description":"Studio id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"400":{"description":"It still has flats: move or delete them first (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is not on INTERIORS_V2_USERS (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not on here, or no such studio or community of the caller (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/studios/{id}/logo":{"put":{"operationId":"uploadStudioLogo","tags":["studios"],"security":[{"clerkJwt":[]}],"summary":"Set a studio’s logo. The BODY IS THE PICTURE, as PUT /brand-kit/logo: stored in the user’s library, upright, without metadata, as PNG, its tone read from its pixels. The old logo is deleted once nothing names it.","parameters":[{"schema":{"type":"string","description":"Studio id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"image/png":{"schema":{"type":"string","description":"The logo. PNG, JPEG or WebP (never SVG), up to 8 MB; a PNG with a see-through background is best.","format":"binary"}},"image/jpeg":{"schema":{"type":"string","description":"The logo. PNG, JPEG or WebP (never SVG), up to 8 MB; a PNG with a see-through background is best.","format":"binary"}},"image/webp":{"schema":{"type":"string","description":"The logo. PNG, JPEG or WebP (never SVG), up to 8 MB; a PNG with a see-through background is best.","format":"binary"}}}},"responses":{"200":{"description":"Stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioResponse"}}}},"400":{"description":"Not a PNG, JPEG or WebP picture (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is not on INTERIORS_V2_USERS (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not on here, or no such studio or community of the caller (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Larger than 8 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"File storage is not configured on this server (`platform_budget_exhausted`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteStudioLogo","tags":["studios"],"security":[{"clerkJwt":[]}],"summary":"No logo for this studio: its end card sets the name as the mark.","parameters":[{"schema":{"type":"string","description":"Studio id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is not on INTERIORS_V2_USERS (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not on here, or no such studio or community of the caller (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/studios/{id}/communities":{"get":{"operationId":"listCommunities","tags":["studios"],"security":[{"clerkJwt":[]}],"summary":"A studio’s communities (societies), most recently changed first, flats counted.","parameters":[{"schema":{"type":"string","description":"Studio id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The communities.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityListResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is not on INTERIORS_V2_USERS (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not on here, or no such studio or community of the caller (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"operationId":"createCommunity","tags":["studios"],"security":[{"clerkJwt":[]}],"summary":"Add a community to a studio: its name, and optionally its area, builder and project RERA number, as typed. Stored by Toast; no third party.","parameters":[{"schema":{"type":"string","description":"Studio id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityRequest"}}}},"responses":{"201":{"description":"Added.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is not on INTERIORS_V2_USERS (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not on here, or no such studio or community of the caller (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/studios/{id}/communities/{cid}":{"patch":{"operationId":"updateCommunity","tags":["studios"],"security":[{"clerkJwt":[]}],"summary":"Change a community. A field left out is kept; \"\" clears it (not the name).","parameters":[{"schema":{"type":"string","description":"Studio id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Community id (uuid)."},"required":true,"name":"cid","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityRequest"}}}},"responses":{"200":{"description":"Saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is not on INTERIORS_V2_USERS (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not on here, or no such studio or community of the caller (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteCommunity","tags":["studios"],"security":[{"clerkJwt":[]}],"summary":"Delete a community with no flats.","parameters":[{"schema":{"type":"string","description":"Studio id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Community id (uuid)."},"required":true,"name":"cid","in":"path"}],"responses":{"204":{"description":"Deleted."},"400":{"description":"It still has flats: move or delete them first (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account is not on INTERIORS_V2_USERS (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not on here, or no such studio or community of the caller (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/events/access":{"get":{"operationId":"getEventAccess","summary":"Whether this account may use event videos (a server-side allow-list `EVENT_USERS` while events have no price). Offer them only when `enabled` is true. 404 means events are switched off on this server: treat it as absent.","tags":["events"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"Whether events may be offered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventAccess"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event for this caller, or events are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/events":{"post":{"operationId":"createEvent","summary":"Create an event: one function, launch, talk or wedding. `name` optional (a dated default).","tags":["events"],"security":[{"clerkJwt":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventRequest"}}}},"responses":{"201":{"description":"Created, with no files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not create events or upload yet; `GET /events/access` says so in `enabled` (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event for this caller, or events are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"listEvents","summary":"The caller’s events, most recently changed first (at most 200). `fileCount` counts files whose bytes are stored.","tags":["events"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event for this caller, or events are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/events/{id}":{"get":{"operationId":"getEvent","summary":"One event and every one of its files, oldest first.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The event and its files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event for this caller, or events are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"updateEvent","summary":"Rename the event.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventRequest"}}}},"responses":{"200":{"description":"Updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event for this caller, or events are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteEvent","summary":"Delete the event, its files and the stored bytes no other event of the caller still names. Permanent.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event for this caller, or events are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/events/{id}/files":{"post":{"operationId":"registerEventFiles","summary":"Register up to 500 files of the event’s folder by the SHA-256 of their bytes (hash on the device first). One answer per file, in order: `new` or `resume` (upload: PUT each part to its `url`, keep each response’s `ETag`, then POST …/complete), `have` (the caller’s bytes are already stored, maybe for another event: the file is in this event now, nothing to send), `refused` (`reason`: not video/photo/audio, over 50 GB, or the event is full). Idempotent. THE FOOTAGE IS STORED by Toast (private, while an event names it): with properties, the only places Toast keeps a user’s video.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterEventFilesRequest"}}}},"responses":{"200":{"description":"One answer per file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterEventFilesResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not create events or upload yet; `GET /events/access` says so in `enabled` (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event for this caller, or events are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"File storage is not configured on this server (`internal`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/events/{id}/files/{fid}/upload":{"post":{"operationId":"refreshEventFileUpload","summary":"Fresh part links while the file’s bytes are still `uploading` (links last 12 h): to resume a long or interrupted upload.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"The file’s id in this event (uuid)."},"required":true,"name":"fid","in":"path"}],"responses":{"200":{"description":"The file and its part links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventFileUploadResponse"}}}},"400":{"description":"The file is not uploading; register it again to upload it again (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not create events or upload yet; `GET /events/access` says so in `enabled` (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such file in this event (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/events/{id}/files/{fid}/complete":{"post":{"operationId":"completeEventFile","summary":"Join the uploaded parts. Send EVERY part with its ETag. The stored size is checked against the size registered: a mismatch rejects the bytes and deletes them (400). Idempotent: stored bytes answer 200 as they are.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"The file’s id in this event (uuid)."},"required":true,"name":"fid","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteEventFileRequest"}}}},"responses":{"200":{"description":"The file, now `uploaded`, `media.state: pending`: Toast now re-hashes the stored bytes and prepares its copies. Poll GET /events/{id} until it is `verified` + `ready`, `rejected` (bytes deleted), or `failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventFileResponse"}}}},"400":{"description":"A part is missing, or the stored size is wrong (the message says which) (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such file in this event (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/events/{id}/files/{fid}/media":{"get":{"operationId":"getEventFileMedia","summary":"Short-lived links (1 h) to what Toast PREPARED from one file on its own servers (no third party): a preview video (H.264, long side 960, with the sound), stills with their times, a 16 kHz mono WAV of the sound, a photo’s upright display copy. Stored with the original and deleted with it; no location, device or time tag. Empty, with `state` not `ready`, until prepared. Never the original.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"The file’s id in this event (uuid)."},"required":true,"name":"fid","in":"path"}],"responses":{"200":{"description":"The file and the links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventFileMediaResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such file in this event (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/events/{id}/files/{fid}":{"delete":{"operationId":"deleteEventFile","summary":"Remove one file from the event. Its stored bytes go too unless another of the caller’s events names them; an unfinished upload is aborted.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"The file’s id in this event (uuid)."},"required":true,"name":"fid","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such file in this event (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/events/{id}/read":{"post":{"operationId":"readEvent","summary":"Read the event: what happens in every file, as time ranges with one sentence each and the shot’s quality; the FEATURED people (by clothing, role and voice, never by face, never named), which voice is whom and how long each speaks; the moments worth keeping; files where a child can be seen; which words are sung. Waits for files still being prepared (up to 2 h), listens to each sound track once (kept with the bytes), then looks at every file in the order of their names. Idempotency-Key REQUIRED; a second ask while one runs answers that one (200). WHAT LEAVES: each sound track (WAV) to ElevenLabs Scribe; stills of every file, its length and facts about its sound (voices as letters with share and times; where music, applause and laughter are) to Anthropic’s Sonnet 5.5 via OpenRouter; never the transcript’s words, file names or the event’s name. Poll GET /events/{id}/reading.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["unread"],"description":"`unread`: add to the newest finished reading, reading only the files it did not read (skipped, or uploaded since); its files, people and the user’s names and merges are kept. Sends only those files’ stills and any sound not heard yet."},"required":false,"name":"only","in":"query"},{"schema":{"type":"string","description":"A new uuid per read; reuse only to retry."},"required":true,"name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The same key again, or a reading of this event already running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventReadingResponse"}}}},"202":{"description":"Started (`status: queued`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventReadingResponse"}}}},"400":{"description":"No Idempotency-Key, the key was used for another event, or no file is stored yet (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not create events or upload yet; `GET /events/access` says so in `enabled` (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event for this caller, or events are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/events/{id}/reading":{"get":{"operationId":"getEventReading","summary":"The newest reading. While it runs, `Retry-After: 4`: poll that often and show `activity` (one plain sentence). `summary`, `files` and `people` are filled once `status` is `done`; `skipped` names files that could not be read. Sung words are lyrics: never caption or quote them as speech.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The reading.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventReadingResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event, events are switched off, or never read (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"correctEventReading","summary":"Fix the people of the newest FINISHED reading: `name` (the name and the line under it, shown on screen exactly as typed; an empty name clears it), `merge` (these ids are one person: voices, clips and speaking time fold together), `feature` (show them in videos or not). Appended in order and applied on every read; a new reading starts with none (person ids are per reading). The names are stored with the reading and sent nowhere.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventCorrectionsRequest"}}}},"responses":{"200":{"description":"The reading with every correction applied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventReadingResponse"}}}},"400":{"description":"A correction does not parse (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event, or no finished reading to correct (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/events/{id}/formats":{"get":{"operationId":"listEventFormats","summary":"What Toast can make from THIS event: each format with `available` (else `missing`, in plain words), its shapes, the default shape (the footage’s own: a landscape shoot makes 16:9) and the length range. `childrenFiles` > 0 means the reading saw a child in that many files: ASK the user before a video (“Children appear in some clips. Are they your family, or do you have their parents’ OK?”) and send the answer as `childrenAllowed`. Only formats Toast can plan are listed.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The catalogue for this event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventFormatsResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event for this caller, or events are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/events/{id}/videos":{"post":{"operationId":"planEventVideo","summary":"Plan a video of the event (`highlight_reel`: the best lines said there over its moments). PLANS ONLY: the answer becomes a cut (`edl`, over the event’s stored files) and its `beats` (what plays, what the picture shows); nothing is rendered. Uses the newest finished reading with the user’s corrections. Without `childrenAllowed: true` no clip the reading saw a child in is shown. Idempotency-Key REQUIRED. Poll GET /events/{id}/videos/{vid}. WHAT LEAVES: the sentences said in the clips (sung lines left out), the featured people as refs with the reading’s role and description, the moments the reading found, its summary, the length and the user’s `ask` as typed, to Anthropic’s Sonnet 5.5 via OpenRouter; never a picture, a file name, the event’s name or the names and titles the user typed. A music mood’s tag words go to Jamendo.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"A new uuid per video; reuse only to retry."},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventVideoRequest"}}}},"responses":{"200":{"description":"The same key again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventVideoResponse"}}}},"202":{"description":"Planning (`status: planning`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventVideoResponse"}}}},"400":{"description":"No Idempotency-Key, the key was used for another event, the format is not available (the message says why) or does not come in that shape (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not create events or upload yet; `GET /events/access` says so in `enabled` (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event for this caller, or events are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"listEventVideos","summary":"The event’s videos, newest first, at most 100.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The videos.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventVideoList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event for this caller, or events are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/events/{id}/videos/{vid}":{"get":{"operationId":"getEventVideo","summary":"One video. While `planning`, `Retry-After: 3`: poll that often (a plan takes ~15 s). `failed` carries `error` in plain words; plan again with a new Idempotency-Key. Show `music.credit` wherever the video is published.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Video id (uuid)."},"required":true,"name":"vid","in":"path"}],"responses":{"200":{"description":"The video.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventVideoResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event or video for this caller, or events are switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/events/{id}/videos/{vid}/render":{"post":{"operationId":"renderEventVideo","summary":"Make the FINISHED FILE of a planned event video: rendered from the ORIGINAL uploads on Toast’s own worker (H.264 High, AAC 48 kHz, -14 LUFS, no metadata), with captions of the words it plays, the names and roles the user typed for the people who speak in it, and the plan’s title, drawn by Toast’s own card renderer; stored with the event (deleted with it and the account). Idempotent by state: while it renders or once it is made, asking again changes nothing (200); after a failure it starts again (202). Body `{ again: true }` makes a FINISHED video again (202, the new file replaces the old one; after the names changed, say); while it renders, still 200. Poll GET /events/{id}/videos/{vid} (`Retry-After: 5`) for `render.progress` and `render.activity`. WHAT LEAVES: nothing to a third party; the music track is fetched from Jamendo by Toast’s server.","tags":["events"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"Event id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Video id (uuid)."},"required":true,"name":"vid","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderEventVideoRequest"}}}},"responses":{"200":{"description":"Already being made, or made.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventVideoResponse"}}}},"202":{"description":"Making it (`render.status: rendering`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventVideoResponse"}}}},"400":{"description":"The video has no plan to make (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not create events or upload yet; `GET /events/access` says so in `enabled` (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such event or video for this caller, or events are switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The video is still being planned (`plan_in_progress`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/showcase":{"get":{"operationId":"listShowcase","summary":"Videos made with Toast, in the owner’s order. Public, no auth. Empty `items` when there are none. URLs are permanent and public; cached up to five minutes. Show `credits` under any full-size player (CC BY music requires it). Tolerate an unknown `kind`.","tags":["showcase"],"responses":{"200":{"description":"The shown items.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowcaseListResponse"}}}}}}},"/showcase/{slug}":{"get":{"operationId":"getShowcaseItem","summary":"One showcase video, for its own page. Public, no auth. A hidden item reads as 404, the same as a missing one.","tags":["showcase"],"parameters":[{"schema":{"type":"string","description":"The item’s slug, from `GET /showcase`."},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"The item.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowcaseItem"}}}},"404":{"description":"No such shown item (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/showcase/{slug}/events":{"post":{"operationId":"postShowcaseEvent","summary":"Count a play, a page open, or a \"Make one like this\" press. Public, no auth, 30/min per IP. The body takes `type` and nothing else; no user id, IP or device is stored. Fire and forget: never block the UI on it.","tags":["showcase"],"parameters":[{"schema":{"type":"string","description":"The item’s slug, from `GET /showcase`."},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowcaseEventRequest"}}}},"responses":{"204":{"description":"Counted."},"400":{"description":"Not exactly `{ type: play | open | make | view }` (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such shown item (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/shares":{"get":{"operationId":"listShares","summary":"Your videos shared on Toast, newest first, each with its state (uploading, preparing, pending, approved, rejected, expired, failed, removed; tolerate others). `enabled: false` = hide “Share on Toast” (still list, so unsharing works). Each call advances a `preparing` one: poll no faster than every 5 s.","tags":["shares"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"Your shares.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareListResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"operationId":"createShare","summary":"Ask for a finished video to be shown on “Made with Toast”. Show the privacy page’s words before the two ticks (`everyoneAgreed: true`, `children`). An export answers two presigned PUT links (the video, a still you made from it): PUT them with the exact contentType, then call `/shares/{id}/uploaded`. A motion video is copied by Toast (`upload: null`). WHAT LEAVES: the finished file and the still, to Toast’s PRIVATE storage; public only after a person at Toast approves it (video, still, title, credits; never your name). 10 a minute.","tags":["shares"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareCreateRequest"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareCreateResponse"}}}},"400":{"description":"A bad body, a missing tick, or over 10 minutes (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not your project or finished motion video, or sharing is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Three of your videos are already waiting for review (`share_limit`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Private storage is not configured on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/shares/{id}/uploaded":{"post":{"operationId":"shareUploaded","summary":"Say the video and its still are uploaded. Toast makes a copy without location, device or time details, deletes the file as uploaded, and the share waits for review (`preparing`, then `pending`).","tags":["shares"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The share’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"202":{"description":"Being prepared.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Share"}}}},"400":{"description":"The video or its still did not arrive, or the video is over 500 MB (then `failed`) (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No share of yours with that id (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"This share is not waiting for its upload (`not_uploading`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/shares/{id}":{"delete":{"operationId":"deleteShare","summary":"Unshare: the public copy, the still, the private files and the row are deleted. 204 also when there is none.","tags":["shares"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The share’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Unshared."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/showcase/{slug}/signup":{"post":{"operationId":"postShowcaseSignup","summary":"Count a new account that arrived through this video’s link. Call once after sign-in. Stores the video, the type and the time, never who. An account over a day old is not counted, and still answers 204.","tags":["showcase"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The item’s slug, from `GET /showcase`."},"required":true,"name":"slug","in":"path"}],"responses":{"204":{"description":"Done."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such shown item (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/client-config":{"get":{"operationId":"getClientConfig","summary":"Which app versions may run. Public, no auth: call it at launch, before anything else. Below `min_supported_version`, block with `message`; below `recommended_version`, a dismissable nudge. Compare as semver; `0.0.0` means no limit. FAIL OPEN: if this call errors or times out, let the user in.","tags":["client"],"responses":{"200":{"description":"The version limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientConfig"}}}}}}},"/me/export":{"get":{"operationId":"exportAccount","summary":"All of the caller’s data as one JSON file (sent as an attachment). Unpaginated. Each table is an array of rows; `omitted` says what is not there and why. Pictures are linked by `bytesUrl`, a path relative to this API’s origin, not embedded. Nothing is sent to anyone else.","tags":["account"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The account’s data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountExport"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/me":{"delete":{"operationId":"deleteAccount","summary":"Erase the caller’s account and everything Toast keeps for it, at once and for good. There is no undo: confirm in the app first. Idempotent: a repeat call succeeds. After a 2xx, sign out and clear what the app keeps on the device. App stores require this in the app’s settings.","tags":["account"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"What was erased.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeleteResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/settings/keyterms":{"get":{"operationId":"getKeyterms","summary":"The caller’s key terms: names and words transcription should get right. WHAT LEAVES: they are sent to the transcription provider as hints when a recording is transcribed.","tags":["settings"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Keyterms"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"operationId":"setKeyterms","summary":"REPLACE the caller’s key terms with this list. There is no add or remove: read, change, and send the whole list back.","tags":["settings"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Keyterms"}}}},"responses":{"200":{"description":"Saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"`keyterms` missing or not a list of strings (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/settings/usage":{"get":{"operationId":"getUsageTotals","summary":"What Toast spent serving the caller, all time, per service: `totals`. Cost reporting, NOT the balance (`GET /credits`). The answer also carries an older `usage` field for shipped callers; it is not part of this contract, so do not read it.","tags":["settings"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The totals.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageTotalsResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/settings/usage/history":{"get":{"operationId":"getUsageHistory","summary":"What Toast spent serving the caller, per UTC day and service, in US dollars and the service’s own units. Cost reporting, NOT the balance: a meter of what is left is `GET /credits`.","tags":["settings"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":365,"description":"How many days back, 1-365. Default 30."},"required":false,"name":"days","in":"query"}],"responses":{"200":{"description":"The days.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageHistoryResponse"}}}},"400":{"description":"`days` outside 1-365 (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/sessions":{"post":{"operationId":"recordEditSession","summary":"Record one editor action (accept, reject, override…). One row per call, no batch: send meaningful actions, not UI events. Fire and forget: a failure must never block the edit. `actionType` is not checked, so use the strings existing clients send. Stored in Toast’s own database; `instructionText` is the user’s words.","tags":["sessions"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditSessionCreateRequest"}}}},"responses":{"201":{"description":"Recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditSessionCreateResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not the caller’s project, or no such project (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/feedback/submit":{"post":{"operationId":"submitFeedback","summary":"Send Toast a message, with an optional image or text file. Public, no auth; 5 a minute per IP, body at most 8 MB. WHAT LEAVES: the email address, the message and the attachment go to Toast’s email service and on to Toast’s inbox; say so before the user attaches anything. NEVER a video: offer only images and text in the picker.","tags":["feedback"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackSubmitRequest"}}}},"responses":{"200":{"description":"Sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackSubmitResponse"}}}},"400":{"description":"No valid email (the error envelope, `invalid_input`), or no message or one too long (a plain `{ error }`).","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"$ref":"#/components/schemas/PlainError"}]}}}},"413":{"description":"The attachment is over 5 MB decoded, or the body over 8 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlainError"}}}},"415":{"description":"The attachment is not an image or text file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlainError"}}}},"429":{"description":"More than 5 a minute (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"The email service failed; try again later (`ai_upstream_failed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Feedback is not set up on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlainError"}}}}}}},"/referrals":{"get":{"operationId":"getReferrals","summary":"The caller’s link and how it is doing. `enabled: false` means the programme is off: show nothing.","tags":["referrals"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The link and its counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralState"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/referrals/claim":{"post":{"operationId":"claimReferral","summary":"Tie this account to the link it came through. Call once after sign-in and forget the code, whatever the answer.","tags":["referrals"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralClaimRequest"}}}},"responses":{"200":{"description":"Whether it was tied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralClaimResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/referrals/finished":{"post":{"operationId":"referralVideoFinished","summary":"A video finished on this device. Pays both sides once, if this account joined through a link. Idempotent.","tags":["referrals"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralFinishedRequest"}}}},"responses":{"200":{"description":"Whether this call paid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralFinishedResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/reports":{"get":{"operationId":"listReports","summary":"Your reports on your videos, newest first, each with its state (refunded, waiting, noted, declined; tolerate others). `enabled: false` = hide “Report a problem”.","tags":["reports"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"Your reports.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReportListResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"operationId":"createReport","summary":"Report a problem with one of your videos, once per video. Read `status`: `refunded` = what the video cost is back in the wallet; `waiting` = past the lifetime cap, the owner decides; `noted` = nothing to give back (a free video). A refunded project is never charged again. WHAT LEAVES: the category, the note and the moments marked, to Toast’s server only; kept until the account is deleted. 10 a minute.","tags":["reports"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReportCreateRequest"}}}},"responses":{"201":{"description":"Filed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReport"}}}},"400":{"description":"A bad body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not your video, or reporting is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"This video was already reported (`already_reported`), or is still being made (`not_finished`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/share-credits":{"get":{"operationId":"listShareCredits","summary":"Your shares for credit, newest first, with the caption to ask for, how many rewards you have had of `maxRewards`, and whether your next video is clean (`cleanNextVideo`). `enabled: false` = hide every share-for-credit screen (switched off, or `closed`: the programme has ended or its money is given back). The end date and the budget are never in it: do not tell a person when it ends. With `video=<kind>:<id>` (one of yours), `video` says what it cost, what an approved share gives back now and whether it carries the mark; asking takes nothing. Tolerate a `status` you do not know.","tags":["share-credits"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"One of your videos as `<kind>:<id>` (`project`, `motion`, `property`, `event`), for `video` in the answer.","example":"motion:11111111-1111-4111-8111-111111111111"},"required":false,"name":"video","in":"query"}],"responses":{"200":{"description":"Your shares.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareCreditState"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"operationId":"createShareCredit","summary":"Send the post of one of your videos, once per video, then PUT the screenshot to `upload.url` (exact `contentType`, within `expiresInS`) and call `/uploaded`. A person at Toast checks it; approved = the video’s cost back (up to a cap) and your next video without the mark. WHAT LEAVES: the post’s link, the handle, which video and the screenshot, to Toast only (private storage); never video. 10 a minute.","tags":["share-credits"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareCreditCreateRequest"}}}},"responses":{"201":{"description":"Made; upload the screenshot next.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareCreditCreateResponse"}}}},"400":{"description":"A bad body, a post link that is not https on the platform named, or no `handle` (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not your video, or share for credit is switched off (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Already sent for this video (`already_sent`), that post’s link already sent by anyone (`post_already_sent`), every reward had (`share_credit_limit`), every reward had by that social account across Toast accounts (`share_credit_handle_limit`), three waiting (`share_credit_pending`), or the programme has ended (`share_credit_closed`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Private storage is not configured (`storage_not_configured`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/share-credits/{id}/uploaded":{"post":{"operationId":"shareCreditUploaded","summary":"The screenshot is uploaded: the share now waits for a person at Toast (`waiting`). Over 5 MB = the share is deleted.","tags":["share-credits"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The share’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Waiting for review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareCredit"}}}},"400":{"description":"The screenshot did not arrive, or is over 5 MB (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No share of yours with that id (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Not waiting for its screenshot (`not_uploading`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/share-credits/{id}":{"delete":{"operationId":"withdrawShareCredit","summary":"Withdraw a share not decided yet; its screenshot is deleted. 204 also when there is none.","tags":["share-credits"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The share’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Withdrawn (or there was none)."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Already approved or rejected (`decided`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/screens/access":{"get":{"operationId":"getScreensAccess","summary":"Whether this account may make an animated video from screen recordings, and the caps to show before upload (5 recordings, 10 minutes each, 30 in all by default). 404 = switched off on this server.","tags":["motion"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"Access and caps.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreensAccess"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such set (or recording) for this caller, or screen recordings are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/screens":{"post":{"operationId":"createScreens","summary":"Start a set of screen recordings for one animated video. `attest` is THE TICK BEFORE UPLOAD, required: `no_private_data` (nothing on these screens is someone else’s private data) or `permission`.","tags":["motion"],"security":[{"clerkJwt":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScreensRequest"}}}},"responses":{"201":{"description":"Created, with no recordings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreensResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not upload or read screen recordings yet; `GET /motion/screens/access` says so (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such set (or recording) for this caller, or screen recordings are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/screens/{id}":{"get":{"operationId":"getScreens","summary":"The set: its recordings in order, the reading (live `activity` + `progress` while it runs; `Retry-After: 4`: poll that often) with each screen’s times, what it is, its step, whether it shows private details (`sensitive`, `boxes`) and the user’s choice, and `quote`: what reading the unread recordings costs.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The set’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreensResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such set (or recording) for this caller, or screen recordings are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"operationId":"updateScreens","summary":"Order the recordings (`order`: every recording id once) and/or choose each screen: `show`, `blur` (its boxes blurred on Toast’s servers before the video’s maker gets it) or `leave` (never in the video), with an optional name. A screen marked sensitive starts `leave`. Free; reads nothing again.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The set’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScreensRequest"}}}},"responses":{"200":{"description":"Updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreensResponse"}}}},"400":{"description":"The body, or choices before a reading (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such set (or recording) for this caller, or screen recordings are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteScreens","summary":"Delete the set and the stored recordings nothing else of the caller names. A set no video was made from also goes by itself a day after its last change. Permanent.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The set’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such set (or recording) for this caller, or screen recordings are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/screens/{id}/recordings":{"post":{"operationId":"registerScreenRecordings","summary":"Register recordings by the SHA-256 of their bytes (hash on the device first), with `durationMs` so one over the caps is refused before upload. One answer per file: `new`/`resume` (PUT each part to its `url`, keep each `ETag`, then POST …/complete), `have` (already stored for this caller), `refused` (`reason`: not a video, over 50 GB, or over the caps). Idempotent. THE RECORDING IS STORED by Toast (private, while a video made from it exists).","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The set’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterScreenRecordingsRequest"}}}},"responses":{"200":{"description":"One answer per file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterScreenRecordingsResponse"}}}},"400":{"description":"The body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not upload or read screen recordings yet; `GET /motion/screens/access` says so (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such set (or recording) for this caller, or screen recordings are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"File storage is not configured on this server (`internal`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/screens/{id}/recordings/{rid}/upload":{"post":{"operationId":"refreshScreenRecordingUpload","summary":"Fresh part links (12 h) while the recording is still `uploading`.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The set’s id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"The recording’s id in this set (uuid)."},"required":true,"name":"rid","in":"path"}],"responses":{"200":{"description":"The recording and its part links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenRecordingUploadResponse"}}}},"400":{"description":"Not uploading (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not upload or read screen recordings yet; `GET /motion/screens/access` says so (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such set (or recording) for this caller, or screen recordings are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/screens/{id}/recordings/{rid}/complete":{"post":{"operationId":"completeScreenRecording","summary":"Join the uploaded parts (every part with its ETag). A stored size that is not the size registered rejects and deletes the bytes (400). Then Toast re-hashes and prepares it: poll GET /motion/screens/{id} until `verified` + media `ready`.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The set’s id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"The recording’s id in this set (uuid)."},"required":true,"name":"rid","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteScreenRecordingRequest"}}}},"responses":{"200":{"description":"The recording, now `uploaded`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenRecordingResponse"}}}},"400":{"description":"A part missing, or the wrong size (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such set (or recording) for this caller, or screen recordings are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/screens/{id}/recordings/{rid}/media":{"get":{"operationId":"getScreenRecordingMedia","summary":"Links (1 h) to what Toast prepared from a recording on its own servers: a 960 px preview with its sound, stills with their times, the WAV. Never the original.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The set’s id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"The recording’s id in this set (uuid)."},"required":true,"name":"rid","in":"path"}],"responses":{"200":{"description":"The recording and the links.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenRecordingMediaResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such set (or recording) for this caller, or screen recordings are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/screens/{id}/recordings/{rid}":{"delete":{"operationId":"deleteScreenRecording","summary":"Remove one recording from the set (its screens leave the reading); its bytes go unless something else of the caller names them.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The set’s id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"The recording’s id in this set (uuid)."},"required":true,"name":"rid","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such set (or recording) for this caller, or screen recordings are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/motion/screens/{id}/read":{"post":{"operationId":"readScreens","summary":"Read the recordings not read yet: what each screen is, its main words, the action, ONE flow of steps across all recordings in order, and which screens show someone’s private details. Waits for preparation (up to 2 h). Idempotency-Key REQUIRED. With the wallet on it HOLDS `quote` (charged at cost x 1.30 only when a video is made from the set; given back whole otherwise). WHAT LEAVES: each recording’s sound (WAV) to ElevenLabs Scribe once per bytes; its stills (one every 4 s and at each change of screen, repeats dropped) with each recording’s length, the words said in it with their times and what earlier recordings were read as, to Anthropic’s Sonnet 5.5 via OpenRouter. Each recording is read once. Poll GET /motion/screens/{id}.","tags":["motion"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The set’s id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"A fresh token per reading you mean to start."},"required":true,"name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"One is running, the same key, or nothing is left to read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreensResponse"}}}},"202":{"description":"Started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreensResponse"}}}},"400":{"description":"No Idempotency-Key, no stored recording, or over the caps (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"The wallet cannot cover the reading (`user_quota_exhausted`, with the quote).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"This account may not upload or read screen recordings yet; `GET /motion/screens/access` says so (`forbidden`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such set (or recording) for this caller, or screen recordings are switched off on this server (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/avatars/access":{"get":{"operationId":"getAvatarsAccess","summary":"Whether to offer the avatars door to this account (`AVATARS_ENABLED` + the allow-list `AVATARS_USERS`), the languages an avatar may speak, and the words the user ticks before Make. Never 404.","tags":["projects"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"Whether avatars may be offered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarAccess"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/avatars":{"get":{"operationId":"listAvatars","summary":"The published avatars, every one an invented character (drawn, checked not to resemble a real person, voiced, and seen by a person at Toast), in catalog order. Links inside are short-lived: fetch again rather than cache.","tags":["projects"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The library.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such published avatar, or avatars are switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/avatars/{id}":{"get":{"operationId":"getAvatar","summary":"One published avatar by its stable id.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The avatar’s stable slug."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The avatar.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarSummary"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such published avatar, or avatars are switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/avatars/videos":{"post":{"operationId":"createAvatarVideo","summary":"Start a video of a published avatar speaking the caller’s text (news, a product, an invitation, an update, a joke). `attested: true` is the tick (`AvatarAccess.attestation`). Stores the text; sends nothing. With an Idempotency-Key a retry answers the same video (200).","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"A fresh token per video (create) or per Make you mean to start."},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAvatarVideoRequest"}}}},"responses":{"200":{"description":"This Idempotency-Key already made it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarVideoResponse"}}}},"201":{"description":"Created, in draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarVideoResponse"}}}},"400":{"description":"No tick, an avatar not available, or a language or use it does not have (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such published avatar, or avatars are switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"operationId":"listAvatarVideos","summary":"The caller’s 50 newest avatar videos, newest first.","tags":["projects"],"security":[{"clerkJwt":[]}],"responses":{"200":{"description":"The videos.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarVideoList"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such published avatar, or avatars are switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/avatars/videos/{id}":{"get":{"operationId":"getAvatarVideo","summary":"One avatar video. Poll it while `making` (Retry-After 5): `activity` and `progress` say where it is; `video.url` is a short-lived link once `ready`.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The avatar video’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The video.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarVideoResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such avatar video for this caller, or avatars are switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"operationId":"deleteAvatarVideo","summary":"Delete the video and everything stored for it (speech, take, finished video).","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The avatar video’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such avatar video for this caller, or avatars are switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/avatars/videos/{id}/script":{"post":{"operationId":"writeAvatarScript","summary":"Toast’s AI writes the script in the avatar’s way of speaking, from the caller’s text, in its language. WHAT LEAVES: the text, language, purpose and length, with the avatar as words, to an AI model through OpenRouter (`data_collection: deny`). 400 until the privacy page’s sentence for avatars is live (nothing sent), or with the model’s refusal as the message (e.g. a political campaign message).","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The avatar video’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Scripted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarVideoResponse"}}}},"400":{"description":"Not yet available, already being made, or refused (`invalid_input`, the reason in the message).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such avatar video for this caller, or avatars are switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"502":{"description":"No usable script (`ai_upstream_failed`); nothing kept, retry is safe.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"operationId":"putAvatarScript","summary":"The caller’s own script (sends nothing).","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The avatar video’s id (uuid)."},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutAvatarScriptRequest"}}}},"responses":{"200":{"description":"Scripted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarVideoResponse"}}}},"400":{"description":"Already being made, or a bad body (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such avatar video for this caller, or avatars are switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/avatars/videos/{id}/estimate":{"post":{"operationId":"estimateAvatarVideo","summary":"What making it costs: its spoken seconds, the cost, and the wallet’s price (cost x 1.30, at least Rs 200) against the balance, or `wallet: null` while the wallet is off. Writes nothing.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The avatar video’s id (uuid)."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The price.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarEstimateResponse"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such avatar video for this caller, or avatars are switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/avatars/videos/{id}/make":{"post":{"operationId":"makeAvatarVideo","summary":"Make it: the avatar’s designed voice speaks the script (ElevenLabs), presenter takes are made from its portrait and that speech (ByteDance’s OmniHuman 1.5 on Replicate, over expiring links, a take per piece of at most ~28 s, each checked for burned-in text on Toast’s own worker), and Toast’s renderer burns the “AI presenter” label over the whole video. Holds the price; settles at the real cost, nothing made = nothing charged. Idempotency-Key REQUIRED. Poll GET /avatars/videos/{id}.","tags":["projects"],"security":[{"clerkJwt":[]}],"parameters":[{"schema":{"type":"string","description":"The avatar video’s id (uuid)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"A fresh token per video (create) or per Make you mean to start."},"required":true,"name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"This key already started it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarVideoResponse"}}}},"202":{"description":"Started (`making`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarVideoResponse"}}}},"400":{"description":"No key, no script, not yet available, or the avatar is not ready (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid credentials (`unauthenticated`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"The wallet cannot cover the price (`user_quota_exhausted`, with the quote).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"No such avatar video for this caller, or avatars are switched off for this account (`not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Already being made, or the video changed meanwhile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limit exceeded (`rate_limit_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}},"webhooks":{}}