{"openapi":"3.1.0","info":{"title":"Brainrotten API","version":"1.3.0","description":"One account-owned learning companion: sessions, contextual explanations, quizzes, practice and reflection. Studio, MCP and future mobile clients share these resources."},"servers":[{"url":"/api/v1"}],"security":[{"bearerAuth":[]}],"paths":{"/health":{"get":{"summary":"Service liveness","security":[],"responses":{"200":{"description":"Service is responding"}}}},"/studio/config":{"get":{"summary":"Public capability and sign-in configuration","security":[],"responses":{"200":{"description":"Public configuration; never API keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioConfig"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/videos":{"post":{"operationId":"createVideo","summary":"Queue a video","description":"Choose skit (two speakers), casefile, whiteboard or pov (one narrator and timed scene beats). Set quizCount from 0 to 3 for optional review questions. Supply a topic or a complete agent-written script. Choose a stable requestId for safe retries. Complete scripts bypass Gemini/Paper. Hosted generation uses project voices and five lifetime reservations per authenticated user; Maya and custom voice IDs are local-only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateVideoInput"}}}},"responses":{"202":{"description":"Video job and current progress. Ready hosted jobs include short-lived signed media URLs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"}}}},"400":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listVideos","summary":"List your videos","responses":{"200":{"description":"Jobs visible to the authenticated caller","content":{"application/json":{"schema":{"type":"object","required":["jobs"],"properties":{"jobs":{"type":"array","items":{"$ref":"#/components/schemas/VideoJob"}}}}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/videos/{jobId}":{"get":{"operationId":"getVideo","summary":"Poll a video job","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Video job and current progress. Ready hosted jobs include short-lived signed media URLs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/videos/{jobId}/learning":{"get":{"operationId":"getLearningPack","summary":"Read a completed video’s chapters, review questions and transcript","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Portable learning pack with replay timestamps","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearningPack"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/videos/validate":{"post":{"operationId":"validateVideoScript","summary":"Check structure and readiness without generation","requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"An intended GenerateVideoInput, including invalid fields to diagnose"}}}},"responses":{"200":{"description":"Issues, warnings and advisory readiness; never factual verification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScriptValidation"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/library":{"get":{"operationId":"getVideoLibrary","summary":"Search and paginate the private video library","parameters":[{"name":"q","in":"query","schema":{"default":"","type":"string","maxLength":120}},{"name":"format","in":"query","schema":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]}},{"name":"state","in":"query","schema":{"type":"string","enum":["queued","processing","ready","failed","needs_review"]}},{"name":"review","in":"query","schema":{"default":"all","type":"string","enum":["all","unwatched","in-progress","completed","bookmarked","unanswered","needs-practice"]}},{"name":"limit","in":"query","schema":{"default":12,"type":"integer","minimum":1,"maximum":50}},{"name":"cursor","in":"query","schema":{"type":"string","maxLength":1000}}],"responses":{"200":{"description":"Video summaries and review state, with nextCursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoLibrary"}}}},"400":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/videos/{jobId}/review":{"get":{"operationId":"getVideoReview","summary":"Read saved playback and quiz state","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Caller-owned review state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReview"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"updateVideoReview","summary":"Patch watch position, bookmark or an answer with an expected version","description":"Answers are graded by the service from the saved learning pack. A stale version returns 409 with the current review. Updates never spend generation quota.","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReviewPatch"}}}},"responses":{"200":{"description":"Updated state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoReview"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Concurrent update; current review is included","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewConflict"}}}},"422":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/images/search":{"post":{"operationId":"searchReferenceImage","summary":"Find one Google reference image","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageSearchInput"}}}},"responses":{"200":{"description":"First usable result, its source and optional matching thumbnail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageSearchResult"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/formats/guide":{"get":{"operationId":"getFormatGuide","summary":"Rules and a complete valid example for one format (sketch, skit, prreview, tierlist, groupchat)","description":"No authentication, no generation. Without a format it returns the playbook. Used by MCP get_video_formats and the Python SDK.","security":[],"parameters":[{"name":"format","in":"query","schema":{"type":"string","enum":["skit","sketch","groupchat","prreview","tierlist"]}},{"name":"language","in":"query","schema":{"type":"string","enum":["en","hinglish","benglish"],"default":"hinglish"}}],"responses":{"200":{"description":"Format rules, ready voices and a complete example request"},"400":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/learning-guide":{"get":{"operationId":"getLearningGuide","summary":"Teaching recipes and format selection guidance for any connected agent","responses":{"200":{"description":"Versioned teaching workflow; no generation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearningGuide"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions":{"post":{"operationId":"recordLearningSession","summary":"Save a curated, caller-owned learning checkpoint","description":"Context is labelled agent-supplied. Include a prediction prompt and a transfer practice task. Stable requestId makes retries idempotent; changed context requires a new checkpoint ID. Never send secrets or full chat dumps.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLearningSession"}}}},"responses":{"201":{"description":"Saved checkpoint and format recommendation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearningSession"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listLearningSessions","summary":"Page through learning checkpoints","parameters":[{"name":"limit","in":"query","schema":{"default":10,"type":"integer","minimum":1,"maximum":20}},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Bounded summaries, without full code/context","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionPage"}}}},"400":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{sessionId}":{"get":{"operationId":"getLearningSession","summary":"Read context, linked video jobs and saved learner responses","parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Owned session detail; hosted videos have fresh signed media links","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDetail"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{sessionId}/guide":{"get":{"operationId":"getSessionGuide","summary":"Read teaching instructions with this session’s context and recommendation","parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Contextual guide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearningGuide"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{sessionId}/videos":{"post":{"operationId":"publishSessionLesson","summary":"Queue a complete agent-written explanation and quiz for this session","description":"Requires a complete script with 1–3 comprehension questions. Uses the same generation engine, idempotency and hosted quota as POST /videos. The agent chooses the supported format. Generation is explicit and paid-capable.","parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateVideoInput"}}}},"responses":{"202":{"description":"Video job and current progress. Ready hosted jobs include short-lived signed media URLs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sessions/{sessionId}/review":{"get":{"operationId":"getSessionResponses","summary":"Read prediction, confidence, practice and reflection","parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Durable learner responses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReview"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"saveSessionResponse","summary":"Save one learner response using its expected version","description":"Learner-only: local owner session or first-party hosted client. The hosted agent client cannot write these responses. Practice completion and thinking traps are self-report, never proof of mastery or a diagnosis.","parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReviewPatch"}}}},"responses":{"200":{"description":"Updated response state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReview"}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Concurrent change; includes current sessionReview"},"422":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me":{"get":{"summary":"Read your lifetime trial allowance","responses":{"200":{"description":"Quota status","content":{"application/json":{"schema":{"type":"object","properties":{"quota":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"},"remaining":{"type":"integer"}}}}}}}},"401":{"description":"Request rejected. Branch on code (stable), show message, retry only when retryable is true. 400 malformed or missing JSON, 413 body too large, 415 body not application/json, 422 failed validation. Retry an uncertain POST /videos only with its original requestId, which makes it idempotent. A 401 for a missing or invalid token comes from API Gateway itself and carries only message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Cognito access token from Google sign-in. ID tokens are not accepted."}},"schemas":{"CreateLearningSession":{"type":"object","properties":{"requestId":{"type":"string","minLength":8,"maxLength":128},"title":{"type":"string","minLength":3,"maxLength":140},"projectName":{"type":"string","minLength":1,"maxLength":100},"agent":{"type":"string","minLength":1,"maxLength":80},"intent":{"default":"change","type":"string","enum":["change","debugging","architecture","concept","review"]},"objective":{"type":"string","minLength":10,"maxLength":400},"context":{"type":"object","properties":{"task":{"type":"string","minLength":3,"maxLength":2000},"summary":{"type":"string","minLength":3,"maxLength":4000},"changes":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":600}},"concepts":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"decisions":{"default":[],"maxItems":6,"type":"array","items":{"type":"object","properties":{"choice":{"type":"string","minLength":1,"maxLength":300},"reason":{"type":"string","minLength":1,"maxLength":600},"tradeoff":{"type":"string","maxLength":400}},"required":["choice","reason"],"additionalProperties":false}},"uncertainties":{"default":[],"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":400}},"evidence":{"default":[],"maxItems":8,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["code","diff","test-output","agent-note"]},"label":{"type":"string","minLength":1,"maxLength":120},"content":{"type":"string","minLength":1,"maxLength":4000}},"required":["kind","label","content"],"additionalProperties":false}}},"required":["task","summary","changes","concepts","decisions","uncertainties","evidence"],"additionalProperties":false},"activity":{"type":"object","properties":{"predictionPrompt":{"type":"string","minLength":10,"maxLength":400},"practice":{"type":"object","properties":{"prompt":{"type":"string","minLength":10,"maxLength":800},"successCriteria":{"type":"string","minLength":10,"maxLength":600},"hint":{"type":"string","maxLength":400}},"required":["prompt","successCriteria"],"additionalProperties":false},"reflectionPrompt":{"default":"What did you assume, and what would you check before accepting a similar AI change?","type":"string","minLength":10,"maxLength":400}},"required":["predictionPrompt","practice","reflectionPrompt"],"additionalProperties":false},"preferredFormat":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"formatRationale":{"type":"string","minLength":10,"maxLength":400}},"required":["requestId","title","projectName","agent","intent","objective","context","activity"],"additionalProperties":false},"LearningSession":{"type":"object","properties":{"requestId":{"type":"string","minLength":8,"maxLength":128},"title":{"type":"string","minLength":3,"maxLength":140},"projectName":{"type":"string","minLength":1,"maxLength":100},"agent":{"type":"string","minLength":1,"maxLength":80},"intent":{"default":"change","type":"string","enum":["change","debugging","architecture","concept","review"]},"objective":{"type":"string","minLength":10,"maxLength":400},"context":{"type":"object","properties":{"task":{"type":"string","minLength":3,"maxLength":2000},"summary":{"type":"string","minLength":3,"maxLength":4000},"changes":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":600}},"concepts":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"decisions":{"default":[],"maxItems":6,"type":"array","items":{"type":"object","properties":{"choice":{"type":"string","minLength":1,"maxLength":300},"reason":{"type":"string","minLength":1,"maxLength":600},"tradeoff":{"type":"string","maxLength":400}},"required":["choice","reason"],"additionalProperties":false}},"uncertainties":{"default":[],"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":400}},"evidence":{"default":[],"maxItems":8,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["code","diff","test-output","agent-note"]},"label":{"type":"string","minLength":1,"maxLength":120},"content":{"type":"string","minLength":1,"maxLength":4000}},"required":["kind","label","content"],"additionalProperties":false}}},"required":["task","summary","changes","concepts","decisions","uncertainties","evidence"],"additionalProperties":false},"activity":{"type":"object","properties":{"predictionPrompt":{"type":"string","minLength":10,"maxLength":400},"practice":{"type":"object","properties":{"prompt":{"type":"string","minLength":10,"maxLength":800},"successCriteria":{"type":"string","minLength":10,"maxLength":600},"hint":{"type":"string","maxLength":400}},"required":["prompt","successCriteria"],"additionalProperties":false},"reflectionPrompt":{"default":"What did you assume, and what would you check before accepting a similar AI change?","type":"string","minLength":10,"maxLength":400}},"required":["predictionPrompt","practice","reflectionPrompt"],"additionalProperties":false},"preferredFormat":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"formatRationale":{"type":"string","minLength":10,"maxLength":400},"schemaVersion":{"type":"string","const":"BrainrottenSessionV1"},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"recommendation":{"type":"object","properties":{"format":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"reason":{"type":"string","minLength":1,"maxLength":600},"chosenBy":{"type":"string","enum":["routing-guide","agent"]}},"required":["format","reason","chosenBy"],"additionalProperties":false},"evidenceTrust":{"type":"string","const":"agent-supplied"}},"required":["requestId","title","projectName","agent","intent","objective","context","activity","schemaVersion","sessionId","createdAt","recommendation","evidenceTrust"],"additionalProperties":false},"SessionReview":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"BrainrottenSessionReviewV1"},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"prediction":{"anyOf":[{"type":"object","properties":{"text":{"type":"string","maxLength":2000},"confidence":{"anyOf":[{"type":"integer","minimum":1,"maximum":5},{"type":"null"}]},"skipped":{"type":"boolean"}},"required":["text","confidence","skipped"],"additionalProperties":false},{"type":"null"}]},"practice":{"anyOf":[{"type":"object","properties":{"attempt":{"type":"string","maxLength":4000},"completed":{"type":"boolean"}},"required":["attempt","completed"],"additionalProperties":false},{"type":"null"}]},"reflection":{"anyOf":[{"type":"object","properties":{"explanation":{"type":"string","maxLength":3000},"confidence":{"type":"integer","minimum":1,"maximum":5},"traps":{"maxItems":8,"type":"array","items":{"type":"string","enum":["forming","dislodging","assumption","location","achievement","progression","interruption","mislead"]}},"nextAction":{"type":"string","maxLength":1000}},"required":["explanation","confidence","traps","nextAction"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["schemaVersion","sessionId","version","prediction","practice","reflection","updatedAt"],"additionalProperties":false},"SessionReviewPatch":{"oneOf":[{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"kind":{"type":"string","const":"predict"},"text":{"type":"string","maxLength":2000},"confidence":{"anyOf":[{"type":"integer","minimum":1,"maximum":5},{"type":"null"}]},"skipped":{"type":"boolean"}},"required":["expectedVersion","kind","text","confidence","skipped"],"additionalProperties":false},{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"kind":{"type":"string","const":"practice"},"attempt":{"type":"string","maxLength":4000},"completed":{"type":"boolean"}},"required":["expectedVersion","kind","attempt","completed"],"additionalProperties":false},{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"kind":{"type":"string","const":"reflect"},"explanation":{"type":"string","minLength":3,"maxLength":3000},"confidence":{"type":"integer","minimum":1,"maximum":5},"traps":{"maxItems":8,"type":"array","items":{"type":"string","enum":["forming","dislodging","assumption","location","achievement","progression","interruption","mislead"]}},"nextAction":{"type":"string","maxLength":1000}},"required":["expectedVersion","kind","explanation","confidence","traps","nextAction"],"additionalProperties":false}]},"SessionDetail":{"type":"object","properties":{"session":{"type":"object","properties":{"requestId":{"type":"string","minLength":8,"maxLength":128},"title":{"type":"string","minLength":3,"maxLength":140},"projectName":{"type":"string","minLength":1,"maxLength":100},"agent":{"type":"string","minLength":1,"maxLength":80},"intent":{"default":"change","type":"string","enum":["change","debugging","architecture","concept","review"]},"objective":{"type":"string","minLength":10,"maxLength":400},"context":{"type":"object","properties":{"task":{"type":"string","minLength":3,"maxLength":2000},"summary":{"type":"string","minLength":3,"maxLength":4000},"changes":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":600}},"concepts":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"decisions":{"default":[],"maxItems":6,"type":"array","items":{"type":"object","properties":{"choice":{"type":"string","minLength":1,"maxLength":300},"reason":{"type":"string","minLength":1,"maxLength":600},"tradeoff":{"type":"string","maxLength":400}},"required":["choice","reason"],"additionalProperties":false}},"uncertainties":{"default":[],"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":400}},"evidence":{"default":[],"maxItems":8,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["code","diff","test-output","agent-note"]},"label":{"type":"string","minLength":1,"maxLength":120},"content":{"type":"string","minLength":1,"maxLength":4000}},"required":["kind","label","content"],"additionalProperties":false}}},"required":["task","summary","changes","concepts","decisions","uncertainties","evidence"],"additionalProperties":false},"activity":{"type":"object","properties":{"predictionPrompt":{"type":"string","minLength":10,"maxLength":400},"practice":{"type":"object","properties":{"prompt":{"type":"string","minLength":10,"maxLength":800},"successCriteria":{"type":"string","minLength":10,"maxLength":600},"hint":{"type":"string","maxLength":400}},"required":["prompt","successCriteria"],"additionalProperties":false},"reflectionPrompt":{"default":"What did you assume, and what would you check before accepting a similar AI change?","type":"string","minLength":10,"maxLength":400}},"required":["predictionPrompt","practice","reflectionPrompt"],"additionalProperties":false},"preferredFormat":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"formatRationale":{"type":"string","minLength":10,"maxLength":400},"schemaVersion":{"type":"string","const":"BrainrottenSessionV1"},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"recommendation":{"type":"object","properties":{"format":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"reason":{"type":"string","minLength":1,"maxLength":600},"chosenBy":{"type":"string","enum":["routing-guide","agent"]}},"required":["format","reason","chosenBy"],"additionalProperties":false},"evidenceTrust":{"type":"string","const":"agent-supplied"}},"required":["requestId","title","projectName","agent","intent","objective","context","activity","schemaVersion","sessionId","createdAt","recommendation","evidenceTrust"],"additionalProperties":false},"review":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"BrainrottenSessionReviewV1"},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"prediction":{"anyOf":[{"type":"object","properties":{"text":{"type":"string","maxLength":2000},"confidence":{"anyOf":[{"type":"integer","minimum":1,"maximum":5},{"type":"null"}]},"skipped":{"type":"boolean"}},"required":["text","confidence","skipped"],"additionalProperties":false},{"type":"null"}]},"practice":{"anyOf":[{"type":"object","properties":{"attempt":{"type":"string","maxLength":4000},"completed":{"type":"boolean"}},"required":["attempt","completed"],"additionalProperties":false},{"type":"null"}]},"reflection":{"anyOf":[{"type":"object","properties":{"explanation":{"type":"string","maxLength":3000},"confidence":{"type":"integer","minimum":1,"maximum":5},"traps":{"maxItems":8,"type":"array","items":{"type":"string","enum":["forming","dislodging","assumption","location","achievement","progression","interruption","mislead"]}},"nextAction":{"type":"string","maxLength":1000}},"required":["explanation","confidence","traps","nextAction"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["schemaVersion","sessionId","version","prediction","practice","reflection","updatedAt"],"additionalProperties":false},"videos":{"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"state":{"type":"string","enum":["queued","processing","ready","failed","needs_review"]},"stage":{"type":"string","enum":["queued","scripting","voicing","rendering","ready","failed"]},"progress":{"type":"number","minimum":0,"maximum":100},"prompt":{"type":"string"},"title":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"mediaExpired":{"type":"boolean"},"mediaExpiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"videoUrl":{"type":["string","null"]},"downloadUrl":{"type":"string"},"posterUrl":{"type":["string","null"]},"audioUrl":{"type":["string","null"]},"error":{"type":["string","null"]},"script":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100},"participants":{"type":"object","properties":{"learner":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"The chosen learner: asks focused questions throughout the video"},"expert":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"The chosen expert: gives direct substantive answers throughout the video"}},"required":["learner","expert"],"additionalProperties":false},"narrator":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"]},"chat":{"description":"Group chat formats only: group name and members.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":32,"description":"Group name, e.g. \"checkout-prod 💀\""},"members":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"Voice only: a ready cloned voice that reads this member's messages. Characters are never drawn in group chats."},"name":{"type":"string","minLength":1,"maxLength":20,"description":"Who this member is, shown in the chat, e.g. \"Redis Cache\", \"Payment API\", \"Postgres\", \"the intern\""},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"Avatar icon: a Lucide name (\"database\", \"zap\", \"smartphone\") or a Simple Icons brand (\"postgresql\", \"redis\", \"stripe\"). get_video_formats lists suggestions."},"you":{"description":"At most one member is \"you\": right-aligned green bubbles","type":"boolean"}},"required":["speaker","name","icon"],"additionalProperties":false}}},"required":["title","members"],"additionalProperties":false},"pr":{"description":"PR review format only: the pull request, its real diff and reviewers.","type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":64},"repo":{"description":"owner/name, shown in the header","type":"string","pattern":"^[A-Za-z0-9_.-]{1,24}\\/[A-Za-z0-9_.-]{1,32}$"},"author":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":24},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"A Lucide icon name (\"database\", \"zap\", \"user\") or a Simple Icons brand (\"github\", \"postgresql\")"}},"required":["name","icon"],"additionalProperties":false,"description":"Who opened the PR, e.g. the user's agent (\"claude-code\", icon \"anthropic\") or the user"},"reviewers":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"Voice only; never drawn"},"name":{"type":"string","minLength":1,"maxLength":24},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"A Lucide icon name (\"database\", \"zap\", \"user\") or a Simple Icons brand (\"github\", \"postgresql\")"}},"required":["speaker","name","icon"],"additionalProperties":false}},"files":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":56},"language":{"default":"text","type":"string","maxLength":20},"lines":{"minItems":1,"maxItems":24,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["add","del","ctx"]},"code":{"type":"string","maxLength":46,"description":"One line of the real diff, at most 46 characters so it fits a phone"}},"required":["kind","code"],"additionalProperties":false}}},"required":["path","language","lines"],"additionalProperties":false}},"verdict":{"type":"string","enum":["approve","request-changes","comment"]}},"required":["title","author","reviewers","files","verdict"],"additionalProperties":false},"sketch":{"description":"Sketch board format only: the nodes and edges to draw.","type":"object","properties":{"nodes":{"minItems":2,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"label":{"type":"string","minLength":1,"maxLength":28},"kind":{"default":"service","type":"string","enum":["actor","service","store","queue","external"]},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"A Lucide icon name (\"database\", \"zap\", \"user\") or a Simple Icons brand (\"github\", \"postgresql\")"}},"required":["id","label","kind"],"additionalProperties":false}},"edges":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"to":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"label":{"type":"string","minLength":1,"maxLength":18}},"required":["from","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false},"tierlist":{"description":"Tier list format only: the criterion and items.","type":"object","properties":{"criterion":{"type":"string","minLength":3,"maxLength":60,"description":"What the ranking measures, shown on screen the whole time, e.g. \"survives a lost response\""},"items":{"minItems":3,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"label":{"type":"string","minLength":1,"maxLength":24},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"A Lucide icon name (\"database\", \"zap\", \"user\") or a Simple Icons brand (\"github\", \"postgresql\")"}},"required":["id","label"],"additionalProperties":false}}},"required":["criterion","items"],"additionalProperties":false},"dialogue":{"minItems":2,"maxItems":60,"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"]},"text":{"type":"string","minLength":1,"maxLength":650},"tone":{"description":"Subtle delivery cue, separate from spoken/caption text. Omit for the reference voice’s normal tone.","type":"string","enum":["neutral","curious","thoughtful","amused","confident","concerned"]},"scene":{"type":"object","properties":{"beat":{"type":"string","enum":["setup","investigate","escalate","resolve"]},"heading":{"type":"string","minLength":1,"maxLength":64},"diagram":{"type":"object","properties":{"nodes":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"label":{"type":"string","minLength":1,"maxLength":64}},"required":["id","label"],"additionalProperties":false}},"edges":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false},"journey":{"type":"object","properties":{"location":{"type":"string","minLength":1,"maxLength":48},"action":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["running","waiting","blocked","done"]},"state":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":28},"value":{"type":"string","minLength":1,"maxLength":70}},"required":["key","value"],"additionalProperties":false}}},"required":["location","action","status","state"],"additionalProperties":false}},"required":["beat","heading"],"additionalProperties":false},"broll":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"code"},"code":{"type":"string","minLength":1,"maxLength":4000},"language":{"default":"text","type":"string","maxLength":30}},"required":["kind","code","language"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"image"},"query":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"caption":{"default":"","type":"string","maxLength":100},"sourceUrl":{"type":"string","format":"uri"},"title":{"type":"string","maxLength":300}},"required":["kind","caption"],"additionalProperties":false}]},"brollSequence":{"description":"Ordered reference images/code for this spoken turn. Replaces broll when present; split the turn time among the inserts. Use distinct relevant views for comparisons and changes.","minItems":1,"maxItems":4,"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"code"},"code":{"type":"string","minLength":1,"maxLength":4000},"language":{"default":"text","type":"string","maxLength":30}},"required":["kind","code","language"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"image"},"query":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"caption":{"default":"","type":"string","maxLength":100},"sourceUrl":{"type":"string","format":"uri"},"title":{"type":"string","maxLength":300}},"required":["kind","caption"],"additionalProperties":false}]}},"chat":{"description":"Group chat formats only.","type":"object","properties":{"display":{"description":"Texting-style bubble text (slang, emoji, lowercase). Defaults to the spoken text.","type":"string","minLength":1,"maxLength":200},"reaction":{"description":"One reaction tapped under this message by another member.","type":"string","enum":["😂","💀","😭","👍","🔥","😳","🙏","❤️","🤡","👀"]},"code":{"description":"A short code snippet sent as its own monospace bubble right after the text. At most 8 lines, 34 columns.","type":"string","minLength":1,"maxLength":320}},"additionalProperties":false},"pr":{"description":"PR review format only.","type":"object","properties":{"file":{"description":"Index into script.pr.files; omit for the final summary comment","type":"integer","minimum":0,"maximum":2},"lines":{"description":"Inclusive [start, end] indices into that file's lines, at most 8 lines","type":"array","prefixItems":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"integer","minimum":0,"maximum":9007199254740991}],"items":false,"minItems":2,"maxItems":2},"display":{"description":"Comment text as written in the review (markdown-free, emoji fine). Defaults to the spoken text.","type":"string","minLength":1,"maxLength":220},"tone":{"default":"question","type":"string","enum":["praise","question","nit","roast","blocker"]}},"required":["tone"],"additionalProperties":false},"sketch":{"description":"Sketch board format only.","type":"object","properties":{"show":{"description":"Elements that appear on this line (node ids or \"from>to\")","maxItems":6,"type":"array","items":{"type":"string","maxLength":50}},"focus":{"description":"Elements to highlight while this line is spoken","maxItems":4,"type":"array","items":{"type":"string","maxLength":50}},"mark":{"description":"Color the focused elements as the problem (red) or the fix (green)","type":"string","enum":["problem","fix"]},"note":{"description":"A short red marker note next to an element","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":40},"near":{"type":"string","maxLength":50}},"required":["text","near"],"additionalProperties":false}},"additionalProperties":false},"tier":{"description":"Tier list format only.","type":"object","properties":{"place":{"description":"Put this item in a tier on this line","type":"object","properties":{"item":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"tier":{"type":"string","enum":["S","A","B","C","D","F"]}},"required":["item","tier"],"additionalProperties":false},"focus":{"description":"Hold up an item being discussed before it is placed","type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"}},"additionalProperties":false},"pause":{"description":"Pause & Predict after this line; the next line must reveal the answer.","type":"object","properties":{"prompt":{"type":"string","minLength":5,"maxLength":140},"choices":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"answer":{"type":"integer","minimum":0,"maximum":3},"seconds":{"description":"Optional minimum thinking time. Brainrotten extends it to fit the reading time of the question and choices.","type":"integer","minimum":3,"maximum":10}},"required":["prompt","choices","answer"],"additionalProperties":false}},"required":["speaker","text"],"additionalProperties":false}},"takeaway":{"type":"string","maxLength":240},"questions":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_-]{0,47}$"},"prompt":{"type":"string","minLength":1,"maxLength":240},"choices":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"answer":{"type":"integer","minimum":0,"maximum":3},"explanation":{"type":"string","minLength":1,"maxLength":400},"turnIndices":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"integer","minimum":0,"maximum":59}}},"required":["prompt","choices","answer","explanation","turnIndices"],"additionalProperties":false}},"question":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":240},"choices":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"answer":{"type":"integer","minimum":0,"maximum":3},"explanation":{"type":"string","maxLength":300}},"required":["prompt","choices","answer","explanation"],"additionalProperties":false}},"required":["title","dialogue"],"additionalProperties":false},"durationSeconds":{"type":["number","null"]},"cast":{"type":"string","enum":["auto","custom","oggy-jack","badri-budhdev","jhaplu-paplu-taplu","motu-patlu"]},"language":{"type":"string","enum":["en","hinglish","benglish","hi"]},"participants":{"type":"object","properties":{"learner":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"The chosen learner: asks focused questions throughout the video"},"expert":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"The chosen expert: gives direct substantive answers throughout the video"}},"required":["learner","expert"],"additionalProperties":false},"voiceBackend":{"type":"string","enum":["elevenlabs","maya-local"]},"voiceNames":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"backgroundName":{"type":"string"},"sourceCredits":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"attribution":{"type":"string"}},"required":["title","url","attribution"],"additionalProperties":false}},"format":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"narrator":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"]},"learning":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"BrainrottenLearningPackV1"},"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"format":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"title":{"type":"string","minLength":1,"maxLength":140},"language":{"type":"string","enum":["en","hinglish","benglish","hi"]},"durationSeconds":{"type":"number","exclusiveMinimum":0,"maximum":240},"takeaway":{"type":"string","minLength":1,"maxLength":650},"chapters":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"startMs":{"type":"number","minimum":0},"endMs":{"type":"number","exclusiveMinimum":0}},"required":["id","title","startMs","endMs"],"additionalProperties":false}},"questions":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string","minLength":1,"maxLength":240},"choices":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"answer":{"type":"integer","minimum":0,"maximum":3},"explanation":{"type":"string","minLength":1,"maxLength":400},"turnIndices":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"integer","minimum":0,"maximum":59}},"startMs":{"type":"number","minimum":0},"endMs":{"type":"number","exclusiveMinimum":0}},"required":["id","prompt","choices","answer","explanation","turnIndices","startMs","endMs"],"additionalProperties":false}},"flashcards":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"front":{"type":"string","maxLength":240},"back":{"type":"string","maxLength":600},"startMs":{"type":"number","minimum":0},"endMs":{"type":"number","exclusiveMinimum":0}},"required":["id","front","back","startMs","endMs"],"additionalProperties":false}},"transcript":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"turnIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"speaker":{"type":"string"},"text":{"type":"string"},"startMs":{"type":"number","minimum":0},"endMs":{"type":"number","exclusiveMinimum":0}},"required":["turnIndex","speaker","text","startMs","endMs"],"additionalProperties":false}}},"required":["schemaVersion","jobId","format","title","language","durationSeconds","takeaway","chapters","questions","transcript"],"additionalProperties":false},"outputs":{"type":"object","properties":{"learningUrl":{"type":"string"},"notesUrl":{"type":"string"},"captionsUrl":{"type":"string"},"flashcardsUrl":{"type":"string"}},"required":["learningUrl","notesUrl","captionsUrl"],"additionalProperties":false}},"required":["jobId","state","stage","progress","prompt","title","createdAt","updatedAt","videoUrl","error"],"additionalProperties":false}}},"required":["session","review","videos"],"additionalProperties":false},"SessionPage":{"type":"object","properties":{"sessions":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":3,"maxLength":140},"projectName":{"type":"string","minLength":1,"maxLength":100},"agent":{"type":"string","minLength":1,"maxLength":80},"intent":{"default":"change","type":"string","enum":["change","debugging","architecture","concept","review"]},"objective":{"type":"string","minLength":10,"maxLength":400},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"recommendation":{"type":"object","properties":{"format":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"reason":{"type":"string","minLength":1,"maxLength":600},"chosenBy":{"type":"string","enum":["routing-guide","agent"]}},"required":["format","reason","chosenBy"],"additionalProperties":false}},"required":["sessionId","title","projectName","agent","intent","objective","createdAt","recommendation"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["sessions","nextCursor"],"additionalProperties":false},"LearningGuide":{"type":"object","properties":{"version":{"type":"string","const":"BrainrottenTeachingGuideV1"},"purpose":{"type":"string"},"workflow":{"type":"array","items":{"type":"string"}},"formatRouting":{"type":"array","items":{"type":"object","properties":{"format":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"when":{"type":"string"}},"required":["format","when"],"additionalProperties":false}},"teachingRules":{"type":"array","items":{"type":"string"}},"traps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["forming","dislodging","assumption","location","achievement","progression","interruption","mislead"]},"name":{"type":"string"},"prompt":{"type":"string"}},"required":["id","name","prompt"],"additionalProperties":false}},"session":{"type":"object","properties":{"requestId":{"type":"string","minLength":8,"maxLength":128},"title":{"type":"string","minLength":3,"maxLength":140},"projectName":{"type":"string","minLength":1,"maxLength":100},"agent":{"type":"string","minLength":1,"maxLength":80},"intent":{"default":"change","type":"string","enum":["change","debugging","architecture","concept","review"]},"objective":{"type":"string","minLength":10,"maxLength":400},"context":{"type":"object","properties":{"task":{"type":"string","minLength":3,"maxLength":2000},"summary":{"type":"string","minLength":3,"maxLength":4000},"changes":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":600}},"concepts":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"decisions":{"default":[],"maxItems":6,"type":"array","items":{"type":"object","properties":{"choice":{"type":"string","minLength":1,"maxLength":300},"reason":{"type":"string","minLength":1,"maxLength":600},"tradeoff":{"type":"string","maxLength":400}},"required":["choice","reason"],"additionalProperties":false}},"uncertainties":{"default":[],"maxItems":6,"type":"array","items":{"type":"string","minLength":1,"maxLength":400}},"evidence":{"default":[],"maxItems":8,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["code","diff","test-output","agent-note"]},"label":{"type":"string","minLength":1,"maxLength":120},"content":{"type":"string","minLength":1,"maxLength":4000}},"required":["kind","label","content"],"additionalProperties":false}}},"required":["task","summary","changes","concepts","decisions","uncertainties","evidence"],"additionalProperties":false},"activity":{"type":"object","properties":{"predictionPrompt":{"type":"string","minLength":10,"maxLength":400},"practice":{"type":"object","properties":{"prompt":{"type":"string","minLength":10,"maxLength":800},"successCriteria":{"type":"string","minLength":10,"maxLength":600},"hint":{"type":"string","maxLength":400}},"required":["prompt","successCriteria"],"additionalProperties":false},"reflectionPrompt":{"default":"What did you assume, and what would you check before accepting a similar AI change?","type":"string","minLength":10,"maxLength":400}},"required":["predictionPrompt","practice","reflectionPrompt"],"additionalProperties":false},"preferredFormat":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"formatRationale":{"type":"string","minLength":10,"maxLength":400},"schemaVersion":{"type":"string","const":"BrainrottenSessionV1"},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"recommendation":{"type":"object","properties":{"format":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"reason":{"type":"string","minLength":1,"maxLength":600},"chosenBy":{"type":"string","enum":["routing-guide","agent"]}},"required":["format","reason","chosenBy"],"additionalProperties":false},"evidenceTrust":{"type":"string","const":"agent-supplied"}},"required":["requestId","title","projectName","agent","intent","objective","context","activity","schemaVersion","sessionId","createdAt","recommendation","evidenceTrust"],"additionalProperties":false},"recommendation":{"type":"object","properties":{"format":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"reason":{"type":"string","minLength":1,"maxLength":600},"chosenBy":{"type":"string","enum":["routing-guide","agent"]}},"required":["format","reason","chosenBy"],"additionalProperties":false},"activity":{"type":"object","properties":{"predictionPrompt":{"type":"string","minLength":10,"maxLength":400},"practice":{"type":"object","properties":{"prompt":{"type":"string","minLength":10,"maxLength":800},"successCriteria":{"type":"string","minLength":10,"maxLength":600},"hint":{"type":"string","maxLength":400}},"required":["prompt","successCriteria"],"additionalProperties":false},"reflectionPrompt":{"default":"What did you assume, and what would you check before accepting a similar AI change?","type":"string","minLength":10,"maxLength":400}},"required":["predictionPrompt","practice","reflectionPrompt"],"additionalProperties":false}},"required":["version","purpose","workflow","formatRouting","teachingRules","traps"],"additionalProperties":false},"ReviewConflict":{"type":"object","properties":{"message":{"type":"string"},"review":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"BrainrottenReviewV1"},"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"positionMs":{"type":"integer","minimum":0,"maximum":240000},"furthestMs":{"type":"integer","minimum":0,"maximum":240000},"completed":{"type":"boolean"},"bookmarked":{"type":"boolean"},"answers":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_-]{0,47}$"},"additionalProperties":{"type":"object","properties":{"choice":{"type":"integer","minimum":0,"maximum":3},"correct":{"type":"boolean"},"attempts":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"answeredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["choice","correct","attempts","answeredAt"],"additionalProperties":false}},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["schemaVersion","jobId","version","positionMs","furthestMs","completed","bookmarked","answers","updatedAt"],"additionalProperties":false}},"required":["message","review"],"additionalProperties":false},"VideoReview":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"BrainrottenReviewV1"},"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"positionMs":{"type":"integer","minimum":0,"maximum":240000},"furthestMs":{"type":"integer","minimum":0,"maximum":240000},"completed":{"type":"boolean"},"bookmarked":{"type":"boolean"},"answers":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_-]{0,47}$"},"additionalProperties":{"type":"object","properties":{"choice":{"type":"integer","minimum":0,"maximum":3},"correct":{"type":"boolean"},"attempts":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"answeredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["choice","correct","attempts","answeredAt"],"additionalProperties":false}},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["schemaVersion","jobId","version","positionMs","furthestMs","completed","bookmarked","answers","updatedAt"],"additionalProperties":false},"VideoReviewPatch":{"oneOf":[{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"kind":{"type":"string","const":"watch"},"positionMs":{"type":"integer","minimum":0,"maximum":240000},"completed":{"type":"boolean"}},"required":["expectedVersion","kind","positionMs"],"additionalProperties":false},{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"kind":{"type":"string","const":"answer"},"questionId":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_-]{0,47}$"},"choice":{"type":"integer","minimum":0,"maximum":3}},"required":["expectedVersion","kind","questionId","choice"],"additionalProperties":false},{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"kind":{"type":"string","const":"bookmark"},"value":{"type":"boolean"}},"required":["expectedVersion","kind","value"],"additionalProperties":false},{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"kind":{"type":"string","const":"reset-answers"}},"required":["expectedVersion","kind"],"additionalProperties":false}]},"VideoLibrary":{"type":"object","properties":{"jobs":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":["string","null"]},"prompt":{"type":"string"},"state":{"type":"string","enum":["queued","processing","ready","failed","needs_review"]},"stage":{"type":"string","enum":["queued","scripting","voicing","rendering","ready","failed"]},"progress":{"type":"number","minimum":0,"maximum":100},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"posterUrl":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"mediaExpired":{"type":"boolean"},"mediaExpiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"format":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"language":{"type":"string","enum":["en","hinglish","benglish","hi"]},"voiceBackend":{"type":"string","enum":["elevenlabs","maya-local"]},"error":{"type":["string","null"]},"review":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"BrainrottenReviewV1"},"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"positionMs":{"type":"integer","minimum":0,"maximum":240000},"furthestMs":{"type":"integer","minimum":0,"maximum":240000},"completed":{"type":"boolean"},"bookmarked":{"type":"boolean"},"answers":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_-]{0,47}$"},"additionalProperties":{"type":"object","properties":{"choice":{"type":"integer","minimum":0,"maximum":3},"correct":{"type":"boolean"},"attempts":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"answeredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["choice","correct","attempts","answeredAt"],"additionalProperties":false}},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["schemaVersion","jobId","version","positionMs","furthestMs","completed","bookmarked","answers","updatedAt"],"additionalProperties":false},"questionCount":{"type":"integer","minimum":0,"maximum":3}},"required":["jobId","title","prompt","state","stage","progress","createdAt","updatedAt","error","review","questionCount"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["jobs","nextCursor"],"additionalProperties":false},"ScriptValidation":{"type":"object","properties":{"valid":{"type":"boolean"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"string"}},"format":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"spokenCharacters":{"type":"integer","minimum":0,"maximum":9007199254740991},"estimatedSeconds":{"type":"number","minimum":0},"speakers":{"type":"array","items":{"type":"string"}},"generationReady":{"type":"boolean"}},"required":["valid","issues","warnings","spokenCharacters","estimatedSeconds","speakers","generationReady"],"additionalProperties":false},"LearningPack":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"BrainrottenLearningPackV1"},"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"format":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"title":{"type":"string","minLength":1,"maxLength":140},"language":{"type":"string","enum":["en","hinglish","benglish","hi"]},"durationSeconds":{"type":"number","exclusiveMinimum":0,"maximum":240},"takeaway":{"type":"string","minLength":1,"maxLength":650},"chapters":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"startMs":{"type":"number","minimum":0},"endMs":{"type":"number","exclusiveMinimum":0}},"required":["id","title","startMs","endMs"],"additionalProperties":false}},"questions":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string","minLength":1,"maxLength":240},"choices":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"answer":{"type":"integer","minimum":0,"maximum":3},"explanation":{"type":"string","minLength":1,"maxLength":400},"turnIndices":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"integer","minimum":0,"maximum":59}},"startMs":{"type":"number","minimum":0},"endMs":{"type":"number","exclusiveMinimum":0}},"required":["id","prompt","choices","answer","explanation","turnIndices","startMs","endMs"],"additionalProperties":false}},"flashcards":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"front":{"type":"string","maxLength":240},"back":{"type":"string","maxLength":600},"startMs":{"type":"number","minimum":0},"endMs":{"type":"number","exclusiveMinimum":0}},"required":["id","front","back","startMs","endMs"],"additionalProperties":false}},"transcript":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"turnIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"speaker":{"type":"string"},"text":{"type":"string"},"startMs":{"type":"number","minimum":0},"endMs":{"type":"number","exclusiveMinimum":0}},"required":["turnIndex","speaker","text","startMs","endMs"],"additionalProperties":false}}},"required":["schemaVersion","jobId","format","title","language","durationSeconds","takeaway","chapters","questions","transcript"],"additionalProperties":false},"GenerateVideoInput":{"type":"object","properties":{"sessionId":{"description":"An existing caller-owned learning session. Links the video to that session and account.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"scriptProvider":{"description":"Script model: auto prefers configured Gemini, otherwise Paper. Explicit selection never falls back. Complete agent scripts bypass both.","type":"string","enum":["auto","paper","gemini"]},"prompt":{"type":"string","minLength":3,"maxLength":32000},"script":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100},"participants":{"type":"object","properties":{"learner":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"The chosen learner: asks focused questions throughout the video"},"expert":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"The chosen expert: gives direct substantive answers throughout the video"}},"required":["learner","expert"],"additionalProperties":false},"narrator":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"]},"chat":{"description":"Group chat formats only: group name and members.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":32,"description":"Group name, e.g. \"checkout-prod 💀\""},"members":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"Voice only: a ready cloned voice that reads this member's messages. Characters are never drawn in group chats."},"name":{"type":"string","minLength":1,"maxLength":20,"description":"Who this member is, shown in the chat, e.g. \"Redis Cache\", \"Payment API\", \"Postgres\", \"the intern\""},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"Avatar icon: a Lucide name (\"database\", \"zap\", \"smartphone\") or a Simple Icons brand (\"postgresql\", \"redis\", \"stripe\"). get_video_formats lists suggestions."},"you":{"description":"At most one member is \"you\": right-aligned green bubbles","type":"boolean"}},"required":["speaker","name","icon"],"additionalProperties":false}}},"required":["title","members"],"additionalProperties":false},"pr":{"description":"PR review format only: the pull request, its real diff and reviewers.","type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":64},"repo":{"description":"owner/name, shown in the header","type":"string","pattern":"^[A-Za-z0-9_.-]{1,24}\\/[A-Za-z0-9_.-]{1,32}$"},"author":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":24},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"A Lucide icon name (\"database\", \"zap\", \"user\") or a Simple Icons brand (\"github\", \"postgresql\")"}},"required":["name","icon"],"additionalProperties":false,"description":"Who opened the PR, e.g. the user's agent (\"claude-code\", icon \"anthropic\") or the user"},"reviewers":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"Voice only; never drawn"},"name":{"type":"string","minLength":1,"maxLength":24},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"A Lucide icon name (\"database\", \"zap\", \"user\") or a Simple Icons brand (\"github\", \"postgresql\")"}},"required":["speaker","name","icon"],"additionalProperties":false}},"files":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":56},"language":{"default":"text","type":"string","maxLength":20},"lines":{"minItems":1,"maxItems":24,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["add","del","ctx"]},"code":{"type":"string","maxLength":46,"description":"One line of the real diff, at most 46 characters so it fits a phone"}},"required":["kind","code"],"additionalProperties":false}}},"required":["path","language","lines"],"additionalProperties":false}},"verdict":{"type":"string","enum":["approve","request-changes","comment"]}},"required":["title","author","reviewers","files","verdict"],"additionalProperties":false},"sketch":{"description":"Sketch board format only: the nodes and edges to draw.","type":"object","properties":{"nodes":{"minItems":2,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"label":{"type":"string","minLength":1,"maxLength":28},"kind":{"default":"service","type":"string","enum":["actor","service","store","queue","external"]},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"A Lucide icon name (\"database\", \"zap\", \"user\") or a Simple Icons brand (\"github\", \"postgresql\")"}},"required":["id","label","kind"],"additionalProperties":false}},"edges":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"to":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"label":{"type":"string","minLength":1,"maxLength":18}},"required":["from","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false},"tierlist":{"description":"Tier list format only: the criterion and items.","type":"object","properties":{"criterion":{"type":"string","minLength":3,"maxLength":60,"description":"What the ranking measures, shown on screen the whole time, e.g. \"survives a lost response\""},"items":{"minItems":3,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"label":{"type":"string","minLength":1,"maxLength":24},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"A Lucide icon name (\"database\", \"zap\", \"user\") or a Simple Icons brand (\"github\", \"postgresql\")"}},"required":["id","label"],"additionalProperties":false}}},"required":["criterion","items"],"additionalProperties":false},"dialogue":{"minItems":2,"maxItems":60,"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"]},"text":{"type":"string","minLength":1,"maxLength":650},"tone":{"description":"Subtle delivery cue, separate from spoken/caption text. Omit for the reference voice’s normal tone.","type":"string","enum":["neutral","curious","thoughtful","amused","confident","concerned"]},"scene":{"type":"object","properties":{"beat":{"type":"string","enum":["setup","investigate","escalate","resolve"]},"heading":{"type":"string","minLength":1,"maxLength":64},"diagram":{"type":"object","properties":{"nodes":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"label":{"type":"string","minLength":1,"maxLength":64}},"required":["id","label"],"additionalProperties":false}},"edges":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false},"journey":{"type":"object","properties":{"location":{"type":"string","minLength":1,"maxLength":48},"action":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["running","waiting","blocked","done"]},"state":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":28},"value":{"type":"string","minLength":1,"maxLength":70}},"required":["key","value"],"additionalProperties":false}}},"required":["location","action","status","state"],"additionalProperties":false}},"required":["beat","heading"],"additionalProperties":false},"broll":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"code"},"code":{"type":"string","minLength":1,"maxLength":4000},"language":{"default":"text","type":"string","maxLength":30}},"required":["kind","code","language"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"image"},"query":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"caption":{"default":"","type":"string","maxLength":100},"sourceUrl":{"type":"string","format":"uri"},"title":{"type":"string","maxLength":300}},"required":["kind","caption"],"additionalProperties":false}]},"brollSequence":{"description":"Ordered reference images/code for this spoken turn. Replaces broll when present; split the turn time among the inserts. Use distinct relevant views for comparisons and changes.","minItems":1,"maxItems":4,"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"code"},"code":{"type":"string","minLength":1,"maxLength":4000},"language":{"default":"text","type":"string","maxLength":30}},"required":["kind","code","language"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"image"},"query":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"caption":{"default":"","type":"string","maxLength":100},"sourceUrl":{"type":"string","format":"uri"},"title":{"type":"string","maxLength":300}},"required":["kind","caption"],"additionalProperties":false}]}},"chat":{"description":"Group chat formats only.","type":"object","properties":{"display":{"description":"Texting-style bubble text (slang, emoji, lowercase). Defaults to the spoken text.","type":"string","minLength":1,"maxLength":200},"reaction":{"description":"One reaction tapped under this message by another member.","type":"string","enum":["😂","💀","😭","👍","🔥","😳","🙏","❤️","🤡","👀"]},"code":{"description":"A short code snippet sent as its own monospace bubble right after the text. At most 8 lines, 34 columns.","type":"string","minLength":1,"maxLength":320}},"additionalProperties":false},"pr":{"description":"PR review format only.","type":"object","properties":{"file":{"description":"Index into script.pr.files; omit for the final summary comment","type":"integer","minimum":0,"maximum":2},"lines":{"description":"Inclusive [start, end] indices into that file's lines, at most 8 lines","type":"array","prefixItems":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"integer","minimum":0,"maximum":9007199254740991}],"items":false,"minItems":2,"maxItems":2},"display":{"description":"Comment text as written in the review (markdown-free, emoji fine). Defaults to the spoken text.","type":"string","minLength":1,"maxLength":220},"tone":{"default":"question","type":"string","enum":["praise","question","nit","roast","blocker"]}},"required":["tone"],"additionalProperties":false},"sketch":{"description":"Sketch board format only.","type":"object","properties":{"show":{"description":"Elements that appear on this line (node ids or \"from>to\")","maxItems":6,"type":"array","items":{"type":"string","maxLength":50}},"focus":{"description":"Elements to highlight while this line is spoken","maxItems":4,"type":"array","items":{"type":"string","maxLength":50}},"mark":{"description":"Color the focused elements as the problem (red) or the fix (green)","type":"string","enum":["problem","fix"]},"note":{"description":"A short red marker note next to an element","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":40},"near":{"type":"string","maxLength":50}},"required":["text","near"],"additionalProperties":false}},"additionalProperties":false},"tier":{"description":"Tier list format only.","type":"object","properties":{"place":{"description":"Put this item in a tier on this line","type":"object","properties":{"item":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"tier":{"type":"string","enum":["S","A","B","C","D","F"]}},"required":["item","tier"],"additionalProperties":false},"focus":{"description":"Hold up an item being discussed before it is placed","type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"}},"additionalProperties":false},"pause":{"description":"Pause & Predict after this line; the next line must reveal the answer.","type":"object","properties":{"prompt":{"type":"string","minLength":5,"maxLength":140},"choices":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"answer":{"type":"integer","minimum":0,"maximum":3},"seconds":{"description":"Optional minimum thinking time. Brainrotten extends it to fit the reading time of the question and choices.","type":"integer","minimum":3,"maximum":10}},"required":["prompt","choices","answer"],"additionalProperties":false}},"required":["speaker","text"],"additionalProperties":false}},"takeaway":{"type":"string","maxLength":240},"questions":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_-]{0,47}$"},"prompt":{"type":"string","minLength":1,"maxLength":240},"choices":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"answer":{"type":"integer","minimum":0,"maximum":3},"explanation":{"type":"string","minLength":1,"maxLength":400},"turnIndices":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"integer","minimum":0,"maximum":59}}},"required":["prompt","choices","answer","explanation","turnIndices"],"additionalProperties":false}},"question":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":240},"choices":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"answer":{"type":"integer","minimum":0,"maximum":3},"explanation":{"type":"string","maxLength":300}},"required":["prompt","choices","answer","explanation"],"additionalProperties":false}},"required":["title","dialogue"],"additionalProperties":false},"style":{"default":"brainrot","type":"string","enum":["brainrot","calm"]},"durationSeconds":{"default":60,"type":"integer","minimum":15,"maximum":180},"cast":{"default":"auto","type":"string","enum":["auto","custom","oggy-jack","badri-budhdev","jhaplu-paplu-taplu","motu-patlu"]},"participants":{"description":"The invoking agent chooses any two ready characters: learner asks, expert answers. Supports cross-show pairs.","type":"object","properties":{"learner":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"The chosen learner: asks focused questions throughout the video"},"expert":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"The chosen expert: gives direct substantive answers throughout the video"}},"required":["learner","expert"],"additionalProperties":false},"language":{"default":"hinglish","type":"string","enum":["en","hinglish","benglish"]},"speechSpeed":{"default":1.12,"type":"number","minimum":1,"maximum":1.3},"voiceBackend":{"description":"Use maya-local for prepared local reference cloning, or elevenlabs for provider clones. No automatic paid fallback.","type":"string","enum":["elevenlabs","maya-local"]},"voiceMode":{"description":"faithful prioritizes a steady reference voice; natural allows subtle acting; expressive allows more variation. Badri/Budhdev retain their working defaults when omitted.","type":"string","enum":["faithful","natural","expressive"]},"broll":{"default":true,"type":"boolean"},"background":{"default":"auto","type":"string","enum":["auto","minecraft-lava","minecraft-end","subway-surfers","gta-stunts"]},"title":{"type":"string","maxLength":100},"imageBroll":{"type":"object","properties":{"kind":{"type":"string","const":"image"},"query":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"caption":{"default":"","type":"string","maxLength":100},"sourceUrl":{"type":"string","format":"uri"},"title":{"type":"string","maxLength":300}},"required":["kind","caption"],"additionalProperties":false},"requestId":{"type":"string","minLength":1,"maxLength":128},"voiceIds":{"type":"object","propertyNames":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"]},"additionalProperties":{"type":"string","pattern":"^[\\w-]{1,100}$"}},"format":{"default":"skit","type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"narrator":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"]},"quizCount":{"default":0,"description":"Optional comprehension questions generated with the script, never spoken. Agent scripts supply their own questions.","type":"integer","minimum":0,"maximum":3}},"required":["style","durationSeconds","cast","language","speechSpeed","broll","background","format","quizCount"],"additionalProperties":false},"VideoJob":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"state":{"type":"string","enum":["queued","processing","ready","failed","needs_review"]},"stage":{"type":"string","enum":["queued","scripting","voicing","rendering","ready","failed"]},"progress":{"type":"number","minimum":0,"maximum":100},"prompt":{"type":"string"},"title":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"mediaExpired":{"type":"boolean"},"mediaExpiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"videoUrl":{"type":["string","null"]},"downloadUrl":{"type":"string"},"posterUrl":{"type":["string","null"]},"audioUrl":{"type":["string","null"]},"error":{"type":["string","null"]},"script":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100},"participants":{"type":"object","properties":{"learner":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"The chosen learner: asks focused questions throughout the video"},"expert":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"The chosen expert: gives direct substantive answers throughout the video"}},"required":["learner","expert"],"additionalProperties":false},"narrator":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"]},"chat":{"description":"Group chat formats only: group name and members.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":32,"description":"Group name, e.g. \"checkout-prod 💀\""},"members":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"Voice only: a ready cloned voice that reads this member's messages. Characters are never drawn in group chats."},"name":{"type":"string","minLength":1,"maxLength":20,"description":"Who this member is, shown in the chat, e.g. \"Redis Cache\", \"Payment API\", \"Postgres\", \"the intern\""},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"Avatar icon: a Lucide name (\"database\", \"zap\", \"smartphone\") or a Simple Icons brand (\"postgresql\", \"redis\", \"stripe\"). get_video_formats lists suggestions."},"you":{"description":"At most one member is \"you\": right-aligned green bubbles","type":"boolean"}},"required":["speaker","name","icon"],"additionalProperties":false}}},"required":["title","members"],"additionalProperties":false},"pr":{"description":"PR review format only: the pull request, its real diff and reviewers.","type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":64},"repo":{"description":"owner/name, shown in the header","type":"string","pattern":"^[A-Za-z0-9_.-]{1,24}\\/[A-Za-z0-9_.-]{1,32}$"},"author":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":24},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"A Lucide icon name (\"database\", \"zap\", \"user\") or a Simple Icons brand (\"github\", \"postgresql\")"}},"required":["name","icon"],"additionalProperties":false,"description":"Who opened the PR, e.g. the user's agent (\"claude-code\", icon \"anthropic\") or the user"},"reviewers":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"Voice only; never drawn"},"name":{"type":"string","minLength":1,"maxLength":24},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"A Lucide icon name (\"database\", \"zap\", \"user\") or a Simple Icons brand (\"github\", \"postgresql\")"}},"required":["speaker","name","icon"],"additionalProperties":false}},"files":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":56},"language":{"default":"text","type":"string","maxLength":20},"lines":{"minItems":1,"maxItems":24,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["add","del","ctx"]},"code":{"type":"string","maxLength":46,"description":"One line of the real diff, at most 46 characters so it fits a phone"}},"required":["kind","code"],"additionalProperties":false}}},"required":["path","language","lines"],"additionalProperties":false}},"verdict":{"type":"string","enum":["approve","request-changes","comment"]}},"required":["title","author","reviewers","files","verdict"],"additionalProperties":false},"sketch":{"description":"Sketch board format only: the nodes and edges to draw.","type":"object","properties":{"nodes":{"minItems":2,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"label":{"type":"string","minLength":1,"maxLength":28},"kind":{"default":"service","type":"string","enum":["actor","service","store","queue","external"]},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"A Lucide icon name (\"database\", \"zap\", \"user\") or a Simple Icons brand (\"github\", \"postgresql\")"}},"required":["id","label","kind"],"additionalProperties":false}},"edges":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"to":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"label":{"type":"string","minLength":1,"maxLength":18}},"required":["from","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false},"tierlist":{"description":"Tier list format only: the criterion and items.","type":"object","properties":{"criterion":{"type":"string","minLength":3,"maxLength":60,"description":"What the ranking measures, shown on screen the whole time, e.g. \"survives a lost response\""},"items":{"minItems":3,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"label":{"type":"string","minLength":1,"maxLength":24},"icon":{"type":"string","pattern":"^[A-Za-z0-9 .+-]{1,60}$","description":"A Lucide icon name (\"database\", \"zap\", \"user\") or a Simple Icons brand (\"github\", \"postgresql\")"}},"required":["id","label"],"additionalProperties":false}}},"required":["criterion","items"],"additionalProperties":false},"dialogue":{"minItems":2,"maxItems":60,"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"]},"text":{"type":"string","minLength":1,"maxLength":650},"tone":{"description":"Subtle delivery cue, separate from spoken/caption text. Omit for the reference voice’s normal tone.","type":"string","enum":["neutral","curious","thoughtful","amused","confident","concerned"]},"scene":{"type":"object","properties":{"beat":{"type":"string","enum":["setup","investigate","escalate","resolve"]},"heading":{"type":"string","minLength":1,"maxLength":64},"diagram":{"type":"object","properties":{"nodes":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,31}$"},"label":{"type":"string","minLength":1,"maxLength":64}},"required":["id","label"],"additionalProperties":false}},"edges":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false},"journey":{"type":"object","properties":{"location":{"type":"string","minLength":1,"maxLength":48},"action":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["running","waiting","blocked","done"]},"state":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":28},"value":{"type":"string","minLength":1,"maxLength":70}},"required":["key","value"],"additionalProperties":false}}},"required":["location","action","status","state"],"additionalProperties":false}},"required":["beat","heading"],"additionalProperties":false},"broll":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"code"},"code":{"type":"string","minLength":1,"maxLength":4000},"language":{"default":"text","type":"string","maxLength":30}},"required":["kind","code","language"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"image"},"query":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"caption":{"default":"","type":"string","maxLength":100},"sourceUrl":{"type":"string","format":"uri"},"title":{"type":"string","maxLength":300}},"required":["kind","caption"],"additionalProperties":false}]},"brollSequence":{"description":"Ordered reference images/code for this spoken turn. Replaces broll when present; split the turn time among the inserts. Use distinct relevant views for comparisons and changes.","minItems":1,"maxItems":4,"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"code"},"code":{"type":"string","minLength":1,"maxLength":4000},"language":{"default":"text","type":"string","maxLength":30}},"required":["kind","code","language"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"image"},"query":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"caption":{"default":"","type":"string","maxLength":100},"sourceUrl":{"type":"string","format":"uri"},"title":{"type":"string","maxLength":300}},"required":["kind","caption"],"additionalProperties":false}]}},"chat":{"description":"Group chat formats only.","type":"object","properties":{"display":{"description":"Texting-style bubble text (slang, emoji, lowercase). Defaults to the spoken text.","type":"string","minLength":1,"maxLength":200},"reaction":{"description":"One reaction tapped under this message by another member.","type":"string","enum":["😂","💀","😭","👍","🔥","😳","🙏","❤️","🤡","👀"]},"code":{"description":"A short code snippet sent as its own monospace bubble right after the text. At most 8 lines, 34 columns.","type":"string","minLength":1,"maxLength":320}},"additionalProperties":false},"pr":{"description":"PR review format only.","type":"object","properties":{"file":{"description":"Index into script.pr.files; omit for the final summary comment","type":"integer","minimum":0,"maximum":2},"lines":{"description":"Inclusive [start, end] indices into that file's lines, at most 8 lines","type":"array","prefixItems":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"integer","minimum":0,"maximum":9007199254740991}],"items":false,"minItems":2,"maxItems":2},"display":{"description":"Comment text as written in the review (markdown-free, emoji fine). Defaults to the spoken text.","type":"string","minLength":1,"maxLength":220},"tone":{"default":"question","type":"string","enum":["praise","question","nit","roast","blocker"]}},"required":["tone"],"additionalProperties":false},"sketch":{"description":"Sketch board format only.","type":"object","properties":{"show":{"description":"Elements that appear on this line (node ids or \"from>to\")","maxItems":6,"type":"array","items":{"type":"string","maxLength":50}},"focus":{"description":"Elements to highlight while this line is spoken","maxItems":4,"type":"array","items":{"type":"string","maxLength":50}},"mark":{"description":"Color the focused elements as the problem (red) or the fix (green)","type":"string","enum":["problem","fix"]},"note":{"description":"A short red marker note next to an element","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":40},"near":{"type":"string","maxLength":50}},"required":["text","near"],"additionalProperties":false}},"additionalProperties":false},"tier":{"description":"Tier list format only.","type":"object","properties":{"place":{"description":"Put this item in a tier on this line","type":"object","properties":{"item":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"},"tier":{"type":"string","enum":["S","A","B","C","D","F"]}},"required":["item","tier"],"additionalProperties":false},"focus":{"description":"Hold up an item being discussed before it is placed","type":"string","pattern":"^[a-z][a-z0-9_-]{0,23}$"}},"additionalProperties":false},"pause":{"description":"Pause & Predict after this line; the next line must reveal the answer.","type":"object","properties":{"prompt":{"type":"string","minLength":5,"maxLength":140},"choices":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"answer":{"type":"integer","minimum":0,"maximum":3},"seconds":{"description":"Optional minimum thinking time. Brainrotten extends it to fit the reading time of the question and choices.","type":"integer","minimum":3,"maximum":10}},"required":["prompt","choices","answer"],"additionalProperties":false}},"required":["speaker","text"],"additionalProperties":false}},"takeaway":{"type":"string","maxLength":240},"questions":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_-]{0,47}$"},"prompt":{"type":"string","minLength":1,"maxLength":240},"choices":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"answer":{"type":"integer","minimum":0,"maximum":3},"explanation":{"type":"string","minLength":1,"maxLength":400},"turnIndices":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"integer","minimum":0,"maximum":59}}},"required":["prompt","choices","answer","explanation","turnIndices"],"additionalProperties":false}},"question":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":240},"choices":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"answer":{"type":"integer","minimum":0,"maximum":3},"explanation":{"type":"string","maxLength":300}},"required":["prompt","choices","answer","explanation"],"additionalProperties":false}},"required":["title","dialogue"],"additionalProperties":false},"durationSeconds":{"type":["number","null"]},"cast":{"type":"string","enum":["auto","custom","oggy-jack","badri-budhdev","jhaplu-paplu-taplu","motu-patlu"]},"language":{"type":"string","enum":["en","hinglish","benglish","hi"]},"participants":{"type":"object","properties":{"learner":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"The chosen learner: asks focused questions throughout the video"},"expert":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"],"description":"The chosen expert: gives direct substantive answers throughout the video"}},"required":["learner","expert"],"additionalProperties":false},"voiceBackend":{"type":"string","enum":["elevenlabs","maya-local"]},"voiceNames":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"backgroundName":{"type":"string"},"sourceCredits":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"attribution":{"type":"string"}},"required":["title","url","attribution"],"additionalProperties":false}},"format":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"narrator":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"]},"learning":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"BrainrottenLearningPackV1"},"jobId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"format":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"title":{"type":"string","minLength":1,"maxLength":140},"language":{"type":"string","enum":["en","hinglish","benglish","hi"]},"durationSeconds":{"type":"number","exclusiveMinimum":0,"maximum":240},"takeaway":{"type":"string","minLength":1,"maxLength":650},"chapters":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"startMs":{"type":"number","minimum":0},"endMs":{"type":"number","exclusiveMinimum":0}},"required":["id","title","startMs","endMs"],"additionalProperties":false}},"questions":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"prompt":{"type":"string","minLength":1,"maxLength":240},"choices":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"answer":{"type":"integer","minimum":0,"maximum":3},"explanation":{"type":"string","minLength":1,"maxLength":400},"turnIndices":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"integer","minimum":0,"maximum":59}},"startMs":{"type":"number","minimum":0},"endMs":{"type":"number","exclusiveMinimum":0}},"required":["id","prompt","choices","answer","explanation","turnIndices","startMs","endMs"],"additionalProperties":false}},"flashcards":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"front":{"type":"string","maxLength":240},"back":{"type":"string","maxLength":600},"startMs":{"type":"number","minimum":0},"endMs":{"type":"number","exclusiveMinimum":0}},"required":["id","front","back","startMs","endMs"],"additionalProperties":false}},"transcript":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"object","properties":{"turnIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"speaker":{"type":"string"},"text":{"type":"string"},"startMs":{"type":"number","minimum":0},"endMs":{"type":"number","exclusiveMinimum":0}},"required":["turnIndex","speaker","text","startMs","endMs"],"additionalProperties":false}}},"required":["schemaVersion","jobId","format","title","language","durationSeconds","takeaway","chapters","questions","transcript"],"additionalProperties":false},"outputs":{"type":"object","properties":{"learningUrl":{"type":"string"},"notesUrl":{"type":"string"},"captionsUrl":{"type":"string"},"flashcardsUrl":{"type":"string"}},"required":["learningUrl","notesUrl","captionsUrl"],"additionalProperties":false}},"required":["jobId","state","stage","progress","prompt","title","createdAt","updatedAt","videoUrl","error"],"additionalProperties":false},"StudioConfig":{"type":"object","properties":{"formats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["skit","casefile","whiteboard","pov","groupchat","prreview","sketch","tierlist"]},"name":{"type":"string"},"description":{"type":"string"},"speakers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"visuals":{"type":"string"},"ready":{"type":"boolean"}},"required":["id","name","description","speakers","visuals"],"additionalProperties":false}},"scriptProvider":{"type":"string","enum":["auto","paper","gemini"]},"scriptConfigured":{"type":"boolean"},"geminiConfigured":{"type":"boolean"},"scriptProviders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["paper","gemini"]},"name":{"type":"string"},"ready":{"type":"boolean"}},"required":["id","name","ready"],"additionalProperties":false}},"voiceBackend":{"type":"string","enum":["elevenlabs","maya-local"]},"voiceConfigured":{"type":"boolean"},"speechBackends":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["elevenlabs","maya-local"]},"name":{"type":"string"},"ready":{"type":"boolean"}},"required":["id","name","ready"],"additionalProperties":false}},"paperConfigured":{"type":"boolean"},"elevenlabsConfigured":{"type":"boolean"},"ffmpegAvailable":{"type":"boolean"},"imageSearchProvider":{"default":"google","type":"string","enum":["google","brave","commons"]},"voices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"]},"description":{"type":"string"}},"required":["id","name","role","description"],"additionalProperties":false}},"characters":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"]},"name":{"type":"string"},"imageUrl":{"type":"string"},"voiceReady":{"type":"boolean"}},"required":["id","name","imageUrl","voiceReady"],"additionalProperties":false}},"casts":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["auto","custom","oggy-jack","badri-budhdev","jhaplu-paplu-taplu","motu-patlu"]},"name":{"type":"string"},"characters":{"type":"array","items":{"type":"string","enum":["oggy","jack","badri","budhdev","jhaplu","paplu","taplu","motu","patlu","chingum","ghasitaram","jhatka","john"]}}},"required":["id","name","characters"],"additionalProperties":false}},"defaults":{"type":"object","properties":{"style":{"type":"string","const":"brainrot"},"durationSeconds":{"type":"number"},"cast":{"type":"string","enum":["auto","custom","oggy-jack","badri-budhdev","jhaplu-paplu-taplu","motu-patlu"]},"language":{"type":"string"},"speechSpeed":{"type":"number"}},"required":["style","durationSeconds"],"additionalProperties":false},"backgrounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["auto","minecraft-lava","minecraft-end","subway-surfers","gta-stunts"]},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"mode":{"default":"local","type":"string","enum":["local","hosted"]},"mediaOrigins":{"type":"array","items":{"type":"string","format":"uri"}},"auth":{"type":"object","properties":{"configured":{"type":"boolean"},"loginUrl":{"type":"string"},"issuer":{"type":"string"},"clientId":{"type":"string"},"agentClientId":{"type":"string"},"userPoolId":{"type":"string"},"domain":{"type":"string"}},"required":["configured"],"additionalProperties":false}},"required":["paperConfigured","elevenlabsConfigured","ffmpegAvailable","imageSearchProvider","voices","characters","casts","defaults","mode"],"additionalProperties":false},"ImageSearchInput":{"type":"object","properties":{"query":{"type":"string","minLength":2,"maxLength":200}},"required":["query"],"additionalProperties":false},"ImageSearchResult":{"type":"object","properties":{"query":{"type":"string"},"imageUrl":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"},"title":{"type":"string"},"provider":{"type":"string","enum":["google","brave","commons"]}},"required":["query","imageUrl","sourceUrl","title","provider"],"additionalProperties":false},"Error":{"type":"object","required":["code","message","retryable","requestId"],"properties":{"code":{"type":"string","description":"Stable machine-readable reason, e.g. invalid_json, payload_too_large, unsupported_media_type, validation_failed, unauthorized, trial_limit_reached, version_conflict, request_conflict, not_found, rate_limited, internal_error"},"message":{"type":"string","description":"Human-readable; may change"},"retryable":{"type":"boolean","description":"True when the same request can succeed later (429 and 5xx)"},"requestId":{"type":"string","description":"Also sent as the x-request-id header; quote it when reporting a problem"}}}}}}