{"openapi":"3.1.0","info":{"title":"Studio API — LiveOne","version":"0.1.0","description":"\n# AI Studio Service\n\nEnterprise-grade AI video production pipeline.\n\n## Features\n\n- **Projects**: Create and manage video production projects\n- **Storyboard**: AI-powered storyboard visualization\n- **Characters**: Consistent character management across scenes\n- **Audio**: Multi-track audio with voice, music, and SFX\n- **Workflows**: Node-based automation pipelines\n- **Production**: Sequential video generation with frame continuity\n- **Editor**: Professional timeline editing\n- **Export**: Multi-format export and social publishing\n\n## Authentication\n\nAll endpoints require authentication via session cookie.\nInclude credentials in requests.\n    ","contact":{"name":"LiveOne API Support","email":"support@liveone.com","url":"https://dash.liveone.ai"}},"servers":[{"url":"https://studio.liveone.dev","description":"Development"}],"tags":[{"name":"Projects","description":"Project management"},{"name":"Storyboard","description":"Storyboard and frame management"},{"name":"Characters","description":"Character consistency system"},{"name":"Audio","description":"Voice, music, and SFX"},{"name":"Costs","description":"Cost tracking and budget management"},{"name":"Quotas","description":"Usage quotas and limits"},{"name":"Quality","description":"AI quality scoring"},{"name":"Brand","description":"Brand enforcement"},{"name":"Analytics","description":"Usage analytics and reporting"},{"name":"Priority","description":"Priority queue management"},{"name":"Studio Variations","description":"A/B variation generation and selection"},{"name":"Studio Scheduling","description":"Scheduled production and off-peak processing"},{"name":"Studio Reviews","description":"Collaborative review and approval workflow"},{"name":"Workflows","description":"Node-based automation"},{"name":"Production","description":"Video generation pipeline"},{"name":"Editor","description":"Timeline editing"},{"name":"Export","description":"Export and publishing"}],"components":{"schemas":{"Voice":{"type":"object","properties":{"voiceId":{"type":"string","description":"Unique voice ID"},"name":{"type":"string","description":"Voice display name"},"category":{"type":"string","enum":["premade","cloned","generated"],"description":"Voice category","example":"premade"},"description":{"type":"string","description":"Voice description"},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Voice labels"},"previewUrl":{"type":"string","description":"Preview audio URL"},"provider":{"type":"string","enum":["elevenlabs","openai","mock"],"description":"Voice synthesis provider","example":"elevenlabs"}},"required":["voiceId","name","category","provider"]},"GenerateSpeechResponse":{"type":"object","properties":{"audioUrl":{"type":"string","format":"uri","description":"URL to generated audio file"},"durationMs":{"type":"number","description":"Audio duration in milliseconds"},"format":{"type":"string","enum":["mp3","wav"],"description":"Audio format"},"costUsdCents":{"type":"number","description":"Estimated cost in USD cents"},"characterCount":{"type":"number","description":"Number of characters processed"}},"required":["audioUrl","durationMs","format","costUsdCents","characterCount"]},"GenerateSpeechRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":5000,"description":"Text to synthesize (max 5000 chars)","example":"Hello, welcome to our product demo."},"voiceId":{"type":"string","description":"Voice ID to use","example":"pNInz6obpgDQGcFmaJgB"},"provider":{"type":"string","enum":["elevenlabs","openai","mock"],"default":"elevenlabs","description":"Voice synthesis provider","example":"elevenlabs"},"modelId":{"type":"string","description":"Model ID (provider-specific)","example":"eleven_monolingual_v1"},"settings":{"type":"object","properties":{"stability":{"type":"number","minimum":0,"maximum":1,"default":0.5,"description":"Voice stability (0-1). Higher = more consistent"},"similarityBoost":{"type":"number","minimum":0,"maximum":1,"default":0.75,"description":"Similarity boost (0-1). Higher = more like original voice"},"style":{"type":"number","minimum":0,"maximum":1,"default":0,"description":"Style exaggeration (0-1)"},"useSpeakerBoost":{"type":"boolean","default":true,"description":"Enable speaker boost for clarity"}}},"outputFormat":{"type":"string","enum":["mp3","wav"],"default":"mp3"}},"required":["text","voiceId"]},"CloneVoiceResponse":{"type":"object","properties":{"voice":{"$ref":"#/components/schemas/Voice"},"message":{"type":"string"}},"required":["voice","message"]},"CloneVoiceRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Name for the cloned voice","example":"John - Marketing Lead"},"description":{"type":"string","description":"Voice description"},"sampleUrls":{"type":"array","items":{"type":"string","format":"uri"},"minItems":1,"maxItems":25,"description":"URLs to voice sample audio files"}},"required":["name","sampleUrls"]},"GenerateMusicResponse":{"type":"object","properties":{"generation":{"$ref":"#/components/schemas/MusicGeneration"},"message":{"type":"string"}},"required":["generation","message"]},"MusicGeneration":{"type":"object","properties":{"id":{"type":"string","description":"Unique generation ID"},"status":{"type":"string","enum":["pending","processing","completed","failed"],"description":"Generation status"},"audioUrl":{"type":"string","description":"Audio URL (available when completed)"},"imageUrl":{"type":"string","description":"Cover art URL"},"title":{"type":"string","description":"Track title"},"durationSeconds":{"type":"number","description":"Duration in seconds"},"style":{"type":"string","description":"Style tags"},"error":{"type":"string","description":"Error message if failed"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["id","status","createdAt"]},"GenerateMusicRequest":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":500,"description":"Text prompt describing the desired music","example":"Upbeat corporate background music with piano and light drums"},"instrumental":{"type":"boolean","default":true,"description":"Generate instrumental only (no vocals)"},"duration":{"type":"number","minimum":30,"maximum":240,"default":60,"description":"Target duration in seconds (30-240)"},"lyrics":{"type":"string","maxLength":2000,"description":"Custom lyrics (AI generates if not provided)"},"style":{"type":"string","maxLength":100,"description":"Music style/genre tags","example":"corporate, upbeat, professional"},"title":{"type":"string","maxLength":100,"description":"Title for the track"}},"required":["prompt"]},"GetMusicStatusResponse":{"type":"object","properties":{"generation":{"$ref":"#/components/schemas/MusicGeneration"}},"required":["generation"]},"ListMusicClipsResponse":{"type":"object","properties":{"clips":{"type":"array","items":{"$ref":"#/components/schemas/MusicClip"}}},"required":["clips"]},"MusicClip":{"type":"object","properties":{"id":{"type":"string","description":"Clip ID"},"title":{"type":"string","description":"Track title"},"audioUrl":{"type":"string","description":"Audio URL"},"imageUrl":{"type":"string","description":"Cover art URL"},"duration":{"type":"number","description":"Duration in seconds"},"style":{"type":"string","description":"Style tags"},"instrumental":{"type":"boolean","description":"Is instrumental"},"createdAt":{"type":"string","description":"Creation timestamp"}},"required":["id","title","audioUrl","duration","instrumental","createdAt"]}},"parameters":{}},"paths":{"/v1/studio/projects":{"get":{"tags":["Projects"],"summary":"List all projects","description":"Get all studio projects for the current organization","parameters":[{"schema":{"type":"string","enum":["draft","storyboarding","pre_production","production","post_production","complete","archived"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of projects","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","storyboarding","pre_production","production","post_production","complete","archived"]},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"default":"16:9"},"frameRate":{"type":"integer","default":30},"resolution":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"}},"default":{"width":1920,"height":1080},"required":["width","height"]},"videoProvider":{"type":"string","enum":["kling","veo"],"default":"kling"},"voiceProvider":{"type":"string","enum":["elevenlabs"],"default":"elevenlabs"},"thumbnailAssetId":{"type":["string","null"]},"scriptId":{"type":["string","null"],"description":"Reference to script from Scripts service"},"brandKitId":{"type":["string","null"],"description":"Reference to brand kit for voice/tone"},"sceneCount":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"totalDuration":{"type":"number","default":0,"description":"Total duration in seconds"},"createdBy":{"type":"string"},"updatedBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":["string","null"]}},"required":["id","organizationId","name","description","status","thumbnailAssetId","scriptId","brandKitId","createdBy","updatedBy","createdAt","updatedAt","deletedAt"]}},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}},"required":["projects","total","limit","offset"]}}}},"401":{"description":"Unauthorized"}}},"post":{"tags":["Projects"],"summary":"Create a project","description":"Create a new studio project","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":2000},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"]},"frameRate":{"type":"integer","minimum":24,"maximum":60},"resolution":{"type":"object","properties":{"width":{"type":"integer","minimum":480,"maximum":7680},"height":{"type":"integer","minimum":480,"maximum":4320}},"required":["width","height"]},"videoProvider":{"type":"string","enum":["kling","veo"]},"voiceProvider":{"type":"string","enum":["elevenlabs"]},"scriptId":{"type":"string"},"brandKitId":{"type":"string"}},"required":["name"]}}}},"responses":{"201":{"description":"Project created","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","storyboarding","pre_production","production","post_production","complete","archived"]},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"default":"16:9"},"frameRate":{"type":"integer","default":30},"resolution":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"}},"default":{"width":1920,"height":1080},"required":["width","height"]},"videoProvider":{"type":"string","enum":["kling","veo"],"default":"kling"},"voiceProvider":{"type":"string","enum":["elevenlabs"],"default":"elevenlabs"},"thumbnailAssetId":{"type":["string","null"]},"scriptId":{"type":["string","null"],"description":"Reference to script from Scripts service"},"brandKitId":{"type":["string","null"],"description":"Reference to brand kit for voice/tone"},"sceneCount":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"totalDuration":{"type":"number","default":0,"description":"Total duration in seconds"},"createdBy":{"type":"string"},"updatedBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":["string","null"]}},"required":["id","organizationId","name","description","status","thumbnailAssetId","scriptId","brandKitId","createdBy","updatedBy","createdAt","updatedAt","deletedAt"]}},"required":["project"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"}}}},"/v1/studio/projects/{projectId}":{"get":{"tags":["Projects"],"summary":"Get a project","description":"Get a specific studio project by ID","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Project details","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","storyboarding","pre_production","production","post_production","complete","archived"]},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"default":"16:9"},"frameRate":{"type":"integer","default":30},"resolution":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"}},"default":{"width":1920,"height":1080},"required":["width","height"]},"videoProvider":{"type":"string","enum":["kling","veo"],"default":"kling"},"voiceProvider":{"type":"string","enum":["elevenlabs"],"default":"elevenlabs"},"thumbnailAssetId":{"type":["string","null"]},"scriptId":{"type":["string","null"],"description":"Reference to script from Scripts service"},"brandKitId":{"type":["string","null"],"description":"Reference to brand kit for voice/tone"},"sceneCount":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"totalDuration":{"type":"number","default":0,"description":"Total duration in seconds"},"createdBy":{"type":"string"},"updatedBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":["string","null"]}},"required":["id","organizationId","name","description","status","thumbnailAssetId","scriptId","brandKitId","createdBy","updatedBy","createdAt","updatedAt","deletedAt"]}},"required":["project"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"}}},"patch":{"tags":["Projects"],"summary":"Update a project","description":"Update an existing studio project","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":["string","null"],"maxLength":2000},"status":{"type":"string","enum":["draft","storyboarding","pre_production","production","post_production","complete","archived"]},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"]},"frameRate":{"type":"integer","minimum":24,"maximum":60},"resolution":{"type":"object","properties":{"width":{"type":"integer","minimum":480,"maximum":7680},"height":{"type":"integer","minimum":480,"maximum":4320}},"required":["width","height"]},"videoProvider":{"type":"string","enum":["kling","veo"]},"voiceProvider":{"type":"string","enum":["elevenlabs"]},"thumbnailAssetId":{"type":["string","null"]},"scriptId":{"type":["string","null"]},"brandKitId":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Project updated","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","storyboarding","pre_production","production","post_production","complete","archived"]},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"default":"16:9"},"frameRate":{"type":"integer","default":30},"resolution":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"}},"default":{"width":1920,"height":1080},"required":["width","height"]},"videoProvider":{"type":"string","enum":["kling","veo"],"default":"kling"},"voiceProvider":{"type":"string","enum":["elevenlabs"],"default":"elevenlabs"},"thumbnailAssetId":{"type":["string","null"]},"scriptId":{"type":["string","null"],"description":"Reference to script from Scripts service"},"brandKitId":{"type":["string","null"],"description":"Reference to brand kit for voice/tone"},"sceneCount":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"totalDuration":{"type":"number","default":0,"description":"Total duration in seconds"},"createdBy":{"type":"string"},"updatedBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":["string","null"]}},"required":["id","organizationId","name","description","status","thumbnailAssetId","scriptId","brandKitId","createdBy","updatedBy","createdAt","updatedAt","deletedAt"]}},"required":["project"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"}}},"delete":{"tags":["Projects"],"summary":"Delete a project","description":"Soft delete a studio project (can be restored)","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Project deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"}}}},"/v1/studio/projects/{projectId}/duplicate":{"post":{"tags":["Projects"],"summary":"Duplicate a project","description":"Create a copy of an existing project with all its content","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name for the duplicated project"}}}}}},"responses":{"201":{"description":"Project duplicated","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string","enum":["draft","storyboarding","pre_production","production","post_production","complete","archived"]},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"default":"16:9"},"frameRate":{"type":"integer","default":30},"resolution":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"}},"default":{"width":1920,"height":1080},"required":["width","height"]},"videoProvider":{"type":"string","enum":["kling","veo"],"default":"kling"},"voiceProvider":{"type":"string","enum":["elevenlabs"],"default":"elevenlabs"},"thumbnailAssetId":{"type":["string","null"]},"scriptId":{"type":["string","null"],"description":"Reference to script from Scripts service"},"brandKitId":{"type":["string","null"],"description":"Reference to brand kit for voice/tone"},"sceneCount":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"totalDuration":{"type":"number","default":0,"description":"Total duration in seconds"},"createdBy":{"type":"string"},"updatedBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":["string","null"]}},"required":["id","organizationId","name","description","status","thumbnailAssetId","scriptId","brandKitId","createdBy","updatedBy","createdAt","updatedAt","deletedAt"]}},"required":["project"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Source project not found"}}}},"/v1/studio/characters":{"get":{"tags":["Characters"],"summary":"List all characters","description":"Get all characters for the current organization","parameters":[{"schema":{"type":"string"},"required":false,"name":"projectId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of characters","content":{"application/json":{"schema":{"type":"object","properties":{"characters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"visualStyle":{"type":["object","null"],"properties":{"artStyle":{"type":"string"},"lighting":{"type":"string"},"colorPalette":{"type":"array","items":{"type":"string"}}}},"faceEmbedding":{"type":["string","null"]},"sourceType":{"type":["string","null"],"enum":["created","extracted_photo","extracted_video","imported",null]},"consentConfirmed":{"type":"boolean"},"isLocked":{"type":"boolean"},"lockedReason":{"type":["string","null"]},"lockedAt":{"type":["string","null"]},"lockedByJobId":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":["string","null"]}},"required":["id","organizationId","projectId","name","description","visualStyle","faceEmbedding","sourceType","consentConfirmed","isLocked","lockedReason","lockedAt","lockedByJobId","createdBy","createdAt","updatedAt","deletedAt"]}},"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["characters","total","limit","offset"]}}}},"401":{"description":"Unauthorized"}}},"post":{"tags":["Characters"],"summary":"Create a character","description":"Create a new character profile","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":2000},"projectId":{"type":"string"},"visualStyle":{"type":"object","properties":{"artStyle":{"type":"string"},"lighting":{"type":"string"},"colorPalette":{"type":"array","items":{"type":"string"}}}},"sourceType":{"type":"string","enum":["created","extracted_photo","extracted_video","imported"]},"consentConfirmed":{"type":"boolean"}},"required":["name"]}}}},"responses":{"201":{"description":"Character created","content":{"application/json":{"schema":{"type":"object","properties":{"character":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"visualStyle":{"type":["object","null"],"properties":{"artStyle":{"type":"string"},"lighting":{"type":"string"},"colorPalette":{"type":"array","items":{"type":"string"}}}},"faceEmbedding":{"type":["string","null"]},"sourceType":{"type":["string","null"],"enum":["created","extracted_photo","extracted_video","imported",null]},"consentConfirmed":{"type":"boolean"},"isLocked":{"type":"boolean"},"lockedReason":{"type":["string","null"]},"lockedAt":{"type":["string","null"]},"lockedByJobId":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":["string","null"]}},"required":["id","organizationId","projectId","name","description","visualStyle","faceEmbedding","sourceType","consentConfirmed","isLocked","lockedReason","lockedAt","lockedByJobId","createdBy","createdAt","updatedAt","deletedAt"]}},"required":["character"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/characters/{characterId}":{"get":{"tags":["Characters"],"summary":"Get a character","description":"Get a specific character with all details","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"responses":{"200":{"description":"Character details","content":{"application/json":{"schema":{"type":"object","properties":{"character":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"visualStyle":{"type":["object","null"],"properties":{"artStyle":{"type":"string"},"lighting":{"type":"string"},"colorPalette":{"type":"array","items":{"type":"string"}}}},"faceEmbedding":{"type":["string","null"]},"sourceType":{"type":["string","null"],"enum":["created","extracted_photo","extracted_video","imported",null]},"consentConfirmed":{"type":"boolean"},"isLocked":{"type":"boolean"},"lockedReason":{"type":["string","null"]},"lockedAt":{"type":["string","null"]},"lockedByJobId":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":["string","null"]},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"imageUrl":{"type":"string"},"thumbnailUrl":{"type":["string","null"]},"assetId":{"type":["string","null"]},"imageType":{"type":"string","enum":["face","full_body","expression","style"]},"angle":{"type":["string","null"],"enum":["front","side","three_quarter","back",null]},"isPrimary":{"type":"boolean"},"sortOrder":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","characterId","imageUrl","thumbnailUrl","assetId","imageType","angle","isPrimary","sortOrder","createdAt"]}},"voice":{"type":["object","null"],"properties":{"id":{"type":"string"},"characterId":{"type":"string"},"provider":{"type":"string","enum":["elevenlabs","openai"]},"voiceId":{"type":"string"},"voiceName":{"type":["string","null"]},"isCloned":{"type":"boolean"},"sourceAudioUrl":{"type":["string","null"]},"sourceAssetId":{"type":["string","null"]},"settings":{"type":["object","null"],"properties":{"stability":{"type":"number","minimum":0,"maximum":1,"default":0.5},"similarity":{"type":"number","minimum":0,"maximum":1,"default":0.75},"style":{"type":"number","minimum":0,"maximum":1,"default":0},"speakerBoost":{"type":"boolean","default":true}}},"previewAudioUrl":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","characterId","provider","voiceId","voiceName","isCloned","sourceAudioUrl","sourceAssetId","settings","previewAudioUrl","createdAt","updatedAt"]},"expressions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"emotion":{"type":"string","enum":["neutral","happy","sad","angry","surprised","confused","excited","thoughtful","concerned","confident","skeptical","amused"]},"referenceUrl":{"type":"string"},"thumbnailUrl":{"type":["string","null"]},"assetId":{"type":["string","null"]},"intensity":{"type":"number","minimum":0,"maximum":1},"isGenerated":{"type":"boolean"},"generationPrompt":{"type":["string","null"]},"sortOrder":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","characterId","emotion","referenceUrl","thumbnailUrl","assetId","intensity","isGenerated","generationPrompt","sortOrder","createdAt"]}}},"required":["id","organizationId","projectId","name","description","visualStyle","faceEmbedding","sourceType","consentConfirmed","isLocked","lockedReason","lockedAt","lockedByJobId","createdBy","createdAt","updatedAt","deletedAt","references","voice","expressions"]}},"required":["character"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Character not found"}}},"patch":{"tags":["Characters"],"summary":"Update a character","description":"Update character details","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":2000},"projectId":{"type":["string","null"]},"visualStyle":{"type":"object","properties":{"artStyle":{"type":"string"},"lighting":{"type":"string"},"colorPalette":{"type":"array","items":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Character updated","content":{"application/json":{"schema":{"type":"object","properties":{"character":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"visualStyle":{"type":["object","null"],"properties":{"artStyle":{"type":"string"},"lighting":{"type":"string"},"colorPalette":{"type":"array","items":{"type":"string"}}}},"faceEmbedding":{"type":["string","null"]},"sourceType":{"type":["string","null"],"enum":["created","extracted_photo","extracted_video","imported",null]},"consentConfirmed":{"type":"boolean"},"isLocked":{"type":"boolean"},"lockedReason":{"type":["string","null"]},"lockedAt":{"type":["string","null"]},"lockedByJobId":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":["string","null"]}},"required":["id","organizationId","projectId","name","description","visualStyle","faceEmbedding","sourceType","consentConfirmed","isLocked","lockedReason","lockedAt","lockedByJobId","createdBy","createdAt","updatedAt","deletedAt"]}},"required":["character"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Character not found"}}},"delete":{"tags":["Characters"],"summary":"Delete a character","description":"Soft delete a character","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"responses":{"200":{"description":"Character deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Character not found"}}}},"/v1/studio/characters/{characterId}/references":{"post":{"tags":["Characters"],"summary":"Upload reference image","description":"Upload a reference image for character consistency","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"imageType":{"type":"string"},"angle":{"type":"string"},"isPrimary":{"type":"string"}}}}}},"responses":{"201":{"description":"Reference uploaded","content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"imageUrl":{"type":"string"},"thumbnailUrl":{"type":["string","null"]},"assetId":{"type":["string","null"]},"imageType":{"type":"string","enum":["face","full_body","expression","style"]},"angle":{"type":["string","null"],"enum":["front","side","three_quarter","back",null]},"isPrimary":{"type":"boolean"},"sortOrder":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","characterId","imageUrl","thumbnailUrl","assetId","imageType","angle","isPrimary","sortOrder","createdAt"]}},"required":["reference"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Character not found"}}}},"/v1/studio/characters/{characterId}/references/from-url":{"post":{"tags":["Characters"],"summary":"Add reference from URL","description":"Add a reference image from an existing URL (e.g., AI-generated images)","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"imageUrl":{"type":"string","format":"uri"},"assetId":{"type":"string"},"thumbnailUrl":{"type":"string","format":"uri"},"imageType":{"type":"string","enum":["face","full_body","expression","style"],"default":"face"},"angle":{"type":"string","enum":["front","side","three_quarter","back"],"default":"front"},"isPrimary":{"type":"boolean","default":false}},"required":["imageUrl"]}}}},"responses":{"201":{"description":"Reference added","content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"imageUrl":{"type":"string"},"thumbnailUrl":{"type":["string","null"]},"assetId":{"type":["string","null"]},"imageType":{"type":"string","enum":["face","full_body","expression","style"]},"angle":{"type":["string","null"],"enum":["front","side","three_quarter","back",null]},"isPrimary":{"type":"boolean"},"sortOrder":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","characterId","imageUrl","thumbnailUrl","assetId","imageType","angle","isPrimary","sortOrder","createdAt"]}},"required":["reference"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Character not found"}}}},"/v1/studio/characters/{characterId}/references/generate":{"post":{"tags":["Characters"],"summary":"Generate reference with AI","description":"Queue AI image generation for a character reference. Creates a pending reference and returns immediately while generation happens in the background.","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000},"imageType":{"type":"string","enum":["face","full_body","expression","style"],"default":"face"},"angle":{"type":"string","enum":["front","side","three_quarter","back"],"default":"front"},"aspectRatio":{"type":"string","enum":["1:1","16:9","9:16","4:3","3:4"],"default":"1:1"},"isPrimary":{"type":"boolean","default":false}},"required":["prompt"]}}}},"responses":{"202":{"description":"Generation queued","content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"imageUrl":{"type":"string"},"thumbnailUrl":{"type":["string","null"]},"assetId":{"type":["string","null"]},"imageType":{"type":"string","enum":["face","full_body","expression","style"]},"angle":{"type":["string","null"],"enum":["front","side","three_quarter","back",null]},"isPrimary":{"type":"boolean"},"sortOrder":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","characterId","imageUrl","thumbnailUrl","assetId","imageType","angle","isPrimary","sortOrder","createdAt"]},"jobId":{"type":"string"},"message":{"type":"string"}},"required":["reference","jobId","message"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Character not found"}}}},"/v1/studio/characters/{characterId}/references/{referenceId}":{"delete":{"tags":["Characters"],"summary":"Delete reference image","description":"Delete a character reference image","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"referenceId","in":"path"}],"responses":{"200":{"description":"Reference deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Reference not found"}}}},"/v1/studio/characters/{characterId}/references/{referenceId}/primary":{"post":{"tags":["Characters"],"summary":"Set primary reference","description":"Set a reference image as the primary face reference","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"referenceId","in":"path"}],"responses":{"200":{"description":"Primary reference set","content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"imageUrl":{"type":"string"},"thumbnailUrl":{"type":["string","null"]},"assetId":{"type":["string","null"]},"imageType":{"type":"string","enum":["face","full_body","expression","style"]},"angle":{"type":["string","null"],"enum":["front","side","three_quarter","back",null]},"isPrimary":{"type":"boolean"},"sortOrder":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","characterId","imageUrl","thumbnailUrl","assetId","imageType","angle","isPrimary","sortOrder","createdAt"]}},"required":["reference"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Reference not found"}}}},"/v1/studio/characters/{characterId}/voice":{"post":{"tags":["Characters"],"summary":"Configure voice","description":"Configure voice settings for character","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["elevenlabs","openai"]},"voiceId":{"type":"string"},"voiceName":{"type":"string"},"settings":{"type":"object","properties":{"stability":{"type":"number","minimum":0,"maximum":1,"default":0.5},"similarity":{"type":"number","minimum":0,"maximum":1,"default":0.75},"style":{"type":"number","minimum":0,"maximum":1,"default":0},"speakerBoost":{"type":"boolean","default":true}}}},"required":["provider","voiceId"]}}}},"responses":{"200":{"description":"Voice configured","content":{"application/json":{"schema":{"type":"object","properties":{"voice":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"provider":{"type":"string","enum":["elevenlabs","openai"]},"voiceId":{"type":"string"},"voiceName":{"type":["string","null"]},"isCloned":{"type":"boolean"},"sourceAudioUrl":{"type":["string","null"]},"sourceAssetId":{"type":["string","null"]},"settings":{"type":["object","null"],"properties":{"stability":{"type":"number","minimum":0,"maximum":1,"default":0.5},"similarity":{"type":"number","minimum":0,"maximum":1,"default":0.75},"style":{"type":"number","minimum":0,"maximum":1,"default":0},"speakerBoost":{"type":"boolean","default":true}}},"previewAudioUrl":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","characterId","provider","voiceId","voiceName","isCloned","sourceAudioUrl","sourceAssetId","settings","previewAudioUrl","createdAt","updatedAt"]}},"required":["voice"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Character not found"}}}},"/v1/studio/characters/{characterId}/voice/clone":{"post":{"tags":["Characters"],"summary":"Clone voice","description":"Clone a voice from an audio sample","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"name":{"type":"string"}}}}}},"responses":{"201":{"description":"Voice cloned","content":{"application/json":{"schema":{"type":"object","properties":{"voice":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"provider":{"type":"string","enum":["elevenlabs","openai"]},"voiceId":{"type":"string"},"voiceName":{"type":["string","null"]},"isCloned":{"type":"boolean"},"sourceAudioUrl":{"type":["string","null"]},"sourceAssetId":{"type":["string","null"]},"settings":{"type":["object","null"],"properties":{"stability":{"type":"number","minimum":0,"maximum":1,"default":0.5},"similarity":{"type":"number","minimum":0,"maximum":1,"default":0.75},"style":{"type":"number","minimum":0,"maximum":1,"default":0},"speakerBoost":{"type":"boolean","default":true}}},"previewAudioUrl":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","characterId","provider","voiceId","voiceName","isCloned","sourceAudioUrl","sourceAssetId","settings","previewAudioUrl","createdAt","updatedAt"]}},"required":["voice"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Character not found"}}}},"/v1/studio/characters/{characterId}/voice/preview":{"post":{"tags":["Characters"],"summary":"Preview voice","description":"Generate a voice preview with sample text","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","maxLength":500}},"required":["text"]}}}},"responses":{"200":{"description":"Voice preview generated","content":{"application/json":{"schema":{"type":"object","properties":{"audioUrl":{"type":"string"},"durationMs":{"type":"number"}},"required":["audioUrl","durationMs"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Voice not configured"}}}},"/v1/studio/voices":{"get":{"tags":["Audio"],"summary":"List available voices","description":"Get all available voices for TTS synthesis across providers","parameters":[{"schema":{"type":"string","enum":["elevenlabs","openai","mock"],"description":"Filter by specific provider","example":"elevenlabs"},"required":false,"description":"Filter by specific provider","name":"provider","in":"query"}],"responses":{"200":{"description":"List of voices","content":{"application/json":{"schema":{"type":"object","properties":{"voices":{"type":"array","items":{"$ref":"#/components/schemas/Voice"}}},"required":["voices"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"required":["error"]}}}}}}},"/v1/studio/characters/{characterId}/expressions":{"get":{"tags":["Characters"],"summary":"List expressions","description":"List all expressions for a character","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"responses":{"200":{"description":"Expression list","content":{"application/json":{"schema":{"type":"object","properties":{"expressions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"emotion":{"type":"string","enum":["neutral","happy","sad","angry","surprised","confused","excited","thoughtful","concerned","confident","skeptical","amused"]},"referenceUrl":{"type":"string"},"thumbnailUrl":{"type":["string","null"]},"assetId":{"type":["string","null"]},"intensity":{"type":"number","minimum":0,"maximum":1},"isGenerated":{"type":"boolean"},"generationPrompt":{"type":["string","null"]},"sortOrder":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","characterId","emotion","referenceUrl","thumbnailUrl","assetId","intensity","isGenerated","generationPrompt","sortOrder","createdAt"]}}},"required":["expressions"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Character not found"}}},"post":{"tags":["Characters"],"summary":"Add expression","description":"Add an expression to the character library (upload or generate)","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"emotion":{"type":"string"},"intensity":{"type":"string"},"generate":{"type":"string"},"customPrompt":{"type":"string"}},"required":["emotion"]}}}},"responses":{"201":{"description":"Expression added","content":{"application/json":{"schema":{"type":"object","properties":{"expression":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"emotion":{"type":"string","enum":["neutral","happy","sad","angry","surprised","confused","excited","thoughtful","concerned","confident","skeptical","amused"]},"referenceUrl":{"type":"string"},"thumbnailUrl":{"type":["string","null"]},"assetId":{"type":["string","null"]},"intensity":{"type":"number","minimum":0,"maximum":1},"isGenerated":{"type":"boolean"},"generationPrompt":{"type":["string","null"]},"sortOrder":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","characterId","emotion","referenceUrl","thumbnailUrl","assetId","intensity","isGenerated","generationPrompt","sortOrder","createdAt"]}},"required":["expression"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Character not found"}}}},"/v1/studio/characters/{characterId}/expressions/generate":{"post":{"tags":["Characters"],"summary":"Generate expression","description":"AI-generate an expression from the base reference","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"emotion":{"type":"string","enum":["neutral","happy","sad","angry","surprised","confused","excited","thoughtful","concerned","confident","skeptical","amused"]},"intensity":{"type":"number","minimum":0,"maximum":1,"default":0.7},"customPrompt":{"type":"string"}},"required":["emotion"]}}}},"responses":{"201":{"description":"Expression generated","content":{"application/json":{"schema":{"type":"object","properties":{"expression":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"emotion":{"type":"string","enum":["neutral","happy","sad","angry","surprised","confused","excited","thoughtful","concerned","confident","skeptical","amused"]},"referenceUrl":{"type":"string"},"thumbnailUrl":{"type":["string","null"]},"assetId":{"type":["string","null"]},"intensity":{"type":"number","minimum":0,"maximum":1},"isGenerated":{"type":"boolean"},"generationPrompt":{"type":["string","null"]},"sortOrder":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","characterId","emotion","referenceUrl","thumbnailUrl","assetId","intensity","isGenerated","generationPrompt","sortOrder","createdAt"]}},"required":["expression"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Character not found or no base reference"}}}},"/v1/studio/characters/{characterId}/expressions/{expressionId}":{"delete":{"tags":["Characters"],"summary":"Delete expression","description":"Delete an expression from the library","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"expressionId","in":"path"}],"responses":{"200":{"description":"Expression deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Expression not found"}}}},"/v1/studio/characters/{characterId}/lock":{"post":{"tags":["Characters"],"summary":"Lock character","description":"Lock character for production use","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"jobId":{"type":"string"}}}}}},"responses":{"200":{"description":"Character locked","content":{"application/json":{"schema":{"type":"object","properties":{"character":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"visualStyle":{"type":["object","null"],"properties":{"artStyle":{"type":"string"},"lighting":{"type":"string"},"colorPalette":{"type":"array","items":{"type":"string"}}}},"faceEmbedding":{"type":["string","null"]},"sourceType":{"type":["string","null"],"enum":["created","extracted_photo","extracted_video","imported",null]},"consentConfirmed":{"type":"boolean"},"isLocked":{"type":"boolean"},"lockedReason":{"type":["string","null"]},"lockedAt":{"type":["string","null"]},"lockedByJobId":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":["string","null"]}},"required":["id","organizationId","projectId","name","description","visualStyle","faceEmbedding","sourceType","consentConfirmed","isLocked","lockedReason","lockedAt","lockedByJobId","createdBy","createdAt","updatedAt","deletedAt"]}},"required":["character"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Character not found"}}}},"/v1/studio/characters/{characterId}/unlock":{"post":{"tags":["Characters"],"summary":"Unlock character","description":"Unlock character for editing","parameters":[{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"responses":{"200":{"description":"Character unlocked","content":{"application/json":{"schema":{"type":"object","properties":{"character":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"visualStyle":{"type":["object","null"],"properties":{"artStyle":{"type":"string"},"lighting":{"type":"string"},"colorPalette":{"type":"array","items":{"type":"string"}}}},"faceEmbedding":{"type":["string","null"]},"sourceType":{"type":["string","null"],"enum":["created","extracted_photo","extracted_video","imported",null]},"consentConfirmed":{"type":"boolean"},"isLocked":{"type":"boolean"},"lockedReason":{"type":["string","null"]},"lockedAt":{"type":["string","null"]},"lockedByJobId":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":["string","null"]}},"required":["id","organizationId","projectId","name","description","visualStyle","faceEmbedding","sourceType","consentConfirmed","isLocked","lockedReason","lockedAt","lockedByJobId","createdBy","createdAt","updatedAt","deletedAt"]}},"required":["character"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Character not found"}}}},"/v1/studio/characters/extract/photos":{"post":{"tags":["Characters"],"summary":"Create character from photos","description":"Upload photos to create a character with AI-powered face extraction","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"string","format":"binary"}},"name":{"type":"string"},"sourceType":{"type":"string"},"consentConfirmed":{"type":"string"}},"required":["files","name"]}}}},"responses":{"201":{"description":"Character created from photos","content":{"application/json":{"schema":{"type":"object","properties":{"character":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"visualStyle":{"type":["object","null"],"properties":{"artStyle":{"type":"string"},"lighting":{"type":"string"},"colorPalette":{"type":"array","items":{"type":"string"}}}},"faceEmbedding":{"type":["string","null"]},"sourceType":{"type":["string","null"],"enum":["created","extracted_photo","extracted_video","imported",null]},"consentConfirmed":{"type":"boolean"},"isLocked":{"type":"boolean"},"lockedReason":{"type":["string","null"]},"lockedAt":{"type":["string","null"]},"lockedByJobId":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":["string","null"]}},"required":["id","organizationId","projectId","name","description","visualStyle","faceEmbedding","sourceType","consentConfirmed","isLocked","lockedReason","lockedAt","lockedByJobId","createdBy","createdAt","updatedAt","deletedAt"]},"extractedFeatures":{"type":"object","properties":{"faceShape":{"type":"string","enum":["oval","round","square","heart","oblong"]},"eyeColor":{"type":"string"},"eyeShape":{"type":"string","enum":["almond","round","hooded","monolid","upturned"]},"noseType":{"type":"string","enum":["straight","roman","button","aquiline"]},"lipShape":{"type":"string","enum":["full","thin","heart","wide"]},"hairColor":{"type":"string"},"hairStyle":{"type":"string"},"skinTone":{"type":"string"},"distinctiveFeatures":{"type":"array","items":{"type":"string"}},"estimatedAge":{"type":"number"},"estimatedGender":{"type":"string","enum":["male","female","non_binary"]}}},"analyzedPhotos":{"type":"array","items":{"type":"object","properties":{"imageUrl":{"type":"string"},"thumbnailUrl":{"type":"string"},"angle":{"type":"string","enum":["front","side","three_quarter","back"]},"quality":{"type":"number","minimum":0,"maximum":1},"faceConfidence":{"type":"number","minimum":0,"maximum":1},"isPrimary":{"type":"boolean"}},"required":["imageUrl","angle","quality","faceConfidence","isPrimary"]}},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"imageUrl":{"type":"string"},"thumbnailUrl":{"type":["string","null"]},"assetId":{"type":["string","null"]},"imageType":{"type":"string","enum":["face","full_body","expression","style"]},"angle":{"type":["string","null"],"enum":["front","side","three_quarter","back",null]},"isPrimary":{"type":"boolean"},"sortOrder":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","characterId","imageUrl","thumbnailUrl","assetId","imageType","angle","isPrimary","sortOrder","createdAt"]}}},"required":["character","extractedFeatures","analyzedPhotos","references"]}}}},"400":{"description":"No photos provided or consent required"},"401":{"description":"Unauthorized"}}}},"/v1/studio/characters/extract/video":{"post":{"tags":["Characters"],"summary":"Create character from video","description":"Upload a video to create a character with face, voice, and expression extraction","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"name":{"type":"string"},"extractVoice":{"type":"string"},"extractExpressions":{"type":"string"},"sourceType":{"type":"string"},"consentConfirmed":{"type":"string"}},"required":["name"]}}}},"responses":{"201":{"description":"Character created from video","content":{"application/json":{"schema":{"type":"object","properties":{"character":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"visualStyle":{"type":["object","null"],"properties":{"artStyle":{"type":"string"},"lighting":{"type":"string"},"colorPalette":{"type":"array","items":{"type":"string"}}}},"faceEmbedding":{"type":["string","null"]},"sourceType":{"type":["string","null"],"enum":["created","extracted_photo","extracted_video","imported",null]},"consentConfirmed":{"type":"boolean"},"isLocked":{"type":"boolean"},"lockedReason":{"type":["string","null"]},"lockedAt":{"type":["string","null"]},"lockedByJobId":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"type":["string","null"]}},"required":["id","organizationId","projectId","name","description","visualStyle","faceEmbedding","sourceType","consentConfirmed","isLocked","lockedReason","lockedAt","lockedByJobId","createdBy","createdAt","updatedAt","deletedAt"]},"extractedFeatures":{"type":"object","properties":{"faceShape":{"type":"string","enum":["oval","round","square","heart","oblong"]},"eyeColor":{"type":"string"},"eyeShape":{"type":"string","enum":["almond","round","hooded","monolid","upturned"]},"noseType":{"type":"string","enum":["straight","roman","button","aquiline"]},"lipShape":{"type":"string","enum":["full","thin","heart","wide"]},"hairColor":{"type":"string"},"hairStyle":{"type":"string"},"skinTone":{"type":"string"},"distinctiveFeatures":{"type":"array","items":{"type":"string"}},"estimatedAge":{"type":"number"},"estimatedGender":{"type":"string","enum":["male","female","non_binary"]}}},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"imageUrl":{"type":"string"},"thumbnailUrl":{"type":["string","null"]},"assetId":{"type":["string","null"]},"imageType":{"type":"string","enum":["face","full_body","expression","style"]},"angle":{"type":["string","null"],"enum":["front","side","three_quarter","back",null]},"isPrimary":{"type":"boolean"},"sortOrder":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","characterId","imageUrl","thumbnailUrl","assetId","imageType","angle","isPrimary","sortOrder","createdAt"]}},"voice":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"provider":{"type":"string","enum":["elevenlabs","openai"]},"voiceId":{"type":"string"},"voiceName":{"type":["string","null"]},"isCloned":{"type":"boolean"},"sourceAudioUrl":{"type":["string","null"]},"sourceAssetId":{"type":["string","null"]},"settings":{"type":["object","null"],"properties":{"stability":{"type":"number","minimum":0,"maximum":1,"default":0.5},"similarity":{"type":"number","minimum":0,"maximum":1,"default":0.75},"style":{"type":"number","minimum":0,"maximum":1,"default":0},"speakerBoost":{"type":"boolean","default":true}}},"previewAudioUrl":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","characterId","provider","voiceId","voiceName","isCloned","sourceAudioUrl","sourceAssetId","settings","previewAudioUrl","createdAt","updatedAt"]},"expressions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"characterId":{"type":"string"},"emotion":{"type":"string","enum":["neutral","happy","sad","angry","surprised","confused","excited","thoughtful","concerned","confident","skeptical","amused"]},"referenceUrl":{"type":"string"},"thumbnailUrl":{"type":["string","null"]},"assetId":{"type":["string","null"]},"intensity":{"type":"number","minimum":0,"maximum":1},"isGenerated":{"type":"boolean"},"generationPrompt":{"type":["string","null"]},"sortOrder":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","characterId","emotion","referenceUrl","thumbnailUrl","assetId","intensity","isGenerated","generationPrompt","sortOrder","createdAt"]}},"extractedFrameCount":{"type":"number"},"audioExtracted":{"type":"boolean"}},"required":["character","extractedFeatures","references","extractedFrameCount","audioExtracted"]}}}},"400":{"description":"No video provided or consent required"},"401":{"description":"Unauthorized"}}}},"/v1/studio/costs":{"get":{"tags":["Costs"],"summary":"Get cost history","description":"Get cost history for the organization with optional date filtering","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Start date (ISO 8601)"},"required":false,"description":"Start date (ISO 8601)","name":"startDate","in":"query"},{"schema":{"type":"string","description":"End date (ISO 8601)"},"required":false,"description":"End date (ISO 8601)","name":"endDate","in":"query"}],"responses":{"200":{"description":"Cost history","content":{"application/json":{"schema":{"type":"object","properties":{"costs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"clipId":{"type":["string","null"]},"organizationId":{"type":"string"},"provider":{"type":"string"},"model":{"type":"string"},"qualityTier":{"type":"string"},"durationSeconds":{"type":"number"},"inputTokens":{"type":["number","null"]},"outputTokens":{"type":["number","null"]},"costUsd":{"type":"number"},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","jobId","clipId","organizationId","provider","model","qualityTier","durationSeconds","inputTokens","outputTokens","costUsd","metadata","createdAt"]}},"total":{"type":"number"},"totalCost":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["costs","total","totalCost","limit","offset"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/costs/estimate":{"post":{"tags":["Costs"],"summary":"Estimate production cost","description":"Calculate estimated cost for a production job before running it","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string"},"qualityTier":{"type":"string","enum":["draft","standard","professional","premium"]},"durationSeconds":{"type":"number","minimum":1,"maximum":300},"clipCount":{"type":"integer","minimum":1,"maximum":100},"variationsPerClip":{"type":"integer","minimum":1,"maximum":10,"default":1}},"required":["provider","qualityTier","durationSeconds","clipCount"]}}}},"responses":{"200":{"description":"Cost estimate with budget check","content":{"application/json":{"schema":{"type":"object","properties":{"estimate":{"type":"object","properties":{"totalCost":{"type":"number"},"perClipCost":{"type":"number"},"breakdown":{"type":"object","properties":{"clips":{"type":"number"},"variations":{"type":"number"},"totalGenerations":{"type":"number"},"pricePerGeneration":{"type":"number"}},"required":["clips","variations","totalGenerations","pricePerGeneration"]}},"required":["totalCost","perClipCost","breakdown"]},"budgetCheck":{"type":"object","properties":{"allowed":{"type":"boolean"},"reason":{"type":"string"},"currentSpend":{"type":"number"},"budgetRemaining":{"type":["number","null"]}},"required":["allowed","currentSpend","budgetRemaining"]}},"required":["estimate","budgetCheck"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"}}}},"/v1/studio/jobs/{jobId}/costs":{"get":{"tags":["Costs"],"summary":"Get costs for a job","description":"Get all cost records associated with a specific production job","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Job costs","content":{"application/json":{"schema":{"type":"object","properties":{"costs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"clipId":{"type":["string","null"]},"organizationId":{"type":"string"},"provider":{"type":"string"},"model":{"type":"string"},"qualityTier":{"type":"string"},"durationSeconds":{"type":"number"},"inputTokens":{"type":["number","null"]},"outputTokens":{"type":["number","null"]},"costUsd":{"type":"number"},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","jobId","clipId","organizationId","provider","model","qualityTier","durationSeconds","inputTokens","outputTokens","costUsd","metadata","createdAt"]}},"totalCost":{"type":"number"},"byProvider":{"type":"object","additionalProperties":{"type":"number"}}},"required":["costs","totalCost","byProvider"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Job not found"}}}},"/v1/studio/budget":{"get":{"tags":["Budgets"],"summary":"Get organization budget","description":"Get budget configuration and current status for the organization","responses":{"200":{"description":"Budget status","content":{"application/json":{"schema":{"type":"object","properties":{"budget":{"type":["object","null"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"monthlyBudgetUsd":{"type":["number","null"]},"dailyBudgetUsd":{"type":["number","null"]},"alertThresholdPercent":{"type":"number"},"hardLimitEnabled":{"type":"boolean"},"currentMonthSpend":{"type":"number"},"currentDaySpend":{"type":"number"},"lastMonthResetAt":{"type":["string","null"]},"lastDayResetAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","monthlyBudgetUsd","dailyBudgetUsd","alertThresholdPercent","hardLimitEnabled","currentMonthSpend","currentDaySpend","lastMonthResetAt","lastDayResetAt","createdAt","updatedAt"]},"status":{"type":"object","properties":{"monthlyBudget":{"type":["number","null"]},"monthlySpend":{"type":"number"},"monthlyRemaining":{"type":["number","null"]},"monthlyPercent":{"type":["number","null"]},"dailyBudget":{"type":["number","null"]},"dailySpend":{"type":"number"},"dailyRemaining":{"type":["number","null"]},"dailyPercent":{"type":["number","null"]},"isOverBudget":{"type":"boolean"},"alerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"alertType":{"type":"string","enum":["threshold_reached","budget_exceeded","daily_limit_reached","approaching_limit"]},"thresholdPercent":{"type":"number"},"currentPercent":{"type":"number"},"budgetAmount":{"type":"number"},"currentSpend":{"type":"number"},"periodType":{"type":"string","enum":["daily","monthly"]},"acknowledged":{"type":"boolean"},"acknowledgedBy":{"type":["string","null"]},"acknowledgedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","organizationId","alertType","thresholdPercent","currentPercent","budgetAmount","currentSpend","periodType","acknowledged","acknowledgedBy","acknowledgedAt","createdAt"]}}},"required":["monthlyBudget","monthlySpend","monthlyRemaining","monthlyPercent","dailyBudget","dailySpend","dailyRemaining","dailyPercent","isOverBudget","alerts"]}},"required":["budget","status"]}}}},"401":{"description":"Unauthorized"}}},"put":{"tags":["Budgets"],"summary":"Update organization budget","description":"Update budget limits and alert configuration","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"monthlyBudgetUsd":{"type":["number","null"]},"dailyBudgetUsd":{"type":["number","null"]},"alertThresholdPercent":{"type":"number","minimum":1,"maximum":100},"hardLimitEnabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated budget","content":{"application/json":{"schema":{"type":"object","properties":{"budget":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"monthlyBudgetUsd":{"type":["number","null"]},"dailyBudgetUsd":{"type":["number","null"]},"alertThresholdPercent":{"type":"number"},"hardLimitEnabled":{"type":"boolean"},"currentMonthSpend":{"type":"number"},"currentDaySpend":{"type":"number"},"lastMonthResetAt":{"type":["string","null"]},"lastDayResetAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","monthlyBudgetUsd","dailyBudgetUsd","alertThresholdPercent","hardLimitEnabled","currentMonthSpend","currentDaySpend","lastMonthResetAt","lastDayResetAt","createdAt","updatedAt"]}},"required":["budget"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"}}}},"/v1/studio/budget/alerts":{"get":{"tags":["Budgets"],"summary":"Get budget alerts","description":"Get all budget alerts for the organization","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Budget alerts","content":{"application/json":{"schema":{"type":"object","properties":{"alerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"alertType":{"type":"string","enum":["threshold_reached","budget_exceeded","daily_limit_reached","approaching_limit"]},"thresholdPercent":{"type":"number"},"currentPercent":{"type":"number"},"budgetAmount":{"type":"number"},"currentSpend":{"type":"number"},"periodType":{"type":"string","enum":["daily","monthly"]},"acknowledged":{"type":"boolean"},"acknowledgedBy":{"type":["string","null"]},"acknowledgedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","organizationId","alertType","thresholdPercent","currentPercent","budgetAmount","currentSpend","periodType","acknowledged","acknowledgedBy","acknowledgedAt","createdAt"]}},"total":{"type":"number"}},"required":["alerts","total"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/budget/alerts/{alertId}/acknowledge":{"post":{"tags":["Budgets"],"summary":"Acknowledge a budget alert","description":"Mark a budget alert as acknowledged","parameters":[{"schema":{"type":"string"},"required":true,"name":"alertId","in":"path"}],"responses":{"200":{"description":"Acknowledged alert","content":{"application/json":{"schema":{"type":"object","properties":{"alert":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"alertType":{"type":"string","enum":["threshold_reached","budget_exceeded","daily_limit_reached","approaching_limit"]},"thresholdPercent":{"type":"number"},"currentPercent":{"type":"number"},"budgetAmount":{"type":"number"},"currentSpend":{"type":"number"},"periodType":{"type":"string","enum":["daily","monthly"]},"acknowledged":{"type":"boolean"},"acknowledgedBy":{"type":["string","null"]},"acknowledgedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","organizationId","alertType","thresholdPercent","currentPercent","budgetAmount","currentSpend","periodType","acknowledged","acknowledgedBy","acknowledgedAt","createdAt"]}},"required":["alert"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Alert not found"}}}},"/v1/studio/quotas":{"get":{"tags":["Quotas"],"summary":"Get quota status","description":"Get current quota limits, usage, and status for the organization","responses":{"200":{"description":"Quota status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"quotas":{"type":"object","properties":{"tier":{"type":"string","enum":["free","pro","enterprise"]},"maxConcurrentJobs":{"type":"integer"},"maxClipsPerJob":{"type":"integer"},"dailyLimit":{"type":"integer"},"monthlyLimit":{"type":"integer"},"hasOrgOverrides":{"type":"boolean"}},"required":["tier","maxConcurrentJobs","maxClipsPerJob","dailyLimit","monthlyLimit","hasOrgOverrides"]},"usage":{"type":"object","properties":{"daily":{"type":"integer"},"monthly":{"type":"integer"},"activeJobs":{"type":"integer"}},"required":["daily","monthly","activeJobs"]},"percentages":{"type":"object","properties":{"daily":{"type":"number"},"monthly":{"type":"number"},"concurrent":{"type":"number"}},"required":["daily","monthly","concurrent"]},"allowed":{"type":"boolean"},"message":{"type":"string"}},"required":["quotas","usage","percentages","allowed"]}},"required":["status"]}}}},"401":{"description":"Unauthorized"}}},"patch":{"tags":["Quotas"],"summary":"Update organization quotas","description":"Update quota overrides for the organization (admin only)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"maxConcurrentJobs":{"type":"integer","minimum":1},"maxClipsPerJob":{"type":"integer","minimum":1},"dailyLimit":{"type":"integer","minimum":1},"monthlyLimit":{"type":"integer","minimum":1}}}}}},"responses":{"200":{"description":"Updated quotas","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"quotas":{"type":"object","properties":{"tier":{"type":"string","enum":["free","pro","enterprise"]},"maxConcurrentJobs":{"type":"integer"},"maxClipsPerJob":{"type":"integer"},"dailyLimit":{"type":"integer"},"monthlyLimit":{"type":"integer"},"hasOrgOverrides":{"type":"boolean"}},"required":["tier","maxConcurrentJobs","maxClipsPerJob","dailyLimit","monthlyLimit","hasOrgOverrides"]}},"required":["success","quotas"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden - admin access required"}}}},"/v1/studio/quotas/check":{"post":{"tags":["Quotas"],"summary":"Check if job is allowed","description":"Check if a job with the given clip count is allowed under current quotas","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clipCount":{"type":"integer","minimum":1}},"required":["clipCount"]}}}},"responses":{"200":{"description":"Quota check result","content":{"application/json":{"schema":{"type":"object","properties":{"allowed":{"type":"boolean"},"reason":{"type":"string"},"quotas":{"type":"object","properties":{"tier":{"type":"string","enum":["free","pro","enterprise"]},"maxConcurrentJobs":{"type":"integer"},"maxClipsPerJob":{"type":"integer"},"dailyLimit":{"type":"integer"},"monthlyLimit":{"type":"integer"},"hasOrgOverrides":{"type":"boolean"}},"required":["tier","maxConcurrentJobs","maxClipsPerJob","dailyLimit","monthlyLimit","hasOrgOverrides"]},"usage":{"type":"object","properties":{"daily":{"type":"integer"},"monthly":{"type":"integer"},"activeJobs":{"type":"integer"}},"required":["daily","monthly","activeJobs"]}},"required":["allowed","quotas","usage"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"}}}},"/v1/studio/analytics":{"get":{"tags":["Analytics"],"summary":"Get analytics dashboard","description":"Get comprehensive analytics dashboard with totals, trends, and provider comparison","parameters":[{"schema":{"type":"string","description":"Start date (ISO 8601)"},"required":false,"description":"Start date (ISO 8601)","name":"startDate","in":"query"},{"schema":{"type":"string","description":"End date (ISO 8601)"},"required":false,"description":"End date (ISO 8601)","name":"endDate","in":"query"},{"schema":{"type":"string","enum":["7d","30d","90d"],"default":"30d","description":"Time period for analytics"},"required":false,"description":"Time period for analytics","name":"period","in":"query"}],"responses":{"200":{"description":"Analytics dashboard","content":{"application/json":{"schema":{"type":"object","properties":{"dashboard":{"type":"object","properties":{"totals":{"type":"object","properties":{"totalJobs":{"type":"integer"},"totalClips":{"type":"integer"},"totalCost":{"type":"number"},"avgProcessingTimeMs":{"type":"number"},"successRate":{"type":"number"},"failureRate":{"type":"number"}},"required":["totalJobs","totalClips","totalCost","avgProcessingTimeMs","successRate","failureRate"]},"byProvider":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"totalJobs":{"type":"integer"},"totalCost":{"type":"number"},"avgProcessingTime":{"type":"number"},"successRate":{"type":"number"}},"required":["provider","totalJobs","totalCost","avgProcessingTime","successRate"]}},"topFailures":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string"},"count":{"type":"integer"},"percentage":{"type":"number"}},"required":["reason","count","percentage"]}},"dailyTrends":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"jobsCompleted":{"type":"integer"},"clipsGenerated":{"type":"integer"},"totalCost":{"type":"number"}},"required":["date","jobsCompleted","clipsGenerated","totalCost"]}}},"required":["totals","byProvider","topFailures","dailyTrends"]},"period":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":["startDate","endDate"]}},"required":["dashboard","period"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/analytics/daily":{"get":{"tags":["Analytics"],"summary":"Get daily statistics","description":"Get day-by-day statistics for charts and trend analysis","parameters":[{"schema":{"type":"string","description":"Start date (ISO 8601)"},"required":false,"description":"Start date (ISO 8601)","name":"startDate","in":"query"},{"schema":{"type":"string","description":"End date (ISO 8601)"},"required":false,"description":"End date (ISO 8601)","name":"endDate","in":"query"},{"schema":{"type":"string","enum":["7d","30d","90d"],"default":"30d","description":"Time period for analytics"},"required":false,"description":"Time period for analytics","name":"period","in":"query"}],"responses":{"200":{"description":"Daily statistics","content":{"application/json":{"schema":{"type":"object","properties":{"stats":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"jobsCompleted":{"type":"integer"},"jobsFailed":{"type":"integer"},"clipsGenerated":{"type":"integer"},"totalCost":{"type":"number"},"avgProcessingTimeMs":{"type":"number"}},"required":["date","jobsCompleted","jobsFailed","clipsGenerated","totalCost","avgProcessingTimeMs"]}}},"required":["stats"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/analytics/providers":{"get":{"tags":["Analytics"],"summary":"Get provider comparison","description":"Compare performance and costs across different AI providers","parameters":[{"schema":{"type":"string","description":"Start date (ISO 8601)"},"required":false,"description":"Start date (ISO 8601)","name":"startDate","in":"query"},{"schema":{"type":"string","description":"End date (ISO 8601)"},"required":false,"description":"End date (ISO 8601)","name":"endDate","in":"query"},{"schema":{"type":"string","enum":["7d","30d","90d"],"default":"30d","description":"Time period for analytics"},"required":false,"description":"Time period for analytics","name":"period","in":"query"}],"responses":{"200":{"description":"Provider comparison","content":{"application/json":{"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"jobs":{"type":"integer"},"clips":{"type":"integer"},"totalCost":{"type":"number"},"avgCostPerClip":{"type":"number"},"avgProcessingTimeMs":{"type":"number"},"successRate":{"type":"number"}},"required":["provider","jobs","clips","totalCost","avgCostPerClip","avgProcessingTimeMs","successRate"]}}},"required":["providers"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/priority/config":{"get":{"tags":["Priority"],"summary":"Get priority configuration","description":"Get priority configuration for the organization","responses":{"200":{"description":"Priority configuration","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"defaultPriority":{"type":"string","enum":["critical","high","normal","low","background"]},"canUseHigh":{"type":"boolean"},"canUseCritical":{"type":"boolean"},"reservedSlots":{"type":"integer"}},"required":["defaultPriority","canUseHigh","canUseCritical","reservedSlots"]}},"required":["config"]}}}},"401":{"description":"Unauthorized"}}},"patch":{"tags":["Priority"],"summary":"Update priority configuration","description":"Update priority configuration for the organization (admin only)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"defaultPriority":{"type":"string","enum":["critical","high","normal","low","background"]},"canUseHigh":{"type":"boolean"},"canUseCritical":{"type":"boolean"},"reservedSlots":{"type":"integer","minimum":0}}}}}},"responses":{"200":{"description":"Updated priority configuration","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"defaultPriority":{"type":"string","enum":["critical","high","normal","low","background"]},"canUseHigh":{"type":"boolean"},"canUseCritical":{"type":"boolean"},"reservedSlots":{"type":"integer"}},"required":["defaultPriority","canUseHigh","canUseCritical","reservedSlots"]}},"required":["config"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden - admin access required"}}}},"/v1/studio/priority/queue":{"get":{"tags":["Priority"],"summary":"Get queue status","description":"Get current queue status with counts by priority level","responses":{"200":{"description":"Queue status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"pending":{"type":"integer"},"processing":{"type":"integer"},"byPriority":{"type":"object","properties":{"critical":{"type":"integer"},"high":{"type":"integer"},"normal":{"type":"integer"},"low":{"type":"integer"},"background":{"type":"integer"}},"required":["critical","high","normal","low","background"]},"estimatedProcessingRate":{"type":"number"}},"required":["pending","processing","byPriority","estimatedProcessingRate"]}},"required":["status"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/jobs/{jobId}/priority/position":{"get":{"tags":["Priority"],"summary":"Get job queue position","description":"Get queue position and estimated wait time for a specific job","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Queue position","content":{"application/json":{"schema":{"type":"object","properties":{"position":{"type":"object","properties":{"position":{"type":"integer"},"estimatedWaitMinutes":{"type":"number"},"ahead":{"type":"integer"}},"required":["position","estimatedWaitMinutes","ahead"]}},"required":["position"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Job not found"}}}},"/v1/studio/priority/calculate":{"post":{"tags":["Priority"],"summary":"Calculate priority score","description":"Calculate the priority score for a hypothetical job","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clipCount":{"type":"integer","minimum":1},"requestedPriority":{"type":"string","enum":["critical","high","normal","low","background"]}},"required":["clipCount"]}}}},"responses":{"200":{"description":"Priority calculation result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"priority":{"type":"string","enum":["critical","high","normal","low","background"]},"score":{"type":"integer"}},"required":["priority","score"]}},"required":["result"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"}}}},"/v1/studio/projects/{projectId}/audio/tracks":{"get":{"tags":["Audio"],"summary":"List audio tracks","description":"Get all audio tracks for a project","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"List of audio tracks","content":{"application/json":{"schema":{"type":"object","properties":{"tracks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["dialogue","music","sfx","ambient","foley"]},"color":{"type":["string","null"]},"volume":{"type":"number"},"pan":{"type":"number"},"muted":{"type":"boolean"},"solo":{"type":"boolean"},"order":{"type":"number"},"effects":{"type":["object","null"],"properties":{"eq":{"type":"object","properties":{"highPass":{"type":"number","minimum":20,"maximum":500},"lowPass":{"type":"number","minimum":1000,"maximum":20000},"presence":{"type":"number","minimum":-12,"maximum":12}}},"compressor":{"type":"object","properties":{"threshold":{"type":"number","minimum":-60,"maximum":0},"ratio":{"type":"number","minimum":1,"maximum":20},"attack":{"type":"number","minimum":0,"maximum":1000},"release":{"type":"number","minimum":0,"maximum":3000}}},"reverb":{"type":"object","properties":{"wet":{"type":"number","minimum":0,"maximum":1},"decay":{"type":"number","minimum":0.1,"maximum":10},"preDelay":{"type":"number","minimum":0,"maximum":500}}}}},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","projectId","organizationId","name","type","color","volume","pan","muted","solo","order","effects","createdAt","updatedAt"]}},"total":{"type":"number"}},"required":["tracks","total"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"}}},"post":{"tags":["Audio"],"summary":"Create audio track","description":"Create a new audio track in a project","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"type":{"type":"string","enum":["dialogue","music","sfx","ambient","foley"]},"color":{"type":"string"},"volume":{"type":"number","minimum":-60,"maximum":12,"default":0},"pan":{"type":"number","minimum":-1,"maximum":1,"default":0},"order":{"type":"integer","minimum":0}},"required":["name","type"]}}}},"responses":{"201":{"description":"Track created","content":{"application/json":{"schema":{"type":"object","properties":{"track":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["dialogue","music","sfx","ambient","foley"]},"color":{"type":["string","null"]},"volume":{"type":"number"},"pan":{"type":"number"},"muted":{"type":"boolean"},"solo":{"type":"boolean"},"order":{"type":"number"},"effects":{"type":["object","null"],"properties":{"eq":{"type":"object","properties":{"highPass":{"type":"number","minimum":20,"maximum":500},"lowPass":{"type":"number","minimum":1000,"maximum":20000},"presence":{"type":"number","minimum":-12,"maximum":12}}},"compressor":{"type":"object","properties":{"threshold":{"type":"number","minimum":-60,"maximum":0},"ratio":{"type":"number","minimum":1,"maximum":20},"attack":{"type":"number","minimum":0,"maximum":1000},"release":{"type":"number","minimum":0,"maximum":3000}}},"reverb":{"type":"object","properties":{"wet":{"type":"number","minimum":0,"maximum":1},"decay":{"type":"number","minimum":0.1,"maximum":10},"preDelay":{"type":"number","minimum":0,"maximum":500}}}}},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","projectId","organizationId","name","type","color","volume","pan","muted","solo","order","effects","createdAt","updatedAt"]}},"required":["track"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"}}}},"/v1/studio/projects/{projectId}/audio/tracks/{trackId}":{"get":{"tags":["Audio"],"summary":"Get audio track","description":"Get a specific audio track by ID","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"trackId","in":"path"}],"responses":{"200":{"description":"Audio track details","content":{"application/json":{"schema":{"type":"object","properties":{"track":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["dialogue","music","sfx","ambient","foley"]},"color":{"type":["string","null"]},"volume":{"type":"number"},"pan":{"type":"number"},"muted":{"type":"boolean"},"solo":{"type":"boolean"},"order":{"type":"number"},"effects":{"type":["object","null"],"properties":{"eq":{"type":"object","properties":{"highPass":{"type":"number","minimum":20,"maximum":500},"lowPass":{"type":"number","minimum":1000,"maximum":20000},"presence":{"type":"number","minimum":-12,"maximum":12}}},"compressor":{"type":"object","properties":{"threshold":{"type":"number","minimum":-60,"maximum":0},"ratio":{"type":"number","minimum":1,"maximum":20},"attack":{"type":"number","minimum":0,"maximum":1000},"release":{"type":"number","minimum":0,"maximum":3000}}},"reverb":{"type":"object","properties":{"wet":{"type":"number","minimum":0,"maximum":1},"decay":{"type":"number","minimum":0.1,"maximum":10},"preDelay":{"type":"number","minimum":0,"maximum":500}}}}},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","projectId","organizationId","name","type","color","volume","pan","muted","solo","order","effects","createdAt","updatedAt"]}},"required":["track"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Track not found"}}},"patch":{"tags":["Audio"],"summary":"Update audio track","description":"Update an existing audio track","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"trackId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"color":{"type":"string"},"volume":{"type":"number","minimum":-60,"maximum":12},"pan":{"type":"number","minimum":-1,"maximum":1},"muted":{"type":"boolean"},"solo":{"type":"boolean"},"order":{"type":"integer","minimum":0},"effects":{"type":"object","properties":{"eq":{"type":"object","properties":{"highPass":{"type":"number","minimum":20,"maximum":500},"lowPass":{"type":"number","minimum":1000,"maximum":20000},"presence":{"type":"number","minimum":-12,"maximum":12}}},"compressor":{"type":"object","properties":{"threshold":{"type":"number","minimum":-60,"maximum":0},"ratio":{"type":"number","minimum":1,"maximum":20},"attack":{"type":"number","minimum":0,"maximum":1000},"release":{"type":"number","minimum":0,"maximum":3000}}},"reverb":{"type":"object","properties":{"wet":{"type":"number","minimum":0,"maximum":1},"decay":{"type":"number","minimum":0.1,"maximum":10},"preDelay":{"type":"number","minimum":0,"maximum":500}}}}}}}}}},"responses":{"200":{"description":"Track updated","content":{"application/json":{"schema":{"type":"object","properties":{"track":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["dialogue","music","sfx","ambient","foley"]},"color":{"type":["string","null"]},"volume":{"type":"number"},"pan":{"type":"number"},"muted":{"type":"boolean"},"solo":{"type":"boolean"},"order":{"type":"number"},"effects":{"type":["object","null"],"properties":{"eq":{"type":"object","properties":{"highPass":{"type":"number","minimum":20,"maximum":500},"lowPass":{"type":"number","minimum":1000,"maximum":20000},"presence":{"type":"number","minimum":-12,"maximum":12}}},"compressor":{"type":"object","properties":{"threshold":{"type":"number","minimum":-60,"maximum":0},"ratio":{"type":"number","minimum":1,"maximum":20},"attack":{"type":"number","minimum":0,"maximum":1000},"release":{"type":"number","minimum":0,"maximum":3000}}},"reverb":{"type":"object","properties":{"wet":{"type":"number","minimum":0,"maximum":1},"decay":{"type":"number","minimum":0.1,"maximum":10},"preDelay":{"type":"number","minimum":0,"maximum":500}}}}},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","projectId","organizationId","name","type","color","volume","pan","muted","solo","order","effects","createdAt","updatedAt"]}},"required":["track"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Track not found"}}},"delete":{"tags":["Audio"],"summary":"Delete audio track","description":"Delete an audio track (soft delete)","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"trackId","in":"path"}],"responses":{"200":{"description":"Track deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Track not found"}}}},"/v1/studio/projects/{projectId}/audio/tracks/reorder":{"post":{"tags":["Audio"],"summary":"Reorder audio tracks","description":"Update the order of audio tracks","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"trackIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["trackIds"]}}}},"responses":{"200":{"description":"Tracks reordered","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/projects/{projectId}/audio/clips":{"get":{"tags":["Audio"],"summary":"List audio clips","description":"Get all audio clips for a project, optionally filtered by track","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"trackId","in":"query"}],"responses":{"200":{"description":"List of audio clips","content":{"application/json":{"schema":{"type":"object","properties":{"clips":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"trackId":{"type":"string"},"projectId":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":["string","null"]},"sourceType":{"type":"string","enum":["voice","suno","elevenlabs_sfx","freesound","upload","brand_kit","dubbing"]},"sourceId":{"type":["string","null"]},"sourceUrl":{"type":"string"},"startTime":{"type":"number"},"duration":{"type":"number"},"trimStart":{"type":"number"},"trimEnd":{"type":"number"},"volume":{"type":"number"},"fadeIn":{"type":"number"},"fadeOut":{"type":"number"},"licenseType":{"type":["string","null"]},"licenseExpiry":{"type":["string","null"]},"attribution":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","trackId","projectId","organizationId","name","sourceType","sourceId","sourceUrl","startTime","duration","trimStart","trimEnd","volume","fadeIn","fadeOut","licenseType","licenseExpiry","attribution","metadata","createdAt","updatedAt"]}},"total":{"type":"number"}},"required":["clips","total"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"}}},"post":{"tags":["Audio"],"summary":"Create audio clip","description":"Create a new audio clip in a project","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"trackId":{"type":"string"},"name":{"type":"string","maxLength":100},"sourceType":{"type":"string","enum":["voice","suno","elevenlabs_sfx","freesound","upload","brand_kit","dubbing"]},"sourceId":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"},"startTime":{"type":"integer","minimum":0},"duration":{"type":"integer","minimum":1},"trimStart":{"type":"integer","minimum":0,"default":0},"trimEnd":{"type":"integer","minimum":0,"default":0},"volume":{"type":"number","minimum":-60,"maximum":12,"default":0},"fadeIn":{"type":"integer","minimum":0,"default":0},"fadeOut":{"type":"integer","minimum":0,"default":0},"licenseType":{"type":"string"},"licenseExpiry":{"type":"string"},"attribution":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}}},"required":["trackId","sourceType","sourceUrl","startTime","duration"]}}}},"responses":{"201":{"description":"Clip created","content":{"application/json":{"schema":{"type":"object","properties":{"clip":{"type":"object","properties":{"id":{"type":"string"},"trackId":{"type":"string"},"projectId":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":["string","null"]},"sourceType":{"type":"string","enum":["voice","suno","elevenlabs_sfx","freesound","upload","brand_kit","dubbing"]},"sourceId":{"type":["string","null"]},"sourceUrl":{"type":"string"},"startTime":{"type":"number"},"duration":{"type":"number"},"trimStart":{"type":"number"},"trimEnd":{"type":"number"},"volume":{"type":"number"},"fadeIn":{"type":"number"},"fadeOut":{"type":"number"},"licenseType":{"type":["string","null"]},"licenseExpiry":{"type":["string","null"]},"attribution":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","trackId","projectId","organizationId","name","sourceType","sourceId","sourceUrl","startTime","duration","trimStart","trimEnd","volume","fadeIn","fadeOut","licenseType","licenseExpiry","attribution","metadata","createdAt","updatedAt"]}},"required":["clip"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"}}}},"/v1/studio/projects/{projectId}/audio/clips/{clipId}":{"get":{"tags":["Audio"],"summary":"Get audio clip","description":"Get a specific audio clip by ID","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"clipId","in":"path"}],"responses":{"200":{"description":"Audio clip details","content":{"application/json":{"schema":{"type":"object","properties":{"clip":{"type":"object","properties":{"id":{"type":"string"},"trackId":{"type":"string"},"projectId":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":["string","null"]},"sourceType":{"type":"string","enum":["voice","suno","elevenlabs_sfx","freesound","upload","brand_kit","dubbing"]},"sourceId":{"type":["string","null"]},"sourceUrl":{"type":"string"},"startTime":{"type":"number"},"duration":{"type":"number"},"trimStart":{"type":"number"},"trimEnd":{"type":"number"},"volume":{"type":"number"},"fadeIn":{"type":"number"},"fadeOut":{"type":"number"},"licenseType":{"type":["string","null"]},"licenseExpiry":{"type":["string","null"]},"attribution":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","trackId","projectId","organizationId","name","sourceType","sourceId","sourceUrl","startTime","duration","trimStart","trimEnd","volume","fadeIn","fadeOut","licenseType","licenseExpiry","attribution","metadata","createdAt","updatedAt"]}},"required":["clip"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Clip not found"}}},"patch":{"tags":["Audio"],"summary":"Update audio clip","description":"Update an existing audio clip","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"clipId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"trackId":{"type":"string"},"name":{"type":"string","maxLength":100},"startTime":{"type":"integer","minimum":0},"duration":{"type":"integer","minimum":1},"trimStart":{"type":"integer","minimum":0},"trimEnd":{"type":"integer","minimum":0},"volume":{"type":"number","minimum":-60,"maximum":12},"fadeIn":{"type":"integer","minimum":0},"fadeOut":{"type":"integer","minimum":0}}}}}},"responses":{"200":{"description":"Clip updated","content":{"application/json":{"schema":{"type":"object","properties":{"clip":{"type":"object","properties":{"id":{"type":"string"},"trackId":{"type":"string"},"projectId":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":["string","null"]},"sourceType":{"type":"string","enum":["voice","suno","elevenlabs_sfx","freesound","upload","brand_kit","dubbing"]},"sourceId":{"type":["string","null"]},"sourceUrl":{"type":"string"},"startTime":{"type":"number"},"duration":{"type":"number"},"trimStart":{"type":"number"},"trimEnd":{"type":"number"},"volume":{"type":"number"},"fadeIn":{"type":"number"},"fadeOut":{"type":"number"},"licenseType":{"type":["string","null"]},"licenseExpiry":{"type":["string","null"]},"attribution":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","trackId","projectId","organizationId","name","sourceType","sourceId","sourceUrl","startTime","duration","trimStart","trimEnd","volume","fadeIn","fadeOut","licenseType","licenseExpiry","attribution","metadata","createdAt","updatedAt"]}},"required":["clip"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Clip not found"}}},"delete":{"tags":["Audio"],"summary":"Delete audio clip","description":"Delete an audio clip (soft delete)","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"clipId","in":"path"}],"responses":{"200":{"description":"Clip deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Clip not found"}}}},"/v1/studio/projects/{projectId}/audio/clips/batch-move":{"post":{"tags":["Audio"],"summary":"Batch move clips","description":"Move multiple clips by a time delta","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clipIds":{"type":"array","items":{"type":"string"},"minItems":1},"deltaTime":{"type":"integer"}},"required":["clipIds","deltaTime"]}}}},"responses":{"200":{"description":"Clips moved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"movedCount":{"type":"number"}},"required":["success","movedCount"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/projects/{projectId}/audio/clips/{clipId}/duplicate":{"post":{"tags":["Audio"],"summary":"Duplicate audio clip","description":"Create a copy of an audio clip","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"clipId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"startTime":{"type":"integer","minimum":0},"trackId":{"type":"string"}}}}}},"responses":{"201":{"description":"Clip duplicated","content":{"application/json":{"schema":{"type":"object","properties":{"clip":{"type":"object","properties":{"id":{"type":"string"},"trackId":{"type":"string"},"projectId":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":["string","null"]},"sourceType":{"type":"string","enum":["voice","suno","elevenlabs_sfx","freesound","upload","brand_kit","dubbing"]},"sourceId":{"type":["string","null"]},"sourceUrl":{"type":"string"},"startTime":{"type":"number"},"duration":{"type":"number"},"trimStart":{"type":"number"},"trimEnd":{"type":"number"},"volume":{"type":"number"},"fadeIn":{"type":"number"},"fadeOut":{"type":"number"},"licenseType":{"type":["string","null"]},"licenseExpiry":{"type":["string","null"]},"attribution":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","trackId","projectId","organizationId","name","sourceType","sourceId","sourceUrl","startTime","duration","trimStart","trimEnd","volume","fadeIn","fadeOut","licenseType","licenseExpiry","attribution","metadata","createdAt","updatedAt"]}},"required":["clip"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Clip not found"}}}},"/v1/studio/voices/generate":{"post":{"tags":["Audio"],"summary":"Generate speech from text","description":"Convert text to speech using AI voice synthesis","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSpeechRequest"}}}},"responses":{"200":{"description":"Generated speech","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSpeechResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"required":["error"]}}}},"500":{"description":"Generation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"required":["error"]}}}}}}},"/v1/studio/voices/clone":{"post":{"tags":["Audio"],"summary":"Clone a voice","description":"Create a custom voice clone from audio samples","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneVoiceRequest"}}}},"responses":{"201":{"description":"Voice cloned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneVoiceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"required":["error"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"required":["error"]}}}},"500":{"description":"Clone failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"required":["error"]}}}}}}},"/v1/studio/music/generate":{"post":{"tags":["Studio Music"],"summary":"Generate music from prompt","description":"Generate AI music using Suno based on a text prompt","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateMusicRequest"}}}},"responses":{"202":{"description":"Music generation started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateMusicResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"503":{"description":"Music generation not available","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/studio/music/generations/{generationId}":{"get":{"tags":["Studio Music"],"summary":"Get music generation status","description":"Check the status of a music generation job","parameters":[{"schema":{"type":"string","description":"Generation ID"},"required":true,"description":"Generation ID","name":"generationId","in":"path"}],"responses":{"200":{"description":"Generation status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMusicStatusResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"404":{"description":"Generation not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/studio/music/clips":{"get":{"tags":["Studio Music"],"summary":"List generated music clips","description":"List previously generated music clips","parameters":[{"schema":{"type":"number","minimum":1,"maximum":50,"default":20,"description":"Maximum clips to return"},"required":false,"description":"Maximum clips to return","name":"limit","in":"query"}],"responses":{"200":{"description":"List of music clips","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMusicClipsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/studio/sfx/categories":{"get":{"tags":["SFX"],"summary":"Get popular categories","description":"Get a list of popular SFX categories/tags","responses":{"200":{"description":"Categories list","content":{"application/json":{"schema":{"type":"object","properties":{"categories":{"type":"array","items":{"type":"string"}}},"required":["categories"]}}}}}}},"/v1/studio/sfx/search":{"get":{"tags":["SFX"],"summary":"Search sound effects","description":"Search the Freesound library for sound effects","parameters":[{"schema":{"type":"string","minLength":1,"description":"Search query"},"required":true,"description":"Search query","name":"query","in":"query"},{"schema":{"type":"string","description":"Category filter (e.g., whoosh, impact)"},"required":false,"description":"Category filter (e.g., whoosh, impact)","name":"category","in":"query"},{"schema":{"type":["number","null"],"description":"Minimum duration in seconds"},"required":false,"description":"Minimum duration in seconds","name":"minDuration","in":"query"},{"schema":{"type":["number","null"],"description":"Maximum duration in seconds"},"required":false,"description":"Maximum duration in seconds","name":"maxDuration","in":"query"},{"schema":{"type":"string","enum":["score","duration_desc","duration_asc","downloads_desc","rating_desc"],"default":"score","description":"Sort order"},"required":false,"description":"Sort order","name":"sort","in":"query"},{"schema":{"type":"number","minimum":1,"default":1,"description":"Page number"},"required":false,"description":"Page number","name":"page","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":50,"default":15,"description":"Results per page"},"required":false,"description":"Results per page","name":"pageSize","in":"query"}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","properties":{"sounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"duration":{"type":"number","description":"Duration in seconds"},"license":{"type":"string"},"username":{"type":"string"},"previewUrl":{"type":"string","format":"uri"},"waveformUrl":{"type":"string","format":"uri"},"avgRating":{"type":"number"},"numDownloads":{"type":"number"}},"required":["id","name","description","tags","duration","license","username","previewUrl","avgRating","numDownloads"]}},"total":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"},"categories":{"type":"array","items":{"type":"string"},"description":"Popular categories"}},"required":["sounds","total","page","pageSize","hasMore","categories"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/studio/sfx/{soundId}":{"get":{"tags":["SFX"],"summary":"Get sound effect details","description":"Get detailed information about a specific sound effect","parameters":[{"schema":{"type":["number","null"],"description":"Freesound sound ID"},"required":false,"description":"Freesound sound ID","name":"soundId","in":"path"}],"responses":{"200":{"description":"Sound details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"duration":{"type":"number","description":"Duration in seconds"},"license":{"type":"string"},"username":{"type":"string"},"previewUrl":{"type":"string","format":"uri"},"waveformUrl":{"type":"string","format":"uri"},"avgRating":{"type":"number"},"numDownloads":{"type":"number"},"downloadUrl":{"type":"string","format":"uri"},"spectralUrl":{"type":"string","format":"uri"}},"required":["id","name","description","tags","duration","license","username","previewUrl","avgRating","numDownloads"]}}}},"404":{"description":"Sound not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/studio/sfx/{soundId}/download":{"post":{"tags":["SFX"],"summary":"Download sound effect","description":"Download a sound effect from Freesound and store it in our R2 bucket","parameters":[{"schema":{"type":["number","null"],"description":"Freesound sound ID"},"required":false,"description":"Freesound sound ID","name":"soundId","in":"path"}],"responses":{"200":{"description":"Sound downloaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"sound":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"duration":{"type":"number","description":"Duration in seconds"},"license":{"type":"string"},"username":{"type":"string"},"previewUrl":{"type":"string","format":"uri"},"waveformUrl":{"type":"string","format":"uri"},"avgRating":{"type":"number"},"numDownloads":{"type":"number"}},"required":["id","name","description","tags","duration","license","username","previewUrl","avgRating","numDownloads"]},"assetUrl":{"type":"string","format":"uri","description":"Uploaded asset URL in R2"},"assetId":{"type":"string","description":"Asset ID in our system"}},"required":["sound","assetUrl","assetId"]}}}},"404":{"description":"Sound not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/studio/sfx/{soundId}/similar":{"get":{"tags":["SFX"],"summary":"Get similar sounds","description":"Get sounds similar to the specified sound","parameters":[{"schema":{"type":["number","null"],"description":"Freesound sound ID"},"required":false,"description":"Freesound sound ID","name":"soundId","in":"path"},{"schema":{"type":"number","minimum":1,"maximum":20,"default":10},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Similar sounds","content":{"application/json":{"schema":{"type":"object","properties":{"sounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"duration":{"type":"number","description":"Duration in seconds"},"license":{"type":"string"},"username":{"type":"string"},"previewUrl":{"type":"string","format":"uri"},"waveformUrl":{"type":"string","format":"uri"},"avgRating":{"type":"number"},"numDownloads":{"type":"number"}},"required":["id","name","description","tags","duration","license","username","previewUrl","avgRating","numDownloads"]}}},"required":["sounds"]}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/v1/studio/mixing/{projectId}":{"get":{"tags":["Audio Mixing"],"summary":"Get mix settings for a project","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Mix settings retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"preset":{"type":["string","null"],"enum":["podcast","corporate","social","film","music_video","documentary",null]},"trackEffects":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"number","minimum":-60,"maximum":12,"description":"Volume (dB)"},"pan":{"type":"number","minimum":-1,"maximum":1,"description":"Pan position (-1=L, 1=R)"},"mute":{"type":"boolean"},"solo":{"type":"boolean"},"eq":{"type":"object","properties":{"highPass":{"type":"number","minimum":20,"maximum":500,"description":"High-pass filter frequency (Hz)"},"lowPass":{"type":"number","minimum":1000,"maximum":20000,"description":"Low-pass filter frequency (Hz)"},"presence":{"type":"number","minimum":-12,"maximum":12,"description":"Presence boost/cut (dB)"},"lowShelf":{"type":"number","minimum":-12,"maximum":12,"description":"Low shelf boost/cut (dB)"},"highShelf":{"type":"number","minimum":-12,"maximum":12,"description":"High shelf boost/cut (dB)"}}},"compression":{"type":"object","properties":{"threshold":{"type":"number","minimum":-60,"maximum":0,"description":"Threshold (dB)"},"ratio":{"type":"number","minimum":1,"maximum":20,"description":"Compression ratio"},"attack":{"type":"number","minimum":0.1,"maximum":100,"description":"Attack time (ms)"},"release":{"type":"number","minimum":10,"maximum":1000,"description":"Release time (ms)"},"makeupGain":{"type":"number","minimum":0,"maximum":24,"description":"Makeup gain (dB)"}}},"reverb":{"type":"object","properties":{"wet":{"type":"number","minimum":0,"maximum":100,"description":"Wet mix (%)"},"decay":{"type":"number","minimum":0.1,"maximum":10,"description":"Decay time (seconds)"},"preDelay":{"type":"number","minimum":0,"maximum":100,"description":"Pre-delay (ms)"}}}}}},"ducking":{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"threshold":{"type":"number","minimum":-60,"maximum":0,"description":"Trigger threshold (dB)"},"ratio":{"type":"number","minimum":0,"maximum":1,"description":"Duck ratio (0-1, lower = more duck)"},"attack":{"type":"number","minimum":1,"maximum":500,"description":"Attack time (ms)"},"release":{"type":"number","minimum":10,"maximum":2000,"description":"Release time (ms)"},"triggerTracks":{"type":"array","items":{"type":"string"},"description":"Track IDs that trigger ducking"},"targetTracks":{"type":"array","items":{"type":"string"},"description":"Track IDs that get ducked"}}},"masterVolume":{"type":"number"}},"required":["preset","trackEffects","ducking","masterVolume"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"}}}},"/v1/studio/mixing/{projectId}/preset":{"post":{"tags":["Audio Mixing"],"summary":"Apply a mix preset to a project","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"preset":{"type":"string","enum":["podcast","corporate","social","film","music_video","documentary"]}},"required":["preset"]}}}},"responses":{"200":{"description":"Preset applied","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"preset":{"type":"string","enum":["podcast","corporate","social","film","music_video","documentary"]},"trackSettings":{"type":"object","additionalProperties":{"type":"object","properties":{"volume":{"type":"number","minimum":-60,"maximum":12,"description":"Volume (dB)"},"pan":{"type":"number","minimum":-1,"maximum":1,"description":"Pan position (-1=L, 1=R)"},"mute":{"type":"boolean"},"solo":{"type":"boolean"},"eq":{"type":"object","properties":{"highPass":{"type":"number","minimum":20,"maximum":500,"description":"High-pass filter frequency (Hz)"},"lowPass":{"type":"number","minimum":1000,"maximum":20000,"description":"Low-pass filter frequency (Hz)"},"presence":{"type":"number","minimum":-12,"maximum":12,"description":"Presence boost/cut (dB)"},"lowShelf":{"type":"number","minimum":-12,"maximum":12,"description":"Low shelf boost/cut (dB)"},"highShelf":{"type":"number","minimum":-12,"maximum":12,"description":"High shelf boost/cut (dB)"}}},"compression":{"type":"object","properties":{"threshold":{"type":"number","minimum":-60,"maximum":0,"description":"Threshold (dB)"},"ratio":{"type":"number","minimum":1,"maximum":20,"description":"Compression ratio"},"attack":{"type":"number","minimum":0.1,"maximum":100,"description":"Attack time (ms)"},"release":{"type":"number","minimum":10,"maximum":1000,"description":"Release time (ms)"},"makeupGain":{"type":"number","minimum":0,"maximum":24,"description":"Makeup gain (dB)"}}},"reverb":{"type":"object","properties":{"wet":{"type":"number","minimum":0,"maximum":100,"description":"Wet mix (%)"},"decay":{"type":"number","minimum":0.1,"maximum":10,"description":"Decay time (seconds)"},"preDelay":{"type":"number","minimum":0,"maximum":100,"description":"Pre-delay (ms)"}}}}}},"ducking":{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"threshold":{"type":"number","minimum":-60,"maximum":0,"description":"Trigger threshold (dB)"},"ratio":{"type":"number","minimum":0,"maximum":1,"description":"Duck ratio (0-1, lower = more duck)"},"attack":{"type":"number","minimum":1,"maximum":500,"description":"Attack time (ms)"},"release":{"type":"number","minimum":10,"maximum":2000,"description":"Release time (ms)"},"triggerTracks":{"type":"array","items":{"type":"string"},"description":"Track IDs that trigger ducking"},"targetTracks":{"type":"array","items":{"type":"string"},"description":"Track IDs that get ducked"}}}},"required":["message","preset","trackSettings","ducking"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"}}}},"/v1/studio/mixing/tracks/{trackId}":{"patch":{"tags":["Audio Mixing"],"summary":"Update effects for a specific track","parameters":[{"schema":{"type":"string"},"required":true,"name":"trackId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"volume":{"type":"number","minimum":-60,"maximum":12,"description":"Volume (dB)"},"pan":{"type":"number","minimum":-1,"maximum":1,"description":"Pan position (-1=L, 1=R)"},"mute":{"type":"boolean"},"solo":{"type":"boolean"},"eq":{"type":"object","properties":{"highPass":{"type":"number","minimum":20,"maximum":500,"description":"High-pass filter frequency (Hz)"},"lowPass":{"type":"number","minimum":1000,"maximum":20000,"description":"Low-pass filter frequency (Hz)"},"presence":{"type":"number","minimum":-12,"maximum":12,"description":"Presence boost/cut (dB)"},"lowShelf":{"type":"number","minimum":-12,"maximum":12,"description":"Low shelf boost/cut (dB)"},"highShelf":{"type":"number","minimum":-12,"maximum":12,"description":"High shelf boost/cut (dB)"}}},"compression":{"type":"object","properties":{"threshold":{"type":"number","minimum":-60,"maximum":0,"description":"Threshold (dB)"},"ratio":{"type":"number","minimum":1,"maximum":20,"description":"Compression ratio"},"attack":{"type":"number","minimum":0.1,"maximum":100,"description":"Attack time (ms)"},"release":{"type":"number","minimum":10,"maximum":1000,"description":"Release time (ms)"},"makeupGain":{"type":"number","minimum":0,"maximum":24,"description":"Makeup gain (dB)"}}},"reverb":{"type":"object","properties":{"wet":{"type":"number","minimum":0,"maximum":100,"description":"Wet mix (%)"},"decay":{"type":"number","minimum":0.1,"maximum":10,"description":"Decay time (seconds)"},"preDelay":{"type":"number","minimum":0,"maximum":100,"description":"Pre-delay (ms)"}}}}}}}},"responses":{"200":{"description":"Track effects updated","content":{"application/json":{"schema":{"type":"object","properties":{"trackId":{"type":"string"},"effects":{"type":"object","properties":{"volume":{"type":"number","minimum":-60,"maximum":12,"description":"Volume (dB)"},"pan":{"type":"number","minimum":-1,"maximum":1,"description":"Pan position (-1=L, 1=R)"},"mute":{"type":"boolean"},"solo":{"type":"boolean"},"eq":{"type":"object","properties":{"highPass":{"type":"number","minimum":20,"maximum":500,"description":"High-pass filter frequency (Hz)"},"lowPass":{"type":"number","minimum":1000,"maximum":20000,"description":"Low-pass filter frequency (Hz)"},"presence":{"type":"number","minimum":-12,"maximum":12,"description":"Presence boost/cut (dB)"},"lowShelf":{"type":"number","minimum":-12,"maximum":12,"description":"Low shelf boost/cut (dB)"},"highShelf":{"type":"number","minimum":-12,"maximum":12,"description":"High shelf boost/cut (dB)"}}},"compression":{"type":"object","properties":{"threshold":{"type":"number","minimum":-60,"maximum":0,"description":"Threshold (dB)"},"ratio":{"type":"number","minimum":1,"maximum":20,"description":"Compression ratio"},"attack":{"type":"number","minimum":0.1,"maximum":100,"description":"Attack time (ms)"},"release":{"type":"number","minimum":10,"maximum":1000,"description":"Release time (ms)"},"makeupGain":{"type":"number","minimum":0,"maximum":24,"description":"Makeup gain (dB)"}}},"reverb":{"type":"object","properties":{"wet":{"type":"number","minimum":0,"maximum":100,"description":"Wet mix (%)"},"decay":{"type":"number","minimum":0.1,"maximum":10,"description":"Decay time (seconds)"},"preDelay":{"type":"number","minimum":0,"maximum":100,"description":"Pre-delay (ms)"}}}}}},"required":["trackId","effects"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Track not found"}}}},"/v1/studio/mixing/{projectId}/ducking":{"patch":{"tags":["Audio Mixing"],"summary":"Update auto-ducking settings","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"threshold":{"type":"number","minimum":-60,"maximum":0,"description":"Trigger threshold (dB)"},"ratio":{"type":"number","minimum":0,"maximum":1,"description":"Duck ratio (0-1, lower = more duck)"},"attack":{"type":"number","minimum":1,"maximum":500,"description":"Attack time (ms)"},"release":{"type":"number","minimum":10,"maximum":2000,"description":"Release time (ms)"},"triggerTracks":{"type":"array","items":{"type":"string"},"description":"Track IDs that trigger ducking"},"targetTracks":{"type":"array","items":{"type":"string"},"description":"Track IDs that get ducked"}}}}}},"responses":{"200":{"description":"Ducking settings updated","content":{"application/json":{"schema":{"type":"object","properties":{"ducking":{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"threshold":{"type":"number","minimum":-60,"maximum":0,"description":"Trigger threshold (dB)"},"ratio":{"type":"number","minimum":0,"maximum":1,"description":"Duck ratio (0-1, lower = more duck)"},"attack":{"type":"number","minimum":1,"maximum":500,"description":"Attack time (ms)"},"release":{"type":"number","minimum":10,"maximum":2000,"description":"Release time (ms)"},"triggerTracks":{"type":"array","items":{"type":"string"},"description":"Track IDs that trigger ducking"},"targetTracks":{"type":"array","items":{"type":"string"},"description":"Track IDs that get ducked"}}}},"required":["ducking"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"}}}},"/v1/studio/mixing/{projectId}/loudness":{"get":{"tags":["Audio Mixing"],"summary":"Analyze project loudness (LUFS)","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"Loudness analysis result","content":{"application/json":{"schema":{"type":"object","properties":{"integrated":{"type":"number","description":"Integrated LUFS"},"momentary":{"type":"number","description":"Momentary LUFS"},"shortTerm":{"type":"number","description":"Short-term LUFS"},"truePeak":{"type":"number","description":"True peak (dB)"},"range":{"type":"number","description":"Loudness range (LU)"}},"required":["integrated","momentary","shortTerm","truePeak","range"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"}}}},"/v1/studio/mixing/{projectId}/normalize":{"post":{"tags":["Audio Mixing"],"summary":"Normalize project to target LUFS","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetLufs":{"type":"number","minimum":-60,"maximum":0,"description":"Target integrated LUFS"},"truePeakLimit":{"type":"number","minimum":-10,"maximum":0,"default":-1,"description":"True peak limit (dB)"}},"required":["targetLufs"]}}}},"responses":{"200":{"description":"Normalization applied","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"originalLufs":{"type":"number"},"targetLufs":{"type":"number"},"gainApplied":{"type":"number","description":"Gain adjustment applied (dB)"},"finalLufs":{"type":"number"}},"required":["message","originalLufs","targetLufs","gainApplied","finalLufs"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"}}}},"/v1/studio/audio/dubbing/start":{"post":{"tags":["Audio Dubbing"],"summary":"Start a dubbing job","description":"Start dubbing a video into a target language using ElevenLabs","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","description":"Project ID"},"videoAssetId":{"type":"string","description":"Video asset ID in R2"},"videoUrl":{"type":"string","description":"External video URL"},"sourceLanguage":{"type":"string","default":"en","description":"Source language code"},"targetLanguage":{"type":"string","description":"Target language code"},"numSpeakers":{"type":"number","description":"Number of speakers"}},"required":["projectId","targetLanguage"]}}}},"responses":{"201":{"description":"Dubbing job started","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"videoAssetId":{"type":["string","null"]},"elevenlabsDubbingId":{"type":"string"},"sourceLanguage":{"type":"string"},"targetLanguage":{"type":"string"},"status":{"type":"string","enum":["pending","processing","completed","failed"]},"audioUrl":{"type":["string","null"]},"videoUrl":{"type":["string","null"]},"transcript":{},"durationSeconds":{"type":["number","null"]},"costUsd":{"type":["number","null"]},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","projectId","videoAssetId","elevenlabsDubbingId","sourceLanguage","targetLanguage","status","audioUrl","videoUrl","durationSeconds","costUsd","errorMessage","createdAt","completedAt"]},"estimatedDurationSec":{"type":"number"},"estimatedCostUsd":{"type":"number"}},"required":["success","job","estimatedDurationSec","estimatedCostUsd"]}}}}}}},"/v1/studio/audio/dubbing/{jobId}":{"get":{"tags":["Audio Dubbing"],"summary":"Get dubbing job status","description":"Check the status of a dubbing job","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Dubbing job details","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"videoAssetId":{"type":["string","null"]},"elevenlabsDubbingId":{"type":"string"},"sourceLanguage":{"type":"string"},"targetLanguage":{"type":"string"},"status":{"type":"string","enum":["pending","processing","completed","failed"]},"audioUrl":{"type":["string","null"]},"videoUrl":{"type":["string","null"]},"transcript":{},"durationSeconds":{"type":["number","null"]},"costUsd":{"type":["number","null"]},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","projectId","videoAssetId","elevenlabsDubbingId","sourceLanguage","targetLanguage","status","audioUrl","videoUrl","durationSeconds","costUsd","errorMessage","createdAt","completedAt"]}},"required":["success","job"]}}}}}},"delete":{"tags":["Audio Dubbing"],"summary":"Delete a dubbing job","description":"Delete a dubbing job and its associated files","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Dubbing job deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}}}}},"/v1/studio/audio/dubbing/project/{projectId}":{"get":{"tags":["Audio Dubbing"],"summary":"List dubbing jobs for a project","description":"Get all dubbing jobs for a specific project","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"List of dubbing jobs","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"videoAssetId":{"type":["string","null"]},"elevenlabsDubbingId":{"type":"string"},"sourceLanguage":{"type":"string"},"targetLanguage":{"type":"string"},"status":{"type":"string","enum":["pending","processing","completed","failed"]},"audioUrl":{"type":["string","null"]},"videoUrl":{"type":["string","null"]},"transcript":{},"durationSeconds":{"type":["number","null"]},"costUsd":{"type":["number","null"]},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]}},"required":["id","projectId","videoAssetId","elevenlabsDubbingId","sourceLanguage","targetLanguage","status","audioUrl","videoUrl","durationSeconds","costUsd","errorMessage","createdAt","completedAt"]}}},"required":["success","jobs"]}}}}}}},"/v1/studio/audio/dubbing/{jobId}/download":{"get":{"tags":["Audio Dubbing"],"summary":"Download dubbed audio","description":"Download the dubbed audio file for a completed job","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Dubbed audio URL","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"audioUrl":{"type":"string"},"videoUrl":{"type":["string","null"]}},"required":["success","audioUrl","videoUrl"]}}}}}}},"/v1/studio/audio/dubbing/{jobId}/transcript":{"get":{"tags":["Audio Dubbing"],"summary":"Get dubbing transcript","description":"Get the transcript with timing for the dubbed content","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Dubbing transcript","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"transcript":{"type":"object","properties":{"languageCode":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"speaker":{"type":"string"}},"required":["start","end","text","speaker"]}}},"required":["languageCode","segments"]}},"required":["success","transcript"]}}}}}}},"/v1/studio/audio/dubbing/languages":{"get":{"tags":["Audio Dubbing"],"summary":"Get supported dubbing languages","description":"Get the list of languages supported for dubbing","responses":{"200":{"description":"Supported languages","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"languages":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"]}}},"required":["success","languages"]}}}}}}},"/v1/studio/audio/brand-kits":{"get":{"tags":["Brand Audio Kits"],"summary":"List brand audio kits","description":"Get all brand audio kits for the organization","responses":{"200":{"description":"List of brand audio kits","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"kits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"isDefault":{"type":"boolean"},"coverImageUrl":{"type":["string","null"]},"colorScheme":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kitId":{"type":"string"},"type":{"type":"string","enum":["intro","outro","sting","bumper","background_music","sound_effect"]},"name":{"type":"string"},"description":{"type":["string","null"]},"audioUrl":{"type":"string"},"durationSeconds":{"type":["number","null"]},"bpm":{"type":["number","null"]},"key":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","kitId","type","name","description","audioUrl","durationSeconds","bpm","key","metadata","createdAt"]}}},"required":["id","organizationId","name","description","isDefault","coverImageUrl","colorScheme","createdAt","updatedAt"]}}},"required":["success","kits"]}}}}}},"post":{"tags":["Brand Audio Kits"],"summary":"Create a brand audio kit","description":"Create a new brand audio kit","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"isDefault":{"type":"boolean"},"coverImageUrl":{"type":"string","format":"uri"},"colorScheme":{"type":"object","additionalProperties":{}}},"required":["name"]}}}},"responses":{"201":{"description":"Brand kit created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"kit":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"isDefault":{"type":"boolean"},"coverImageUrl":{"type":["string","null"]},"colorScheme":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kitId":{"type":"string"},"type":{"type":"string","enum":["intro","outro","sting","bumper","background_music","sound_effect"]},"name":{"type":"string"},"description":{"type":["string","null"]},"audioUrl":{"type":"string"},"durationSeconds":{"type":["number","null"]},"bpm":{"type":["number","null"]},"key":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","kitId","type","name","description","audioUrl","durationSeconds","bpm","key","metadata","createdAt"]}}},"required":["id","organizationId","name","description","isDefault","coverImageUrl","colorScheme","createdAt","updatedAt"]}},"required":["success","kit"]}}}}}}},"/v1/studio/audio/brand-kits/{kitId}":{"get":{"tags":["Brand Audio Kits"],"summary":"Get a brand audio kit","description":"Get a brand audio kit with all its items","parameters":[{"schema":{"type":"string"},"required":true,"name":"kitId","in":"path"}],"responses":{"200":{"description":"Brand audio kit details","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"kit":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"isDefault":{"type":"boolean"},"coverImageUrl":{"type":["string","null"]},"colorScheme":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kitId":{"type":"string"},"type":{"type":"string","enum":["intro","outro","sting","bumper","background_music","sound_effect"]},"name":{"type":"string"},"description":{"type":["string","null"]},"audioUrl":{"type":"string"},"durationSeconds":{"type":["number","null"]},"bpm":{"type":["number","null"]},"key":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","kitId","type","name","description","audioUrl","durationSeconds","bpm","key","metadata","createdAt"]}}},"required":["id","organizationId","name","description","isDefault","coverImageUrl","colorScheme","createdAt","updatedAt"]}},"required":["success","kit"]}}}}}},"patch":{"tags":["Brand Audio Kits"],"summary":"Update a brand audio kit","description":"Update a brand audio kit","parameters":[{"schema":{"type":"string"},"required":true,"name":"kitId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"isDefault":{"type":"boolean"},"coverImageUrl":{"type":["string","null"],"format":"uri"},"colorScheme":{"type":"object","additionalProperties":{}}}}}}},"responses":{"200":{"description":"Brand kit updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"kit":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"isDefault":{"type":"boolean"},"coverImageUrl":{"type":["string","null"]},"colorScheme":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kitId":{"type":"string"},"type":{"type":"string","enum":["intro","outro","sting","bumper","background_music","sound_effect"]},"name":{"type":"string"},"description":{"type":["string","null"]},"audioUrl":{"type":"string"},"durationSeconds":{"type":["number","null"]},"bpm":{"type":["number","null"]},"key":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","kitId","type","name","description","audioUrl","durationSeconds","bpm","key","metadata","createdAt"]}}},"required":["id","organizationId","name","description","isDefault","coverImageUrl","colorScheme","createdAt","updatedAt"]}},"required":["success","kit"]}}}}}},"delete":{"tags":["Brand Audio Kits"],"summary":"Delete a brand audio kit","description":"Delete a brand audio kit and all its items","parameters":[{"schema":{"type":"string"},"required":true,"name":"kitId","in":"path"}],"responses":{"200":{"description":"Brand kit deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}}}}},"/v1/studio/audio/brand-kits/{kitId}/items":{"post":{"tags":["Brand Audio Kits"],"summary":"Add item to brand kit","description":"Add an audio item to a brand audio kit","parameters":[{"schema":{"type":"string"},"required":true,"name":"kitId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["intro","outro","sting","bumper","background_music","sound_effect"]},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"audioUrl":{"type":"string","format":"uri"},"durationSeconds":{"type":"number"},"bpm":{"type":"number"},"key":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}}},"required":["type","name","audioUrl"]}}}},"responses":{"201":{"description":"Item added to kit","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string"},"kitId":{"type":"string"},"type":{"type":"string","enum":["intro","outro","sting","bumper","background_music","sound_effect"]},"name":{"type":"string"},"description":{"type":["string","null"]},"audioUrl":{"type":"string"},"durationSeconds":{"type":["number","null"]},"bpm":{"type":["number","null"]},"key":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","kitId","type","name","description","audioUrl","durationSeconds","bpm","key","metadata","createdAt"]}},"required":["success","item"]}}}}}}},"/v1/studio/audio/brand-kits/{kitId}/items/{itemId}":{"patch":{"tags":["Brand Audio Kits"],"summary":"Update kit item","description":"Update an audio item in a brand kit","parameters":[{"schema":{"type":"string"},"required":true,"name":"kitId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"itemId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":1000},"audioUrl":{"type":"string","format":"uri"},"durationSeconds":{"type":"number"},"bpm":{"type":"number"},"key":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{}}}}}}},"responses":{"200":{"description":"Item updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"item":{"type":"object","properties":{"id":{"type":"string"},"kitId":{"type":"string"},"type":{"type":"string","enum":["intro","outro","sting","bumper","background_music","sound_effect"]},"name":{"type":"string"},"description":{"type":["string","null"]},"audioUrl":{"type":"string"},"durationSeconds":{"type":["number","null"]},"bpm":{"type":["number","null"]},"key":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","kitId","type","name","description","audioUrl","durationSeconds","bpm","key","metadata","createdAt"]}},"required":["success","item"]}}}}}},"delete":{"tags":["Brand Audio Kits"],"summary":"Remove item from kit","description":"Remove an audio item from a brand kit","parameters":[{"schema":{"type":"string"},"required":true,"name":"kitId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"itemId","in":"path"}],"responses":{"200":{"description":"Item removed from kit","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}}}}},"/v1/studio/audio/brand-kits/{kitId}/apply":{"post":{"tags":["Brand Audio Kits"],"summary":"Apply brand kit to project","description":"Apply brand audio kit elements to a project timeline","parameters":[{"schema":{"type":"string"},"required":true,"name":"kitId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"includeIntro":{"type":"boolean"},"includeOutro":{"type":"boolean"},"includeBackground":{"type":"boolean"},"backgroundVolume":{"type":"number","minimum":0,"maximum":1}},"required":["projectId"]}}}},"responses":{"200":{"description":"Brand kit applied to project","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"tracksCreated":{"type":"number"},"clipsCreated":{"type":"number"}},"required":["success","tracksCreated","clipsCreated"]}}}}}}},"/v1/studio/audio/licensing/project/{projectId}":{"get":{"tags":["Audio Licensing"],"summary":"Get project licenses","description":"Get all audio licenses used in a project","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"List of licenses","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"licenses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"trackId":{"type":["string","null"]},"clipId":{"type":["string","null"]},"sourceType":{"type":"string","enum":["voice","music","sfx","stock","upload","ai_generated"]},"sourceName":{"type":"string"},"sourceUrl":{"type":["string","null"]},"sourceId":{"type":["string","null"]},"licenseType":{"type":"string","enum":["royalty_free","creative_commons","custom","ai_generated","purchased"]},"licenseName":{"type":["string","null"]},"licenseUrl":{"type":["string","null"]},"attribution":{"type":["string","null"]},"expirationDate":{"type":["string","null"]},"costUsd":{"type":["number","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","projectId","trackId","clipId","sourceType","sourceName","sourceUrl","sourceId","licenseType","licenseName","licenseUrl","attribution","expirationDate","costUsd","metadata","createdAt"]}},"totalCost":{"type":"number"}},"required":["success","licenses","totalCost"]}}}}}}},"/v1/studio/audio/licensing":{"post":{"tags":["Audio Licensing"],"summary":"Add license record","description":"Record a license for an audio asset used in a project","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"trackId":{"type":"string"},"clipId":{"type":"string"},"sourceType":{"type":"string","enum":["voice","music","sfx","stock","upload","ai_generated"]},"sourceName":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"},"sourceId":{"type":"string"},"licenseType":{"type":"string","enum":["royalty_free","creative_commons","custom","ai_generated","purchased"]},"licenseName":{"type":"string"},"licenseUrl":{"type":"string","format":"uri"},"attribution":{"type":"string"},"expirationDate":{"type":"string","format":"date-time"},"costUsd":{"type":"number"},"metadata":{"type":"object","additionalProperties":{}}},"required":["projectId","sourceType","sourceName","licenseType"]}}}},"responses":{"201":{"description":"License recorded","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"license":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"trackId":{"type":["string","null"]},"clipId":{"type":["string","null"]},"sourceType":{"type":"string","enum":["voice","music","sfx","stock","upload","ai_generated"]},"sourceName":{"type":"string"},"sourceUrl":{"type":["string","null"]},"sourceId":{"type":["string","null"]},"licenseType":{"type":"string","enum":["royalty_free","creative_commons","custom","ai_generated","purchased"]},"licenseName":{"type":["string","null"]},"licenseUrl":{"type":["string","null"]},"attribution":{"type":["string","null"]},"expirationDate":{"type":["string","null"]},"costUsd":{"type":["number","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","projectId","trackId","clipId","sourceType","sourceName","sourceUrl","sourceId","licenseType","licenseName","licenseUrl","attribution","expirationDate","costUsd","metadata","createdAt"]}},"required":["success","license"]}}}}}}},"/v1/studio/audio/licensing/{licenseId}":{"patch":{"tags":["Audio Licensing"],"summary":"Update license record","description":"Update an existing license record","parameters":[{"schema":{"type":"string"},"required":true,"name":"licenseId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"licenseType":{"type":"string","enum":["royalty_free","creative_commons","custom","ai_generated","purchased"]},"licenseName":{"type":"string"},"licenseUrl":{"type":["string","null"],"format":"uri"},"attribution":{"type":["string","null"]},"expirationDate":{"type":["string","null"],"format":"date-time"},"costUsd":{"type":"number"},"metadata":{"type":"object","additionalProperties":{}}}}}}},"responses":{"200":{"description":"License updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"license":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"trackId":{"type":["string","null"]},"clipId":{"type":["string","null"]},"sourceType":{"type":"string","enum":["voice","music","sfx","stock","upload","ai_generated"]},"sourceName":{"type":"string"},"sourceUrl":{"type":["string","null"]},"sourceId":{"type":["string","null"]},"licenseType":{"type":"string","enum":["royalty_free","creative_commons","custom","ai_generated","purchased"]},"licenseName":{"type":["string","null"]},"licenseUrl":{"type":["string","null"]},"attribution":{"type":["string","null"]},"expirationDate":{"type":["string","null"]},"costUsd":{"type":["number","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","projectId","trackId","clipId","sourceType","sourceName","sourceUrl","sourceId","licenseType","licenseName","licenseUrl","attribution","expirationDate","costUsd","metadata","createdAt"]}},"required":["success","license"]}}}}}},"delete":{"tags":["Audio Licensing"],"summary":"Delete license record","description":"Remove a license record","parameters":[{"schema":{"type":"string"},"required":true,"name":"licenseId","in":"path"}],"responses":{"200":{"description":"License deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"]}}}}}}},"/v1/studio/audio/approvals/request":{"post":{"tags":["Audio Approvals"],"summary":"Request approval","description":"Request approval for an audio element or project","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"entityType":{"type":"string","enum":["project","track","clip","mix"]},"entityId":{"type":"string"},"trackId":{"type":"string"},"clipId":{"type":"string"},"notes":{"type":"string"},"reviewers":{"type":"array","items":{"type":"string"},"description":"User IDs to request review from"}},"required":["projectId","entityType","entityId"]}}}},"responses":{"201":{"description":"Approval requested","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"approval":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"trackId":{"type":["string","null"]},"clipId":{"type":["string","null"]},"entityType":{"type":"string","enum":["project","track","clip","mix"]},"entityId":{"type":"string"},"status":{"type":"string","enum":["pending","approved","rejected","revision_requested"]},"requestedBy":{"type":"string"},"reviewedBy":{"type":["string","null"]},"notes":{"type":["string","null"]},"reviewNotes":{"type":["string","null"]},"version":{"type":"number"},"createdAt":{"type":"string"},"reviewedAt":{"type":["string","null"]}},"required":["id","projectId","trackId","clipId","entityType","entityId","status","requestedBy","reviewedBy","notes","reviewNotes","version","createdAt","reviewedAt"]}},"required":["success","approval"]}}}}}}},"/v1/studio/audio/approvals/{approvalId}":{"get":{"tags":["Audio Approvals"],"summary":"Get approval details","description":"Get details of an approval request","parameters":[{"schema":{"type":"string"},"required":true,"name":"approvalId","in":"path"}],"responses":{"200":{"description":"Approval details","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"approval":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"trackId":{"type":["string","null"]},"clipId":{"type":["string","null"]},"entityType":{"type":"string","enum":["project","track","clip","mix"]},"entityId":{"type":"string"},"status":{"type":"string","enum":["pending","approved","rejected","revision_requested"]},"requestedBy":{"type":"string"},"reviewedBy":{"type":["string","null"]},"notes":{"type":["string","null"]},"reviewNotes":{"type":["string","null"]},"version":{"type":"number"},"createdAt":{"type":"string"},"reviewedAt":{"type":["string","null"]}},"required":["id","projectId","trackId","clipId","entityType","entityId","status","requestedBy","reviewedBy","notes","reviewNotes","version","createdAt","reviewedAt"]}},"required":["success","approval"]}}}}}}},"/v1/studio/audio/approvals/{approvalId}/review":{"post":{"tags":["Audio Approvals"],"summary":"Review approval","description":"Approve, reject, or request revision for an approval request","parameters":[{"schema":{"type":"string"},"required":true,"name":"approvalId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected","revision_requested"]},"reviewNotes":{"type":"string"}},"required":["decision"]}}}},"responses":{"200":{"description":"Approval reviewed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"approval":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"trackId":{"type":["string","null"]},"clipId":{"type":["string","null"]},"entityType":{"type":"string","enum":["project","track","clip","mix"]},"entityId":{"type":"string"},"status":{"type":"string","enum":["pending","approved","rejected","revision_requested"]},"requestedBy":{"type":"string"},"reviewedBy":{"type":["string","null"]},"notes":{"type":["string","null"]},"reviewNotes":{"type":["string","null"]},"version":{"type":"number"},"createdAt":{"type":"string"},"reviewedAt":{"type":["string","null"]}},"required":["id","projectId","trackId","clipId","entityType","entityId","status","requestedBy","reviewedBy","notes","reviewNotes","version","createdAt","reviewedAt"]}},"required":["success","approval"]}}}}}}},"/v1/studio/audio/smart/sfx-suggestions":{"post":{"tags":["audio-smart"],"summary":"Suggest SFX for video","description":"Analyze video/script and suggest appropriate sound effects","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","description":"Audio project ID"},"videoUrl":{"type":"string","format":"uri","description":"URL of video to analyze"},"script":{"type":"string","description":"Script text to analyze for SFX cues"},"duration":{"type":"integer","exclusiveMinimum":0,"description":"Video duration in milliseconds"},"sceneRange":{"type":"object","properties":{"start":{"type":"integer","minimum":0},"end":{"type":"integer","exclusiveMinimum":0}},"required":["start","end"],"description":"Optional time range to analyze"}},"required":["projectId","duration"]}}}},"responses":{"200":{"description":"SFX suggestions generated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"suggestions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"category":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"confidence":{"type":"number"},"reason":{"type":"string"},"sfxOptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"previewUrl":{"type":"string"},"duration":{"type":"number"},"matchScore":{"type":"number"}},"required":["id","name","previewUrl","duration","matchScore"]}}},"required":["id","timestamp","category","name","description","confidence","reason","sfxOptions"]}},"analysisTime":{"type":"number"}},"required":["success","suggestions","analysisTime"]}}}}}}},"/v1/studio/audio/smart/sfx-suggestions/{suggestionId}/apply":{"post":{"tags":["audio-smart"],"summary":"Apply SFX suggestion","description":"Add the suggested SFX to the project timeline","parameters":[{"schema":{"type":"string"},"required":true,"name":"suggestionId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"sfxOptionId":{"type":"string","description":"Which SFX option to use from the suggestion"},"trackId":{"type":"string","description":"Track to add the clip to"},"adjustedTimestamp":{"type":"integer","description":"Override suggested timestamp"}},"required":["projectId","sfxOptionId"]}}}},"responses":{"201":{"description":"SFX added to timeline","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"clipId":{"type":"string"},"trackId":{"type":"string"}},"required":["success","clipId","trackId"]}}}}}}},"/v1/studio/audio/smart/beats/detect":{"post":{"tags":["audio-smart"],"summary":"Detect beats in audio","description":"Analyze audio and detect beats, tempo, and time signature","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"audioUrl":{"type":"string","description":"URL of audio to analyze"},"startMs":{"type":"integer","minimum":0,"description":"Start position"},"endMs":{"type":"integer","exclusiveMinimum":0,"description":"End position"},"sensitivity":{"type":"number","minimum":0,"maximum":1,"description":"Beat detection sensitivity"}},"required":["audioUrl"]}}}},"responses":{"200":{"description":"Beat analysis result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"beats":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number"},"strength":{"type":"number"},"type":{"type":"string","enum":["downbeat","upbeat","accent"]}},"required":["id","timestamp","strength","type"]}},"bpm":{"type":"object","properties":{"bpm":{"type":"number"},"confidence":{"type":"number"},"range":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}},"required":["min","max"]}},"required":["bpm","confidence","range"]},"timeSignature":{"type":"string"},"grid":{"type":"object","properties":{"barLength":{"type":"number"},"beatLength":{"type":"number"},"subdivision":{"type":"number"}},"required":["barLength","beatLength","subdivision"]},"analysisTime":{"type":"number"}},"required":["success","beats","bpm","timeSignature","grid","analysisTime"]}}}}}}},"/v1/studio/audio/smart/beats/snap":{"post":{"tags":["audio-smart"],"summary":"Snap timestamp to beat grid","description":"Quantize a timestamp to the nearest beat grid position","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer","minimum":0,"description":"Timestamp to snap"},"bpm":{"type":"number","exclusiveMinimum":0,"description":"Beats per minute"},"quantize":{"type":"string","enum":["1/1","1/2","1/4","1/8","1/16"]},"strength":{"type":"number","minimum":0,"maximum":1,"description":"Snap strength (0-1)"}},"required":["timestamp","bpm"]}}}},"responses":{"200":{"description":"Snapped position","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"snappedTo":{"type":"number"},"originalOffset":{"type":"number"},"quantize":{"type":"string"}},"required":["success","snappedTo","originalOffset","quantize"]}}}}}}},"/v1/studio/audio/smart/beats/tap-tempo":{"post":{"tags":["audio-smart"],"summary":"Estimate tempo from taps","description":"Calculate BPM from user tap timestamps","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tapTimestamps":{"type":"array","items":{"type":"number"},"minItems":4,"description":"Array of tap timestamps in ms"}},"required":["tapTimestamps"]}}}},"responses":{"200":{"description":"Tempo estimate","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"bpm":{"type":["number","null"]},"confidence":{"type":["number","null"]},"range":{"type":["object","null"],"properties":{"min":{"type":"number"},"max":{"type":"number"}},"required":["min","max"]}},"required":["success","bpm","confidence","range"]}}}}}}},"/v1/studio/audio/smart/music/loop-points":{"post":{"tags":["audio-smart"],"summary":"Find loop points in music","description":"Analyze music and find the best points for seamless looping","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"audioUrl":{"type":"string","description":"URL of music to analyze"},"duration":{"type":"integer","exclusiveMinimum":0,"description":"Music duration in ms"},"bpm":{"type":"number","exclusiveMinimum":0,"description":"Known BPM if available"}},"required":["audioUrl","duration"]}}}},"responses":{"200":{"description":"Loop points found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"loopPoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startMs":{"type":"number"},"endMs":{"type":"number"},"duration":{"type":"number"},"quality":{"type":"number"},"type":{"type":"string","enum":["natural","crossfade","beat-matched"]}},"required":["id","startMs","endMs","duration","quality","type"]}}},"required":["success","loopPoints"]}}}}}}},"/v1/studio/audio/smart/music/extend":{"post":{"tags":["audio-smart"],"summary":"Extend music duration","description":"Extend music to target duration using seamless looping","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"audioUrl":{"type":"string","description":"URL of music to extend"},"duration":{"type":"integer","exclusiveMinimum":0,"description":"Current duration in ms"},"targetDuration":{"type":"integer","exclusiveMinimum":0,"description":"Target duration in ms"},"bpm":{"type":"number","exclusiveMinimum":0,"description":"Known BPM if available"},"crossfadeDuration":{"type":"integer","description":"Crossfade length in ms"},"preserveEnding":{"type":"boolean","description":"Keep original ending"},"minLoopLength":{"type":"integer","description":"Minimum loop section length"},"maxLoops":{"type":"integer","description":"Maximum loop iterations"}},"required":["audioUrl","duration","targetDuration"]}}}},"responses":{"200":{"description":"Extension plan","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"originalDuration":{"type":"number"},"targetDuration":{"type":"number"},"resultDuration":{"type":"number"},"loopPoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startMs":{"type":"number"},"endMs":{"type":"number"},"duration":{"type":"number"},"quality":{"type":"number"},"type":{"type":"string"}},"required":["id","startMs","endMs","duration","quality","type"]}},"regions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["original","loop","crossfade"]},"sourceStart":{"type":"number"},"sourceEnd":{"type":"number"},"outputStart":{"type":"number"},"outputEnd":{"type":"number"},"gain":{"type":"number"}},"required":["id","type","sourceStart","sourceEnd","outputStart","outputEnd"]}},"crossfadeDuration":{"type":"number"}},"required":["success","originalDuration","targetDuration","resultDuration","loopPoints","regions","crossfadeDuration"]}}}}}}},"/v1/studio/audio/smart/healing/presets":{"get":{"tags":["audio-smart"],"summary":"Get healing presets","description":"Get available audio healing presets","responses":{"200":{"description":"Available presets","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"presets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"operations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"intensity":{"type":"number"},"parameters":{"type":"object","additionalProperties":{"type":"number"}}},"required":["type","intensity"]}}},"required":["id","name","description","operations"]}}},"required":["success","presets"]}}}}}}},"/v1/studio/audio/smart/healing/analyze":{"post":{"tags":["audio-smart"],"summary":"Analyze audio for issues","description":"Analyze audio and detect quality issues","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"audioUrl":{"type":"string","description":"URL of audio to analyze"},"duration":{"type":"integer","exclusiveMinimum":0,"description":"Audio duration in ms"}},"required":["audioUrl","duration"]}}}},"responses":{"200":{"description":"Audio analysis result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"issues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["noise","rumble","sibilance","clipping","low_volume","reverb"]},"severity":{"type":"string","enum":["low","medium","high"]},"description":{"type":"string"},"timeRange":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"}},"required":["start","end"]},"recommendation":{"type":"string"}},"required":["id","type","severity","description","recommendation"]}},"metrics":{"type":"object","properties":{"peakDb":{"type":"number"},"rmsDb":{"type":"number"},"noiseFloorDb":{"type":"number"},"dynamicRangeDb":{"type":"number"},"loudnessLufs":{"type":"number"}},"required":["peakDb","rmsDb","noiseFloorDb","dynamicRangeDb","loudnessLufs"]}},"required":["success","issues","metrics"]}}}}}}},"/v1/studio/audio/smart/healing/heal":{"post":{"tags":["audio-smart"],"summary":"Heal audio","description":"Apply healing operations to audio","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"audioUrl":{"type":"string","description":"URL of audio to heal"},"operations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["denoise","derumble","deess","declip","normalize","enhance","deverb"]},"intensity":{"type":"number","minimum":0,"maximum":1},"parameters":{"type":"object","additionalProperties":{"type":"number"}}},"required":["type","intensity"]}},"outputFormat":{"type":"string","enum":["wav","mp3","aac"]}},"required":["audioUrl","operations"]}}}},"responses":{"200":{"description":"Healing result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"originalUrl":{"type":"string"},"healedUrl":{"type":"string"},"operationsApplied":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"intensity":{"type":"number"},"parameters":{"type":"object","additionalProperties":{"type":"number"}}},"required":["type","intensity"]}},"beforeMetrics":{"type":"object","properties":{"peakDb":{"type":"number"},"rmsDb":{"type":"number"},"noiseFloorDb":{"type":"number"},"dynamicRangeDb":{"type":"number"},"loudnessLufs":{"type":"number"}},"required":["peakDb","rmsDb","noiseFloorDb","dynamicRangeDb","loudnessLufs"]},"afterMetrics":{"type":"object","properties":{"peakDb":{"type":"number"},"rmsDb":{"type":"number"},"noiseFloorDb":{"type":"number"},"dynamicRangeDb":{"type":"number"},"loudnessLufs":{"type":"number"}},"required":["peakDb","rmsDb","noiseFloorDb","dynamicRangeDb","loudnessLufs"]},"improvements":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string"},"before":{"type":"number"},"after":{"type":"number"},"unit":{"type":"string"},"description":{"type":"string"}},"required":["metric","before","after","unit","description"]}}},"required":["success","originalUrl","operationsApplied","beforeMetrics","afterMetrics","improvements"]}}}}}}},"/v1/studio/audio/smart/healing/presets/{presetId}/apply":{"post":{"tags":["audio-smart"],"summary":"Apply healing preset","description":"Apply a healing preset to audio","parameters":[{"schema":{"type":"string"},"required":true,"name":"presetId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"audioUrl":{"type":"string","description":"URL of audio to heal"},"outputFormat":{"type":"string","enum":["wav","mp3","aac"]}},"required":["audioUrl"]}}}},"responses":{"200":{"description":"Healing result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"presetApplied":{"type":"string"},"healedUrl":{"type":"string"},"improvements":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string"},"before":{"type":"number"},"after":{"type":"number"},"unit":{"type":"string"},"description":{"type":"string"}},"required":["metric","before","after","unit","description"]}}},"required":["success","presetApplied","improvements"]}}}}}}},"/v1/studio/variations/settings":{"get":{"tags":["Variations"],"summary":"Get effective variation settings","description":"Get cascaded variation settings (platform → org → project)","parameters":[{"schema":{"type":"string"},"required":false,"name":"projectId","in":"query"}],"responses":{"200":{"description":"Effective variation settings","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"variationsPerClip":{"type":"integer"},"maxVariationsPerClip":{"type":"integer"},"maxConcurrentVariations":{"type":"integer"},"autoSelectBest":{"type":"boolean"},"comparisonMetrics":{"type":"array","items":{"type":"string"}},"source":{"type":"string","enum":["platform","organization","project"]},"tier":{"type":"string"}},"required":["variationsPerClip","maxVariationsPerClip","maxConcurrentVariations","autoSelectBest","comparisonMetrics","source","tier"]}},"required":["settings"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/variations/settings/org":{"patch":{"tags":["Variations"],"summary":"Update organization variation settings","description":"Update variation settings at the organization level","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"variationsPerClip":{"type":"integer","minimum":1,"maximum":5},"maxConcurrentVariations":{"type":"integer","minimum":1,"maximum":20},"autoSelectBest":{"type":"boolean"},"comparisonMetrics":{"type":"array","items":{"type":"string","enum":["quality","engagement","brandAlignment"]}}}}}}},"responses":{"200":{"description":"Updated settings","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"settings":{"type":"object","properties":{"variationsPerClip":{"type":"integer"},"maxVariationsPerClip":{"type":"integer"},"maxConcurrentVariations":{"type":"integer"},"autoSelectBest":{"type":"boolean"},"comparisonMetrics":{"type":"array","items":{"type":"string"}},"source":{"type":"string","enum":["platform","organization","project"]},"tier":{"type":"string"}},"required":["variationsPerClip","maxVariationsPerClip","maxConcurrentVariations","autoSelectBest","comparisonMetrics","source","tier"]}},"required":["success","settings"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/variations/settings/project":{"patch":{"tags":["Variations"],"summary":"Update project variation settings","description":"Update variation settings for a specific project","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"variationsPerClip":{"type":"integer","minimum":1,"maximum":5},"autoSelectBest":{"type":"boolean"},"comparisonMetrics":{"type":"array","items":{"type":"string","enum":["quality","engagement","brandAlignment"]}}},"required":["projectId"]}}}},"responses":{"200":{"description":"Updated settings","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"settings":{"type":"object","properties":{"variationsPerClip":{"type":"integer"},"maxVariationsPerClip":{"type":"integer"},"maxConcurrentVariations":{"type":"integer"},"autoSelectBest":{"type":"boolean"},"comparisonMetrics":{"type":"array","items":{"type":"string"}},"source":{"type":"string","enum":["platform","organization","project"]},"tier":{"type":"string"}},"required":["variationsPerClip","maxVariationsPerClip","maxConcurrentVariations","autoSelectBest","comparisonMetrics","source","tier"]}},"required":["success","settings"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/variations/generate":{"post":{"tags":["Variations"],"summary":"Generate clip variations","description":"Create variation records for a clip (actual generation is async)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clipId":{"type":"string"},"jobId":{"type":"string"},"count":{"type":"integer","minimum":1,"maximum":5},"generationParams":{"type":"object","additionalProperties":{}}},"required":["clipId","jobId"]}}}},"responses":{"201":{"description":"Variations created","content":{"application/json":{"schema":{"type":"object","properties":{"variations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clipId":{"type":"string"},"jobId":{"type":"string"},"variationIndex":{"type":"integer"},"isSelected":{"type":"boolean"},"isAutoSelected":{"type":"boolean"},"videoUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"qualityScore":{"type":["number","null"]},"engagementScore":{"type":["number","null"]},"brandAlignmentScore":{"type":["number","null"]},"overallScore":{"type":["number","null"]},"status":{"type":"string","enum":["pending","generating","completed","failed"]},"createdAt":{"type":"string"}},"required":["id","clipId","jobId","variationIndex","isSelected","isAutoSelected","videoUrl","thumbnailUrl","durationSeconds","qualityScore","engagementScore","brandAlignmentScore","overallScore","status","createdAt"]}}},"required":["variations"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/variations/clip":{"get":{"tags":["Variations"],"summary":"Get variations for a clip","description":"Get all variations for a specific clip","parameters":[{"schema":{"type":"string"},"required":true,"name":"clipId","in":"query"}],"responses":{"200":{"description":"Clip variations","content":{"application/json":{"schema":{"type":"object","properties":{"variations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clipId":{"type":"string"},"jobId":{"type":"string"},"variationIndex":{"type":"integer"},"isSelected":{"type":"boolean"},"isAutoSelected":{"type":"boolean"},"videoUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"qualityScore":{"type":["number","null"]},"engagementScore":{"type":["number","null"]},"brandAlignmentScore":{"type":["number","null"]},"overallScore":{"type":["number","null"]},"status":{"type":"string","enum":["pending","generating","completed","failed"]},"createdAt":{"type":"string"}},"required":["id","clipId","jobId","variationIndex","isSelected","isAutoSelected","videoUrl","thumbnailUrl","durationSeconds","qualityScore","engagementScore","brandAlignmentScore","overallScore","status","createdAt"]}}},"required":["variations"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/variations/job":{"get":{"tags":["Variations"],"summary":"Get variations for a job","description":"Get all variations for all clips in a job","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"query"}],"responses":{"200":{"description":"Job variations","content":{"application/json":{"schema":{"type":"object","properties":{"variations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clipId":{"type":"string"},"jobId":{"type":"string"},"variationIndex":{"type":"integer"},"isSelected":{"type":"boolean"},"isAutoSelected":{"type":"boolean"},"videoUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"qualityScore":{"type":["number","null"]},"engagementScore":{"type":["number","null"]},"brandAlignmentScore":{"type":["number","null"]},"overallScore":{"type":["number","null"]},"status":{"type":"string","enum":["pending","generating","completed","failed"]},"createdAt":{"type":"string"}},"required":["id","clipId","jobId","variationIndex","isSelected","isAutoSelected","videoUrl","thumbnailUrl","durationSeconds","qualityScore","engagementScore","brandAlignmentScore","overallScore","status","createdAt"]}}},"required":["variations"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/variations/select":{"post":{"tags":["Variations"],"summary":"Select a variation","description":"Manually select a variation for a clip","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"variationId":{"type":"string"}},"required":["variationId"]}}}},"responses":{"200":{"description":"Variation selected","content":{"application/json":{"schema":{"type":"object","properties":{"variation":{"type":"object","properties":{"id":{"type":"string"},"clipId":{"type":"string"},"jobId":{"type":"string"},"variationIndex":{"type":"integer"},"isSelected":{"type":"boolean"},"isAutoSelected":{"type":"boolean"},"videoUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"qualityScore":{"type":["number","null"]},"engagementScore":{"type":["number","null"]},"brandAlignmentScore":{"type":["number","null"]},"overallScore":{"type":["number","null"]},"status":{"type":"string","enum":["pending","generating","completed","failed"]},"createdAt":{"type":"string"}},"required":["id","clipId","jobId","variationIndex","isSelected","isAutoSelected","videoUrl","thumbnailUrl","durationSeconds","qualityScore","engagementScore","brandAlignmentScore","overallScore","status","createdAt"]},"previouslySelected":{"type":["object","null"],"properties":{"id":{"type":"string"},"clipId":{"type":"string"},"jobId":{"type":"string"},"variationIndex":{"type":"integer"},"isSelected":{"type":"boolean"},"isAutoSelected":{"type":"boolean"},"videoUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"qualityScore":{"type":["number","null"]},"engagementScore":{"type":["number","null"]},"brandAlignmentScore":{"type":["number","null"]},"overallScore":{"type":["number","null"]},"status":{"type":"string","enum":["pending","generating","completed","failed"]},"createdAt":{"type":"string"}},"required":["id","clipId","jobId","variationIndex","isSelected","isAutoSelected","videoUrl","thumbnailUrl","durationSeconds","qualityScore","engagementScore","brandAlignmentScore","overallScore","status","createdAt"]}},"required":["variation","previouslySelected"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Variation not found"}}}},"/v1/studio/variations/auto-select":{"post":{"tags":["Variations"],"summary":"Auto-select best variation(s)","description":"Automatically select the best variation based on scores for a clip or entire job","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clipId":{"type":"string"},"jobId":{"type":"string"}}}}}},"responses":{"200":{"description":"Best variation(s) selected","content":{"application/json":{"schema":{"type":"object","properties":{"selected":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clipId":{"type":"string"},"jobId":{"type":"string"},"variationIndex":{"type":"integer"},"isSelected":{"type":"boolean"},"isAutoSelected":{"type":"boolean"},"videoUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"qualityScore":{"type":["number","null"]},"engagementScore":{"type":["number","null"]},"brandAlignmentScore":{"type":["number","null"]},"overallScore":{"type":["number","null"]},"status":{"type":"string","enum":["pending","generating","completed","failed"]},"createdAt":{"type":"string"}},"required":["id","clipId","jobId","variationIndex","isSelected","isAutoSelected","videoUrl","thumbnailUrl","durationSeconds","qualityScore","engagementScore","brandAlignmentScore","overallScore","status","createdAt"]}}},"required":["selected"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/scheduling/jobs":{"post":{"tags":["Scheduling"],"summary":"Schedule a production job","description":"Schedule a video production job for future execution","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"provider":{"type":"string"},"qualityTier":{"type":"string"},"variationsPerClip":{"type":"integer","minimum":1,"maximum":5},"scheduledFor":{"type":"string"},"timezone":{"type":"string"},"isRecurring":{"type":"boolean"},"recurrenceRule":{"type":"string"}},"required":["projectId","scheduledFor"]}}}},"responses":{"201":{"description":"Scheduled job created","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":"string"},"jobId":{"type":["string","null"]},"provider":{"type":"string"},"qualityTier":{"type":"string"},"variationsPerClip":{"type":"integer"},"scheduledFor":{"type":"string"},"timezone":{"type":["string","null"]},"isRecurring":{"type":"boolean"},"recurrenceRule":{"type":["string","null"]},"status":{"type":"string","enum":["scheduled","running","completed","failed","cancelled"]},"discountPercent":{"type":"integer"},"createdBy":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","organizationId","projectId","jobId","provider","qualityTier","variationsPerClip","scheduledFor","timezone","isRecurring","recurrenceRule","status","discountPercent","createdBy","createdAt"]}},"required":["job"]}}}},"401":{"description":"Unauthorized"}}},"get":{"tags":["Scheduling"],"summary":"List scheduled jobs","description":"Get all scheduled production jobs for the organization","parameters":[{"schema":{"type":"string","enum":["scheduled","running","completed","failed","cancelled"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of scheduled jobs","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":"string"},"jobId":{"type":["string","null"]},"provider":{"type":"string"},"qualityTier":{"type":"string"},"variationsPerClip":{"type":"integer"},"scheduledFor":{"type":"string"},"timezone":{"type":["string","null"]},"isRecurring":{"type":"boolean"},"recurrenceRule":{"type":["string","null"]},"status":{"type":"string","enum":["scheduled","running","completed","failed","cancelled"]},"discountPercent":{"type":"integer"},"createdBy":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","organizationId","projectId","jobId","provider","qualityTier","variationsPerClip","scheduledFor","timezone","isRecurring","recurrenceRule","status","discountPercent","createdBy","createdAt"]}},"total":{"type":"integer"}},"required":["jobs","total"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/scheduling/jobs/{jobId}":{"get":{"tags":["Scheduling"],"summary":"Get scheduled job","description":"Get a specific scheduled job by ID","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Scheduled job","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":"string"},"jobId":{"type":["string","null"]},"provider":{"type":"string"},"qualityTier":{"type":"string"},"variationsPerClip":{"type":"integer"},"scheduledFor":{"type":"string"},"timezone":{"type":["string","null"]},"isRecurring":{"type":"boolean"},"recurrenceRule":{"type":["string","null"]},"status":{"type":"string","enum":["scheduled","running","completed","failed","cancelled"]},"discountPercent":{"type":"integer"},"createdBy":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","organizationId","projectId","jobId","provider","qualityTier","variationsPerClip","scheduledFor","timezone","isRecurring","recurrenceRule","status","discountPercent","createdBy","createdAt"]}},"required":["job"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Job not found"}}}},"/v1/studio/scheduling/jobs/cancel":{"post":{"tags":["Scheduling"],"summary":"Cancel scheduled job","description":"Cancel a pending scheduled job","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scheduledJobId":{"type":"string"}},"required":["scheduledJobId"]}}}},"responses":{"200":{"description":"Job cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":"string"},"jobId":{"type":["string","null"]},"provider":{"type":"string"},"qualityTier":{"type":"string"},"variationsPerClip":{"type":"integer"},"scheduledFor":{"type":"string"},"timezone":{"type":["string","null"]},"isRecurring":{"type":"boolean"},"recurrenceRule":{"type":["string","null"]},"status":{"type":"string","enum":["scheduled","running","completed","failed","cancelled"]},"discountPercent":{"type":"integer"},"createdBy":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","organizationId","projectId","jobId","provider","qualityTier","variationsPerClip","scheduledFor","timezone","isRecurring","recurrenceRule","status","discountPercent","createdBy","createdAt"]}},"required":["job"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Job not found or cannot be cancelled"}}}},"/v1/studio/scheduling/suggestions":{"get":{"tags":["Scheduling"],"summary":"Get scheduling suggestions","description":"Get suggested times for scheduling (including off-peak discounts)","responses":{"200":{"description":"Scheduling suggestions","content":{"application/json":{"schema":{"type":"object","properties":{"suggestions":{"type":"array","items":{"type":"object","properties":{"suggestedTime":{"type":"string"},"reason":{"type":"string"},"isOffPeak":{"type":"boolean"},"discountPercent":{"type":"integer"}},"required":["suggestedTime","reason","isOffPeak","discountPercent"]}}},"required":["suggestions"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/scheduling/offpeak":{"get":{"tags":["Scheduling"],"summary":"Get off-peak configuration","description":"Get the effective off-peak hours and discount configuration","responses":{"200":{"description":"Off-peak configuration","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":["string","null"]},"offPeakHours":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":23},"end":{"type":"integer","minimum":0,"maximum":23}},"required":["start","end"]}},"discountPercent":{"type":"integer"},"isActive":{"type":"boolean"}},"required":["id","organizationId","offPeakHours","discountPercent","isActive"]}},"required":["config"]}}}},"401":{"description":"Unauthorized"}}},"patch":{"tags":["Scheduling"],"summary":"Update off-peak configuration","description":"Update organization off-peak hours and discount settings","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"offPeakHours":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":23},"end":{"type":"integer","minimum":0,"maximum":23}},"required":["start","end"]}},"discountPercent":{"type":"integer","minimum":0,"maximum":100},"isActive":{"type":"boolean"}},"required":["offPeakHours","discountPercent"]}}}},"responses":{"200":{"description":"Updated off-peak configuration","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":["string","null"]},"offPeakHours":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":23},"end":{"type":"integer","minimum":0,"maximum":23}},"required":["start","end"]}},"discountPercent":{"type":"integer"},"isActive":{"type":"boolean"}},"required":["id","organizationId","offPeakHours","discountPercent","isActive"]}},"required":["config"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/reviews":{"post":{"tags":["Studio Reviews"],"summary":"Create a review session","description":"Creates a new review session for a project or clip with optional password protection","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"jobId":{"type":"string"},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"password":{"type":"string","minLength":4,"maxLength":100},"expiresInDays":{"type":"integer","minimum":1,"maximum":90},"allowComments":{"type":"boolean","default":true},"allowDownloads":{"type":"boolean","default":false},"requireApproval":{"type":"boolean","default":false},"approvers":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"}},"required":["email","name"]}},"approvalMode":{"type":"string","enum":["any","all"],"default":"any"}},"required":["projectId","title"]}}}},"responses":{"201":{"description":"Review session created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"session":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":"string"},"jobId":{"type":["string","null"]},"shareToken":{"type":"string"},"expiresAt":{"type":["string","null"]},"passwordHash":{"type":["string","null"]},"allowComments":{"type":"boolean"},"allowDownloads":{"type":"boolean"},"requireApproval":{"type":"boolean"},"approvers":{"type":["array","null"],"items":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"required":["email","name"]}},"approvalMode":{"type":"string","enum":["any","all"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","projectId","jobId","shareToken","expiresAt","passwordHash","allowComments","allowDownloads","requireApproval","approvers","approvalMode","status","title","description","createdBy","createdAt","updatedAt"]},"shareUrl":{"type":"string"}},"required":["success","session"]}}}},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"}}},"get":{"tags":["Studio Reviews"],"summary":"List review sessions","description":"Lists all review sessions for the organization with optional filtering","parameters":[{"schema":{"type":"string"},"required":false,"name":"projectId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"jobId","in":"query"},{"schema":{"type":"string","enum":["pending","approved","rejected"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Review sessions retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":"string"},"jobId":{"type":["string","null"]},"shareToken":{"type":"string"},"expiresAt":{"type":["string","null"]},"passwordHash":{"type":["string","null"]},"allowComments":{"type":"boolean"},"allowDownloads":{"type":"boolean"},"requireApproval":{"type":"boolean"},"approvers":{"type":["array","null"],"items":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"required":["email","name"]}},"approvalMode":{"type":"string","enum":["any","all"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","projectId","jobId","shareToken","expiresAt","passwordHash","allowComments","allowDownloads","requireApproval","approvers","approvalMode","status","title","description","createdBy","createdAt","updatedAt"]}},"total":{"type":"number"}},"required":["success","sessions","total"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/reviews/{sessionId}":{"get":{"tags":["Studio Reviews"],"summary":"Get review session details","description":"Retrieves a specific review session by ID","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Review session retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"session":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"projectId":{"type":"string"},"jobId":{"type":["string","null"]},"shareToken":{"type":"string"},"expiresAt":{"type":["string","null"]},"passwordHash":{"type":["string","null"]},"allowComments":{"type":"boolean"},"allowDownloads":{"type":"boolean"},"requireApproval":{"type":"boolean"},"approvers":{"type":["array","null"],"items":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"}},"required":["email","name"]}},"approvalMode":{"type":"string","enum":["any","all"]},"status":{"type":"string","enum":["pending","approved","rejected"]},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","projectId","jobId","shareToken","expiresAt","passwordHash","allowComments","allowDownloads","requireApproval","approvers","approvalMode","status","title","description","createdBy","createdAt","updatedAt"]},"shareUrl":{"type":"string"}},"required":["success","session"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Review session not found"}}},"delete":{"tags":["Studio Reviews"],"summary":"Delete review session","description":"Deletes a review session and all associated comments and approvals","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Review session deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"deleted":{"type":"boolean"}},"required":["success","deleted"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Review session not found"}}}},"/v1/studio/reviews/public/{shareToken}":{"get":{"tags":["Studio Reviews"],"summary":"Get public review session","description":"Retrieves a review session by share token (public access)","parameters":[{"schema":{"type":"string"},"required":true,"name":"shareToken","in":"path"},{"schema":{"type":"string"},"required":false,"name":"password","in":"query"}],"responses":{"200":{"description":"Review session retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"review":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"projectId":{"type":"string"},"jobId":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"isExpired":{"type":"boolean"},"allowComments":{"type":"boolean"},"allowDownloads":{"type":"boolean"},"requireApproval":{"type":"boolean"},"approvalMode":{"type":"string","enum":["any","all"]},"status":{"type":"string","enum":["pending","approved","rejected"]}},"required":["id","title","description","projectId","jobId","expiresAt","isExpired","allowComments","allowDownloads","requireApproval","approvalMode","status"]}},"required":["success","review"]}}}},"401":{"description":"Password required or incorrect"},"404":{"description":"Review session not found"},"410":{"description":"Review session expired"}}}},"/v1/studio/reviews/{sessionId}/comments":{"get":{"tags":["Studio Reviews"],"summary":"List session comments","description":"Lists all comments for a review session","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":["boolean","null"],"default":false},"required":false,"name":"includeResolved","in":"query"}],"responses":{"200":{"description":"Comments retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"parentId":{"type":["string","null"]},"authorName":{"type":"string"},"authorEmail":{"type":["string","null"]},"authorUserId":{"type":["string","null"]},"content":{"type":"string"},"timestampSeconds":{"type":["number","null"]},"isResolved":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sessionId","parentId","authorName","authorEmail","authorUserId","content","timestampSeconds","isResolved","createdAt","updatedAt"]}}},"required":["success","comments"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Review session not found"}}},"post":{"tags":["Studio Reviews"],"summary":"Add comment to session","description":"Adds a new comment to a review session (supports threading)","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"parentId":{"type":"string"},"authorName":{"type":"string","minLength":1,"maxLength":100},"authorEmail":{"type":"string","format":"email"},"content":{"type":"string","minLength":1,"maxLength":5000},"timestampSeconds":{"type":"number","minimum":0}},"required":["authorName","content"]}}}},"responses":{"201":{"description":"Comment added","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"comment":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"parentId":{"type":["string","null"]},"authorName":{"type":"string"},"authorEmail":{"type":["string","null"]},"authorUserId":{"type":["string","null"]},"content":{"type":"string"},"timestampSeconds":{"type":["number","null"]},"isResolved":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sessionId","parentId","authorName","authorEmail","authorUserId","content","timestampSeconds","isResolved","createdAt","updatedAt"]}},"required":["success","comment"]}}}},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"},"404":{"description":"Review session not found"}}}},"/v1/studio/reviews/{sessionId}/comments/{commentId}/resolve":{"post":{"tags":["Studio Reviews"],"summary":"Resolve comment","description":"Marks a comment as resolved","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"commentId","in":"path"}],"responses":{"200":{"description":"Comment resolved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"comment":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"parentId":{"type":["string","null"]},"authorName":{"type":"string"},"authorEmail":{"type":["string","null"]},"authorUserId":{"type":["string","null"]},"content":{"type":"string"},"timestampSeconds":{"type":["number","null"]},"isResolved":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sessionId","parentId","authorName","authorEmail","authorUserId","content","timestampSeconds","isResolved","createdAt","updatedAt"]}},"required":["success","comment"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Comment not found"}}}},"/v1/studio/reviews/{sessionId}/approvals":{"get":{"tags":["Studio Reviews"],"summary":"List session approvals","description":"Lists all approvals for a review session","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Approvals retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"approverName":{"type":"string"},"approverEmail":{"type":["string","null"]},"approverUserId":{"type":["string","null"]},"decision":{"type":"string","enum":["approved","changes_requested"]},"notes":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","sessionId","approverName","approverEmail","approverUserId","decision","notes","createdAt"]}}},"required":["success","approvals"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Review session not found"}}},"post":{"tags":["Studio Reviews"],"summary":"Submit approval decision","description":"Submits an approval or changes-requested decision for a review session","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"approverName":{"type":"string","minLength":1,"maxLength":100},"approverEmail":{"type":"string","format":"email"},"decision":{"type":"string","enum":["approved","changes_requested"]},"notes":{"type":"string","maxLength":2000}},"required":["approverName","decision"]}}}},"responses":{"201":{"description":"Approval submitted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"approval":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"approverName":{"type":"string"},"approverEmail":{"type":["string","null"]},"approverUserId":{"type":["string","null"]},"decision":{"type":"string","enum":["approved","changes_requested"]},"notes":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","sessionId","approverName","approverEmail","approverUserId","decision","notes","createdAt"]},"sessionStatus":{"type":"object","properties":{"sessionId":{"type":"string"},"approvalMode":{"type":"string","enum":["any","all"]},"requiredApprovers":{"type":"number"},"currentApprovals":{"type":"number"},"currentChangesRequested":{"type":"number"},"isFullyApproved":{"type":"boolean"},"hasChangesRequested":{"type":"boolean"}},"required":["sessionId","approvalMode","requiredApprovers","currentApprovals","currentChangesRequested","isFullyApproved","hasChangesRequested"]}},"required":["success","approval","sessionStatus"]}}}},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"},"404":{"description":"Review session not found"}}}},"/v1/studio/reviews/{sessionId}/approval-status":{"get":{"tags":["Studio Reviews"],"summary":"Get approval status","description":"Gets the current approval status for a review session","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Approval status retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"status":{"type":"object","properties":{"sessionId":{"type":"string"},"approvalMode":{"type":"string","enum":["any","all"]},"requiredApprovers":{"type":"number"},"currentApprovals":{"type":"number"},"currentChangesRequested":{"type":"number"},"isFullyApproved":{"type":"boolean"},"hasChangesRequested":{"type":"boolean"}},"required":["sessionId","approvalMode","requiredApprovers","currentApprovals","currentChangesRequested","isFullyApproved","hasChangesRequested"]}},"required":["success","status"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Review session not found"}}}},"/v1/studio/quality/config":{"get":{"tags":["Quality"],"summary":"Get quality scoring config","description":"Get quality scoring configuration for the organization","responses":{"200":{"description":"Quality config","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":["string","null"]},"enabled":{"type":"boolean"},"minScoreWarning":{"type":["number","null"]},"minScoreAutoReject":{"type":["number","null"]},"scoreWeights":{"type":"string"},"autoRejectEnabled":{"type":"boolean"},"autoSelectBest":{"type":"boolean"},"requireReviewBelow":{"type":["number","null"]},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]},"updatedBy":{"type":["string","null"]}},"required":["id","organizationId","enabled","minScoreWarning","minScoreAutoReject","scoreWeights","autoRejectEnabled","autoSelectBest","requireReviewBelow","createdAt","updatedAt","updatedBy"]}},"required":["config"]}}}},"401":{"description":"Unauthorized"}}},"put":{"tags":["Quality"],"summary":"Update quality scoring config","description":"Update quality scoring configuration for the organization","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"minScoreWarning":{"type":"number","minimum":0,"maximum":1},"minScoreAutoReject":{"type":"number","minimum":0,"maximum":1},"scoreWeights":{"type":"object","properties":{"technical":{"type":"number","minimum":0,"maximum":1,"description":"Weight for technical quality (0-1)"},"visual":{"type":"number","minimum":0,"maximum":1,"description":"Weight for visual quality (0-1)"},"content":{"type":"number","minimum":0,"maximum":1,"description":"Weight for content quality (0-1)"}},"required":["technical","visual","content"]},"autoRejectEnabled":{"type":"boolean"},"autoSelectBest":{"type":"boolean"},"requireReviewBelow":{"type":["number","null"],"minimum":0,"maximum":1}}}}}},"responses":{"200":{"description":"Updated config","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":["string","null"]},"enabled":{"type":"boolean"},"minScoreWarning":{"type":["number","null"]},"minScoreAutoReject":{"type":["number","null"]},"scoreWeights":{"type":"string"},"autoRejectEnabled":{"type":"boolean"},"autoSelectBest":{"type":"boolean"},"requireReviewBelow":{"type":["number","null"]},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]},"updatedBy":{"type":["string","null"]}},"required":["id","organizationId","enabled","minScoreWarning","minScoreAutoReject","scoreWeights","autoRejectEnabled","autoSelectBest","requireReviewBelow","createdAt","updatedAt","updatedBy"]}},"required":["config"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"}}}},"/v1/studio/quality/score":{"post":{"tags":["Quality"],"summary":"Score a video","description":"Run AI quality scoring on a video","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clipId":{"type":"string"},"variationId":{"type":"string"},"videoUrl":{"type":"string","format":"uri"},"prompt":{"type":"string"},"jobId":{"type":"string"}},"required":["videoUrl","prompt","jobId"]}}}},"responses":{"200":{"description":"Quality score","content":{"application/json":{"schema":{"type":"object","properties":{"score":{"type":"object","properties":{"id":{"type":"string"},"clipId":{"type":["string","null"]},"variationId":{"type":["string","null"]},"jobId":{"type":"string"},"organizationId":{"type":"string"},"overallScore":{"type":"number"},"technicalScore":{"type":"number"},"visualScore":{"type":"number"},"contentScore":{"type":"number"},"technicalDetails":{"type":["string","null"]},"visualDetails":{"type":["string","null"]},"contentDetails":{"type":["string","null"]},"issues":{"type":["string","null"]},"recommendations":{"type":["string","null"]},"modelUsed":{"type":"string"},"modelVersion":{"type":["string","null"]},"processingTimeMs":{"type":["number","null"]},"createdAt":{"type":["string","null"]}},"required":["id","clipId","variationId","jobId","organizationId","overallScore","technicalScore","visualScore","contentScore","technicalDetails","visualDetails","contentDetails","issues","recommendations","modelUsed","modelVersion","processingTimeMs","createdAt"]}},"required":["score"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"}}}},"/v1/studio/quality/criteria":{"get":{"tags":["Quality"],"summary":"Get quality criteria","description":"Get active quality scoring criteria","responses":{"200":{"description":"Quality criteria","content":{"application/json":{"schema":{"type":"object","properties":{"criteria":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":["string","null"]},"category":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"weight":{"type":["number","null"]},"isPlatformDefault":{"type":"boolean"},"isActive":{"type":"boolean"},"createdAt":{"type":["string","null"]}},"required":["id","organizationId","category","name","description","weight","isPlatformDefault","isActive","createdAt"]}}},"required":["criteria"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/jobs/{jobId}/quality":{"get":{"tags":["Quality"],"summary":"Get job quality report","description":"Get aggregated quality report for a production job","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Quality report","content":{"application/json":{"schema":{"type":"object","properties":{"report":{"type":"object","properties":{"status":{"type":"string","enum":["not_scored","scored"]},"averageScore":{"type":"number"},"lowestScore":{"type":"number"},"highestScore":{"type":"number"},"scoreDistribution":{"type":"object","properties":{"excellent":{"type":"number"},"good":{"type":"number"},"poor":{"type":"number"}},"required":["excellent","good","poor"]},"issuesByType":{"type":"object","additionalProperties":{"type":"number"}},"recommendations":{"type":"array","items":{"type":"string"}},"totalClips":{"type":"number"}},"required":["status"]}},"required":["report"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Job not found"}}}},"/v1/studio/clips/{clipId}/quality":{"get":{"tags":["Quality"],"summary":"Get clip quality scores","description":"Get all quality scores for a specific clip","parameters":[{"schema":{"type":"string"},"required":true,"name":"clipId","in":"path"}],"responses":{"200":{"description":"Clip scores","content":{"application/json":{"schema":{"type":"object","properties":{"scores":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"clipId":{"type":["string","null"]},"variationId":{"type":["string","null"]},"jobId":{"type":"string"},"organizationId":{"type":"string"},"overallScore":{"type":"number"},"technicalScore":{"type":"number"},"visualScore":{"type":"number"},"contentScore":{"type":"number"},"technicalDetails":{"type":["string","null"]},"visualDetails":{"type":["string","null"]},"contentDetails":{"type":["string","null"]},"issues":{"type":["string","null"]},"recommendations":{"type":["string","null"]},"modelUsed":{"type":"string"},"modelVersion":{"type":["string","null"]},"processingTimeMs":{"type":["number","null"]},"createdAt":{"type":["string","null"]}},"required":["id","clipId","variationId","jobId","organizationId","overallScore","technicalScore","visualScore","contentScore","technicalDetails","visualDetails","contentDetails","issues","recommendations","modelUsed","modelVersion","processingTimeMs","createdAt"]}}},"required":["scores"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/settings/brand":{"get":{"tags":["Brand"],"summary":"Get brand enforcement config","description":"Get brand enforcement configuration for the organization","responses":{"200":{"description":"Brand config","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":["object","null"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"enabled":{"type":"boolean"},"enforcementMode":{"type":["string","null"]},"primaryColors":{"type":["string","null"]},"secondaryColors":{"type":["string","null"]},"forbiddenColors":{"type":["string","null"]},"colorTolerance":{"type":["number","null"]},"requiredLogoPlacement":{"type":["string","null"]},"logoMinSizePercent":{"type":["number","null"]},"fontFamilies":{"type":["string","null"]},"forbiddenFonts":{"type":["string","null"]},"styleGuidelines":{"type":["string","null"]},"autoCorrectEnabled":{"type":"boolean"},"blockOnViolation":{"type":"boolean"},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]},"updatedBy":{"type":["string","null"]}},"required":["id","organizationId","enabled","enforcementMode","primaryColors","secondaryColors","forbiddenColors","colorTolerance","requiredLogoPlacement","logoMinSizePercent","fontFamilies","forbiddenFonts","styleGuidelines","autoCorrectEnabled","blockOnViolation","createdAt","updatedAt","updatedBy"]}},"required":["config"]}}}},"401":{"description":"Unauthorized"}}},"put":{"tags":["Brand"],"summary":"Update brand enforcement config","description":"Update brand enforcement configuration for the organization","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"enforcementMode":{"type":"string","enum":["warn","strict"]},"primaryColors":{"type":"array","items":{"type":"string"}},"secondaryColors":{"type":"array","items":{"type":"string"}},"forbiddenColors":{"type":"array","items":{"type":"string"}},"colorTolerance":{"type":"number","minimum":0,"maximum":1},"fontFamilies":{"type":"array","items":{"type":"string"}},"forbiddenFonts":{"type":"array","items":{"type":"string"}},"styleGuidelines":{"type":"string"},"blockOnViolation":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated config","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":["object","null"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"enabled":{"type":"boolean"},"enforcementMode":{"type":["string","null"]},"primaryColors":{"type":["string","null"]},"secondaryColors":{"type":["string","null"]},"forbiddenColors":{"type":["string","null"]},"colorTolerance":{"type":["number","null"]},"requiredLogoPlacement":{"type":["string","null"]},"logoMinSizePercent":{"type":["number","null"]},"fontFamilies":{"type":["string","null"]},"forbiddenFonts":{"type":["string","null"]},"styleGuidelines":{"type":["string","null"]},"autoCorrectEnabled":{"type":"boolean"},"blockOnViolation":{"type":"boolean"},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]},"updatedBy":{"type":["string","null"]}},"required":["id","organizationId","enabled","enforcementMode","primaryColors","secondaryColors","forbiddenColors","colorTolerance","requiredLogoPlacement","logoMinSizePercent","fontFamilies","forbiddenFonts","styleGuidelines","autoCorrectEnabled","blockOnViolation","createdAt","updatedAt","updatedBy"]}},"required":["config"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"}}}},"/v1/studio/brand/check":{"post":{"tags":["Brand"],"summary":"Check video brand compliance","description":"Run brand compliance check on a video","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clipId":{"type":"string"},"variationId":{"type":"string"},"videoUrl":{"type":"string","format":"uri"},"jobId":{"type":"string"}},"required":["videoUrl","jobId"]}}}},"responses":{"200":{"description":"Brand check result","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"status":{"type":"string","enum":["passed","warning","failed","skipped"]},"violations":{"type":"array","items":{"type":"object","properties":{"violationType":{"type":"string"},"severity":{"type":"string"},"description":{"type":"string"},"details":{},"frameTimestamp":{"type":"number"}},"required":["violationType","severity","description"]}},"blockedReason":{"type":"string"},"reason":{"type":"string"}},"required":["status","violations"]}},"required":["result"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"}}}},"/v1/studio/jobs/{jobId}/brand-check":{"get":{"tags":["Brand"],"summary":"Get job brand check status","description":"Get brand check status for a production job","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Brand check status","content":{"application/json":{"schema":{"type":"object","properties":{"check":{"type":["object","null"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"jobId":{"type":"string"},"status":{"type":["string","null"]},"totalClips":{"type":["number","null"]},"clipsChecked":{"type":["number","null"]},"clipsPassed":{"type":["number","null"]},"clipsFailed":{"type":["number","null"]},"clipsWarned":{"type":["number","null"]},"startedAt":{"type":["string","null"]},"completedAt":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"createdAt":{"type":["string","null"]}},"required":["id","organizationId","jobId","status","totalClips","clipsChecked","clipsPassed","clipsFailed","clipsWarned","startedAt","completedAt","errorMessage","createdAt"]}},"required":["check"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/jobs/{jobId}/violations":{"get":{"tags":["Brand"],"summary":"Get job brand violations","description":"Get all brand violations for a production job","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Job violations","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"totalViolations":{"type":"number"},"bySeverity":{"type":"object","properties":{"info":{"type":"number"},"warning":{"type":"number"},"critical":{"type":"number"}},"required":["info","warning","critical"]},"byType":{"type":"object","additionalProperties":{"type":"number"}},"violations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"clipId":{"type":["string","null"]},"variationId":{"type":["string","null"]},"jobId":{"type":"string"},"violationType":{"type":"string"},"severity":{"type":"string"},"description":{"type":"string"},"details":{"type":["string","null"]},"frameTimestamp":{"type":["number","null"]},"frameUrl":{"type":["string","null"]},"status":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolvedBy":{"type":["string","null"]},"resolutionNotes":{"type":["string","null"]},"autoCorrected":{"type":"boolean"},"createdAt":{"type":["string","null"]}},"required":["id","organizationId","clipId","variationId","jobId","violationType","severity","description","details","frameTimestamp","frameUrl","status","resolvedAt","resolvedBy","resolutionNotes","autoCorrected","createdAt"]}}},"required":["totalViolations","bySeverity","byType","violations"]}},"required":["summary"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/violations/{violationId}/resolve":{"put":{"tags":["Brand"],"summary":"Resolve a violation","description":"Mark a brand violation as resolved","parameters":[{"schema":{"type":"string"},"required":true,"name":"violationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resolutionNotes":{"type":"string"}}}}}},"responses":{"200":{"description":"Resolved violation","content":{"application/json":{"schema":{"type":"object","properties":{"violation":{"type":["object","null"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"clipId":{"type":["string","null"]},"variationId":{"type":["string","null"]},"jobId":{"type":"string"},"violationType":{"type":"string"},"severity":{"type":"string"},"description":{"type":"string"},"details":{"type":["string","null"]},"frameTimestamp":{"type":["number","null"]},"frameUrl":{"type":["string","null"]},"status":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolvedBy":{"type":["string","null"]},"resolutionNotes":{"type":["string","null"]},"autoCorrected":{"type":"boolean"},"createdAt":{"type":["string","null"]}},"required":["id","organizationId","clipId","variationId","jobId","violationType","severity","description","details","frameTimestamp","frameUrl","status","resolvedAt","resolvedBy","resolutionNotes","autoCorrected","createdAt"]}},"required":["violation"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Violation not found"}}}},"/v1/studio/violations/{violationId}/ignore":{"put":{"tags":["Brand"],"summary":"Ignore a violation","description":"Mark a brand violation as ignored","parameters":[{"schema":{"type":"string"},"required":true,"name":"violationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resolutionNotes":{"type":"string"}}}}}},"responses":{"200":{"description":"Ignored violation","content":{"application/json":{"schema":{"type":"object","properties":{"violation":{"type":["object","null"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"clipId":{"type":["string","null"]},"variationId":{"type":["string","null"]},"jobId":{"type":"string"},"violationType":{"type":"string"},"severity":{"type":"string"},"description":{"type":"string"},"details":{"type":["string","null"]},"frameTimestamp":{"type":["number","null"]},"frameUrl":{"type":["string","null"]},"status":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"resolvedBy":{"type":["string","null"]},"resolutionNotes":{"type":["string","null"]},"autoCorrected":{"type":"boolean"},"createdAt":{"type":["string","null"]}},"required":["id","organizationId","clipId","variationId","jobId","violationType","severity","description","details","frameTimestamp","frameUrl","status","resolvedAt","resolvedBy","resolutionNotes","autoCorrected","createdAt"]}},"required":["violation"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Violation not found"}}}},"/v1/studio/storyboards":{"get":{"tags":["Storyboards"],"summary":"List all storyboards","description":"Get all storyboards for the current organization","parameters":[{"schema":{"type":"string"},"required":false,"name":"projectId","in":"query"},{"schema":{"type":"string"},"required":false,"name":"scriptId","in":"query"},{"schema":{"type":"string","enum":["draft","in_review","approved","locked"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of storyboards","content":{"application/json":{"schema":{"type":"object","properties":{"storyboards":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":["string","null"]},"scriptId":{"type":["string","null"]},"organizationId":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"default":"16:9"},"defaultFrameDurationMs":{"type":"integer","default":3000},"stylePreset":{"type":["string","null"]},"styleConfig":{},"status":{"type":"string","enum":["draft","in_review","approved","locked"],"default":"draft"},"lockedAt":{"type":["string","null"]},"lockedBy":{"type":["string","null"]},"sceneCount":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"totalDurationMs":{"type":"integer","default":0},"version":{"type":"integer","default":1},"createdBy":{"type":["string","null"]},"updatedBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","title","createdAt","updatedAt"]}},"total":{"type":"number"},"limit":{"type":"number"},"offset":{"type":"number"}},"required":["storyboards","total","limit","offset"]}}}},"401":{"description":"Unauthorized"}}},"post":{"tags":["Storyboards"],"summary":"Create a storyboard","description":"Create a new storyboard","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string"},"scriptId":{"type":"string"},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"default":"16:9"},"defaultFrameDurationMs":{"type":"integer","minimum":100,"maximum":60000,"default":3000},"stylePreset":{"type":"string"},"styleConfig":{}},"required":["title"]}}}},"responses":{"201":{"description":"Storyboard created","content":{"application/json":{"schema":{"type":"object","properties":{"storyboard":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":["string","null"]},"scriptId":{"type":["string","null"]},"organizationId":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"default":"16:9"},"defaultFrameDurationMs":{"type":"integer","default":3000},"stylePreset":{"type":["string","null"]},"styleConfig":{},"status":{"type":"string","enum":["draft","in_review","approved","locked"],"default":"draft"},"lockedAt":{"type":["string","null"]},"lockedBy":{"type":["string","null"]},"sceneCount":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"totalDurationMs":{"type":"integer","default":0},"version":{"type":"integer","default":1},"createdBy":{"type":["string","null"]},"updatedBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scenes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"scriptSceneId":{"type":["string","null"]},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"heading":{"type":["string","null"]},"description":{"type":["string","null"]},"notes":{"type":["string","null"]},"durationMs":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"frames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","organizationId","title","createdAt","updatedAt"]}},"required":["storyboard"]}}}},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"}}}},"/v1/studio/storyboards/{storyboardId}":{"get":{"tags":["Storyboards"],"summary":"Get a storyboard","description":"Get a specific storyboard by ID with all scenes and frames","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":["boolean","null"],"default":true},"required":false,"name":"includeScenes","in":"query"},{"schema":{"type":["boolean","null"],"default":true},"required":false,"name":"includeFrames","in":"query"}],"responses":{"200":{"description":"Storyboard details with scenes and frames","content":{"application/json":{"schema":{"type":"object","properties":{"storyboard":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":["string","null"]},"scriptId":{"type":["string","null"]},"organizationId":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"default":"16:9"},"defaultFrameDurationMs":{"type":"integer","default":3000},"stylePreset":{"type":["string","null"]},"styleConfig":{},"status":{"type":"string","enum":["draft","in_review","approved","locked"],"default":"draft"},"lockedAt":{"type":["string","null"]},"lockedBy":{"type":["string","null"]},"sceneCount":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"totalDurationMs":{"type":"integer","default":0},"version":{"type":"integer","default":1},"createdBy":{"type":["string","null"]},"updatedBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scenes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"scriptSceneId":{"type":["string","null"]},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"heading":{"type":["string","null"]},"description":{"type":["string","null"]},"notes":{"type":["string","null"]},"durationMs":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"frames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","organizationId","title","createdAt","updatedAt"]}},"required":["storyboard"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}},"patch":{"tags":["Storyboards"],"summary":"Update a storyboard","description":"Update a storyboard by ID","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"]},"defaultFrameDurationMs":{"type":"integer","minimum":100,"maximum":60000},"stylePreset":{"type":["string","null"]},"styleConfig":{}}}}}},"responses":{"200":{"description":"Storyboard updated","content":{"application/json":{"schema":{"type":"object","properties":{"storyboard":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":["string","null"]},"scriptId":{"type":["string","null"]},"organizationId":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"default":"16:9"},"defaultFrameDurationMs":{"type":"integer","default":3000},"stylePreset":{"type":["string","null"]},"styleConfig":{},"status":{"type":"string","enum":["draft","in_review","approved","locked"],"default":"draft"},"lockedAt":{"type":["string","null"]},"lockedBy":{"type":["string","null"]},"sceneCount":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"totalDurationMs":{"type":"integer","default":0},"version":{"type":"integer","default":1},"createdBy":{"type":["string","null"]},"updatedBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scenes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"scriptSceneId":{"type":["string","null"]},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"heading":{"type":["string","null"]},"description":{"type":["string","null"]},"notes":{"type":["string","null"]},"durationMs":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"frames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","organizationId","title","createdAt","updatedAt"]}},"required":["storyboard"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}},"delete":{"tags":["Storyboards"],"summary":"Delete a storyboard","description":"Soft delete a storyboard by ID","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"}],"responses":{"200":{"description":"Storyboard deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string"}},"required":["success","id"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}}},"/v1/studio/storyboards/{storyboardId}/lock":{"post":{"tags":["Storyboards"],"summary":"Lock a storyboard","description":"Lock a storyboard to prevent further edits","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"}],"responses":{"200":{"description":"Storyboard locked","content":{"application/json":{"schema":{"type":"object","properties":{"storyboard":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":["string","null"]},"scriptId":{"type":["string","null"]},"organizationId":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"default":"16:9"},"defaultFrameDurationMs":{"type":"integer","default":3000},"stylePreset":{"type":["string","null"]},"styleConfig":{},"status":{"type":"string","enum":["draft","in_review","approved","locked"],"default":"draft"},"lockedAt":{"type":["string","null"]},"lockedBy":{"type":["string","null"]},"sceneCount":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"totalDurationMs":{"type":"integer","default":0},"version":{"type":"integer","default":1},"createdBy":{"type":["string","null"]},"updatedBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scenes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"scriptSceneId":{"type":["string","null"]},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"heading":{"type":["string","null"]},"description":{"type":["string","null"]},"notes":{"type":["string","null"]},"durationMs":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"frames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","organizationId","title","createdAt","updatedAt"]}},"required":["storyboard"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}}},"/v1/studio/storyboards/{storyboardId}/unlock":{"post":{"tags":["Storyboards"],"summary":"Unlock a storyboard","description":"Unlock a storyboard to allow edits","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"}],"responses":{"200":{"description":"Storyboard unlocked","content":{"application/json":{"schema":{"type":"object","properties":{"storyboard":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":["string","null"]},"scriptId":{"type":["string","null"]},"organizationId":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"default":"16:9"},"defaultFrameDurationMs":{"type":"integer","default":3000},"stylePreset":{"type":["string","null"]},"styleConfig":{},"status":{"type":"string","enum":["draft","in_review","approved","locked"],"default":"draft"},"lockedAt":{"type":["string","null"]},"lockedBy":{"type":["string","null"]},"sceneCount":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"totalDurationMs":{"type":"integer","default":0},"version":{"type":"integer","default":1},"createdBy":{"type":["string","null"]},"updatedBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"scenes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"scriptSceneId":{"type":["string","null"]},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"heading":{"type":["string","null"]},"description":{"type":["string","null"]},"notes":{"type":["string","null"]},"durationMs":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"frames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","organizationId","title","createdAt","updatedAt"]}},"required":["storyboard"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}}},"/v1/studio/storyboards/{storyboardId}/scenes":{"get":{"tags":["Storyboard Scenes"],"summary":"List scenes in a storyboard","description":"Get all scenes for a storyboard","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":["boolean","null"],"default":true},"required":false,"name":"includeFrames","in":"query"}],"responses":{"200":{"description":"List of scenes","content":{"application/json":{"schema":{"type":"object","properties":{"scenes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"scriptSceneId":{"type":["string","null"]},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"heading":{"type":["string","null"]},"description":{"type":["string","null"]},"notes":{"type":["string","null"]},"durationMs":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"frames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["scenes"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}},"post":{"tags":["Storyboard Scenes"],"summary":"Create a scene","description":"Create a new scene in a storyboard","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scriptSceneId":{"type":"string"},"heading":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":5000},"notes":{"type":"string","maxLength":5000},"orderIndex":{"type":"integer"}}}}}},"responses":{"201":{"description":"Scene created","content":{"application/json":{"schema":{"type":"object","properties":{"scene":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"scriptSceneId":{"type":["string","null"]},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"heading":{"type":["string","null"]},"description":{"type":["string","null"]},"notes":{"type":["string","null"]},"durationMs":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"frames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","storyboardId","organizationId","createdAt","updatedAt"]}},"required":["scene"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}}},"/v1/studio/storyboards/{storyboardId}/scenes/{sceneId}":{"get":{"tags":["Storyboard Scenes"],"summary":"Get a scene","description":"Get a specific scene by ID with its frames","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"},{"schema":{"type":["boolean","null"],"default":true},"required":false,"name":"includeFrames","in":"query"}],"responses":{"200":{"description":"Scene details with frames","content":{"application/json":{"schema":{"type":"object","properties":{"scene":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"scriptSceneId":{"type":["string","null"]},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"heading":{"type":["string","null"]},"description":{"type":["string","null"]},"notes":{"type":["string","null"]},"durationMs":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"frames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","storyboardId","organizationId","createdAt","updatedAt"]}},"required":["scene"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Scene not found"}}},"patch":{"tags":["Storyboard Scenes"],"summary":"Update a scene","description":"Update a scene by ID","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"heading":{"type":["string","null"],"maxLength":200},"description":{"type":["string","null"],"maxLength":5000},"notes":{"type":["string","null"],"maxLength":5000},"orderIndex":{"type":"integer"}}}}}},"responses":{"200":{"description":"Scene updated","content":{"application/json":{"schema":{"type":"object","properties":{"scene":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"scriptSceneId":{"type":["string","null"]},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"heading":{"type":["string","null"]},"description":{"type":["string","null"]},"notes":{"type":["string","null"]},"durationMs":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"frames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","storyboardId","organizationId","createdAt","updatedAt"]}},"required":["scene"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Scene not found"}}},"delete":{"tags":["Storyboard Scenes"],"summary":"Delete a scene","description":"Delete a scene and all its frames","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"responses":{"200":{"description":"Scene deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string"}},"required":["success","id"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Scene not found"}}}},"/v1/studio/storyboards/{storyboardId}/scenes/reorder":{"post":{"tags":["Storyboard Scenes"],"summary":"Reorder scenes","description":"Reorder scenes in a storyboard","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sceneIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["sceneIds"]}}}},"responses":{"200":{"description":"Scenes reordered","content":{"application/json":{"schema":{"type":"object","properties":{"scenes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"scriptSceneId":{"type":["string","null"]},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"heading":{"type":["string","null"]},"description":{"type":["string","null"]},"notes":{"type":["string","null"]},"durationMs":{"type":"integer","default":0},"frameCount":{"type":"integer","default":0},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"frames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["id","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["scenes"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}}},"/v1/studio/storyboards/{storyboardId}/scenes/{sceneId}/frames":{"get":{"tags":["Storyboard Frames"],"summary":"List frames in a scene","description":"Get all frames for a scene","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"responses":{"200":{"description":"List of frames","content":{"application/json":{"schema":{"type":"object","properties":{"frames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["frames"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Scene not found"}}},"post":{"tags":["Storyboard Frames"],"summary":"Create a frame","description":"Create a new frame in a scene","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":5000},"imagePrompt":{"type":"string","maxLength":5000},"negativePrompt":{"type":"string","maxLength":2000},"generationConfig":{},"referenceImageUrl":{"type":"string","format":"uri"},"referenceAssetId":{"type":"string"},"durationMs":{"type":"integer","minimum":100,"maximum":60000,"default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","minimum":0,"maximum":5000,"default":0},"shotType":{"type":"string"},"cameraMovement":{"type":"string"},"actionNotes":{"type":"string","maxLength":5000},"dialogue":{"type":"string","maxLength":5000},"soundNotes":{"type":"string","maxLength":2000},"orderIndex":{"type":"integer"}}}}}},"responses":{"201":{"description":"Frame created","content":{"application/json":{"schema":{"type":"object","properties":{"frame":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}},"required":["frame"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Scene not found"}}}},"/v1/studio/storyboards/{storyboardId}/frames/{frameId}":{"get":{"tags":["Storyboard Frames"],"summary":"Get a frame","description":"Get a specific frame by ID","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"frameId","in":"path"}],"responses":{"200":{"description":"Frame details","content":{"application/json":{"schema":{"type":"object","properties":{"frame":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}},"required":["frame"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Frame not found"}}},"patch":{"tags":["Storyboard Frames"],"summary":"Update a frame","description":"Update a frame by ID","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"frameId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":["string","null"],"maxLength":200},"description":{"type":["string","null"],"maxLength":5000},"imagePrompt":{"type":["string","null"],"maxLength":5000},"negativePrompt":{"type":["string","null"],"maxLength":2000},"generationConfig":{},"referenceImageUrl":{"type":["string","null"],"format":"uri"},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","minimum":100,"maximum":60000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"]},"transitionDurationMs":{"type":"integer","minimum":0,"maximum":5000},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"],"maxLength":5000},"dialogue":{"type":["string","null"],"maxLength":5000},"soundNotes":{"type":["string","null"],"maxLength":2000},"orderIndex":{"type":"integer"},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"]}}}}}},"responses":{"200":{"description":"Frame updated","content":{"application/json":{"schema":{"type":"object","properties":{"frame":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}},"required":["frame"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Frame not found"}}},"delete":{"tags":["Storyboard Frames"],"summary":"Delete a frame","description":"Delete a frame by ID","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"frameId","in":"path"}],"responses":{"200":{"description":"Frame deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string"}},"required":["success","id"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Frame not found"}}}},"/v1/studio/storyboards/{storyboardId}/scenes/{sceneId}/frames/reorder":{"post":{"tags":["Storyboard Frames"],"summary":"Reorder frames","description":"Reorder frames in a scene","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"frameIds":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["frameIds"]}}}},"responses":{"200":{"description":"Frames reordered","content":{"application/json":{"schema":{"type":"object","properties":{"frames":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]}}},"required":["frames"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Scene not found"}}}},"/v1/studio/storyboards/{storyboardId}/frames/{frameId}/generate":{"post":{"tags":["Storyboard Generation"],"summary":"Generate AI image for a frame","description":"Generate a concept image for a storyboard frame using AI","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"frameId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"style":{"type":"string","description":"Visual style for the image (e.g., cinematic, anime, corporate)"},"customPrompt":{"type":"string","maxLength":5000,"description":"Custom prompt to override the generated one"},"negativePrompt":{"type":"string","maxLength":2000,"description":"What to avoid in the image"},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1","4:5"],"description":"Image aspect ratio"}}}}}},"responses":{"200":{"description":"Image generated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"frame":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"orderIndex":{"type":"integer","default":0},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"negativePrompt":{"type":["string","null"]},"generationConfig":{},"generationStatus":{"type":"string","enum":["pending","generating","complete","failed"],"default":"pending"},"generationError":{"type":["string","null"]},"generatedAt":{"type":["string","null"]},"referenceImageUrl":{"type":["string","null"]},"referenceAssetId":{"type":["string","null"]},"durationMs":{"type":"integer","default":3000},"transitionType":{"type":"string","enum":["cut","fade","dissolve","wipe","slide"],"default":"cut"},"transitionDurationMs":{"type":"integer","default":0},"shotType":{"type":["string","null"]},"cameraMovement":{"type":["string","null"]},"actionNotes":{"type":["string","null"]},"dialogue":{"type":["string","null"]},"soundNotes":{"type":["string","null"]},"annotations":{"type":"array","items":{}},"status":{"type":"string","enum":["draft","pending_review","approved","needs_revision"],"default":"draft"},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","sceneId","storyboardId","organizationId","createdAt","updatedAt"]},"generatedPrompt":{"type":"string","description":"The prompt used for generation"}},"required":["frame","generatedPrompt"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Frame not found"},"429":{"description":"Rate limit exceeded"}}}},"/v1/studio/storyboards/{storyboardId}/frames/{frameId}/variations":{"post":{"tags":["Storyboard Generation"],"summary":"Generate variations of a frame","description":"Generate multiple variations of an existing frame for creative exploration","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"frameId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","minimum":1,"maximum":4,"default":4,"description":"Number of variations to generate"},"variationType":{"type":"string","enum":["composition","mood","angle","style"],"description":"Type of variation to generate"},"preserveElements":{"type":"string","description":"Elements to preserve in variations"}}}}}},"responses":{"200":{"description":"Variations generated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"variations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"frameId":{"type":"string"},"variationType":{"type":"string"},"imageUrl":{"type":"string"},"thumbnailUrl":{"type":["string","null"]},"prompt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","frameId","variationType","imageUrl","prompt","createdAt"]}}},"required":["variations"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Frame not found"},"429":{"description":"Rate limit exceeded"}}}},"/v1/studio/storyboards/{storyboardId}/frames/{frameId}/suggest-camera":{"post":{"tags":["Storyboard Generation"],"summary":"Get AI camera direction suggestions","description":"Get AI-powered camera direction suggestions for a frame based on the scene","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"frameId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"includeRationale":{"type":"boolean","default":true,"description":"Include explanation for each suggestion"}}}}}},"responses":{"200":{"description":"Camera suggestions generated","content":{"application/json":{"schema":{"type":"object","properties":{"suggestions":{"type":"array","items":{"type":"object","properties":{"shotType":{"type":"string","description":"E.g., wide, medium, close-up, extreme close-up"},"cameraMovement":{"type":"string","description":"E.g., static, pan, tilt, dolly, tracking"},"angle":{"type":"string","description":"E.g., eye level, low angle, high angle, bird's eye"},"rationale":{"type":"string","description":"Why this camera choice works for the scene"}},"required":["shotType","cameraMovement","angle"]}}},"required":["suggestions"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Frame not found"}}}},"/v1/studio/storyboards/{storyboardId}/generate-all":{"post":{"tags":["Storyboard Generation"],"summary":"Generate images for multiple frames","description":"Batch generate AI images for multiple frames in a storyboard","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"frameIds":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":20,"description":"Frame IDs to generate images for"},"style":{"type":"string"},"skipExisting":{"type":"boolean","default":true,"description":"Skip frames that already have images"}},"required":["frameIds"]}}}},"responses":{"200":{"description":"Bulk generation completed","content":{"application/json":{"schema":{"type":"object","properties":{"generated":{"type":"number"},"skipped":{"type":"number"},"failed":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"frameId":{"type":"string"},"status":{"type":"string","enum":["success","skipped","failed"]},"error":{"type":"string"}},"required":["frameId","status"]}}},"required":["generated","skipped","failed","results"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"},"429":{"description":"Rate limit exceeded"}}}},"/v1/studio/storyboards/{storyboardId}/frames/{frameId}/convert-sketch":{"post":{"tags":["Storyboard Editing"],"summary":"Convert sketch to AI image","description":"Convert a hand-drawn sketch with annotations to an AI-generated concept image","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"frameId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sketchData":{"type":"string","description":"Base64-encoded PNG sketch image"},"annotations":{"type":"array","items":{"type":"string"},"default":[],"description":"Text annotations on the sketch"},"style":{"type":"string","description":"Visual style to apply"},"preserveSceneContext":{"type":"boolean","default":true,"description":"Use existing frame context in prompt"}},"required":["sketchData"]}}}},"responses":{"200":{"description":"Sketch converted to image","content":{"application/json":{"schema":{"type":"object","properties":{"frame":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imagePrompt":{"type":["string","null"]},"sketchData":{"type":["string","null"]}},"required":["id","imageUrl","thumbnailUrl","imagePrompt","sketchData"]}},"required":["frame"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Frame not found"}}}},"/v1/studio/storyboards/{storyboardId}/apply-style":{"post":{"tags":["Storyboard Editing"],"summary":"Apply style to frames","description":"Apply a visual style to multiple frames with AI image regeneration","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"frameIds":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Frame IDs to apply style to"},"style":{"type":"object","properties":{"preset":{"type":"string","description":"Preset style name"},"custom":{"type":"string","description":"Custom style description"},"strength":{"type":"number","minimum":0,"maximum":1,"default":0.8,"description":"Style application strength"},"preserveElements":{"type":"array","items":{"type":"string"},"default":["characters","composition"],"description":"Elements to preserve"}}}},"required":["frameIds","style"]}}}},"responses":{"200":{"description":"Style applied to frames","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"frameId":{"type":"string"},"success":{"type":"boolean"},"imageUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"error":{"type":"string"}},"required":["frameId","success","imageUrl","thumbnailUrl"]}},"successCount":{"type":"number"},"failureCount":{"type":"number"}},"required":["results","successCount","failureCount"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}}},"/v1/studio/storyboards/{storyboardId}/references":{"get":{"tags":["Storyboard References"],"summary":"List references","description":"List all references (characters, locations, moods, etc.) for a storyboard","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string","enum":["character","location","mood","brand","prop"]},"required":false,"name":"type","in":"query"}],"responses":{"200":{"description":"List of references","content":{"application/json":{"schema":{"type":"object","properties":{"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"type":{"type":"string","enum":["character","location","mood","brand","prop"]},"name":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","storyboardId","organizationId","type","name","description","imageUrl","thumbnailUrl","tags","metadata","createdBy","createdAt","updatedAt"]}}},"required":["references"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}},"post":{"tags":["Storyboard References"],"summary":"Create reference","description":"Create a new reference (character, location, mood, etc.)","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["character","location","mood","brand","prop"]},"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":500},"imageUrl":{"type":"string","format":"uri"},"thumbnailUrl":{"type":"string","format":"uri"},"tags":{"type":"array","items":{"type":"string"},"default":[]},"metadata":{"type":"object","additionalProperties":{},"description":"Additional metadata like character traits"}},"required":["type","name"]}}}},"responses":{"201":{"description":"Reference created","content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"type":{"type":"string","enum":["character","location","mood","brand","prop"]},"name":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","storyboardId","organizationId","type","name","description","imageUrl","thumbnailUrl","tags","metadata","createdBy","createdAt","updatedAt"]}},"required":["reference"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}}},"/v1/studio/storyboards/{storyboardId}/references/{referenceId}":{"get":{"tags":["Storyboard References"],"summary":"Get reference","description":"Get a specific reference by ID","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"referenceId","in":"path"}],"responses":{"200":{"description":"Reference details","content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"type":{"type":"string","enum":["character","location","mood","brand","prop"]},"name":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","storyboardId","organizationId","type","name","description","imageUrl","thumbnailUrl","tags","metadata","createdBy","createdAt","updatedAt"]}},"required":["reference"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Reference not found"}}},"patch":{"tags":["Storyboard References"],"summary":"Update reference","description":"Update an existing reference","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"referenceId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":["string","null"],"maxLength":500},"imageUrl":{"type":["string","null"],"format":"uri"},"thumbnailUrl":{"type":["string","null"],"format":"uri"},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":{}}}}}}},"responses":{"200":{"description":"Reference updated","content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"type":{"type":"string","enum":["character","location","mood","brand","prop"]},"name":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","storyboardId","organizationId","type","name","description","imageUrl","thumbnailUrl","tags","metadata","createdBy","createdAt","updatedAt"]}},"required":["reference"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Reference not found"}}},"delete":{"tags":["Storyboard References"],"summary":"Delete reference","description":"Delete a reference","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"referenceId","in":"path"}],"responses":{"200":{"description":"Reference deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string"}},"required":["success","id"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Reference not found"}}}},"/v1/studio/storyboards/{storyboardId}/frames/{frameId}/apply-reference":{"post":{"tags":["Storyboard References"],"summary":"Apply reference to frame","description":"Apply a reference to a frame, optionally regenerating the image","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"frameId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"referenceId":{"type":"string"},"regenerateImage":{"type":"boolean","default":false,"description":"Whether to regenerate image with reference"}},"required":["referenceId"]}}}},"responses":{"200":{"description":"Reference applied to frame","content":{"application/json":{"schema":{"type":"object","properties":{"frame":{"type":"object","properties":{"id":{"type":"string"},"imagePrompt":{"type":["string","null"]},"imageUrl":{"type":["string","null"]}},"required":["id","imagePrompt","imageUrl"]},"reference":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"type":{"type":"string","enum":["character","location","mood","brand","prop"]},"name":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":["object","null"],"additionalProperties":{}},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","storyboardId","organizationId","type","name","description","imageUrl","thumbnailUrl","tags","metadata","createdBy","createdAt","updatedAt"]}},"required":["frame","reference"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Frame or reference not found"}}}},"/v1/studio/storyboards/{storyboardId}/check-consistency":{"post":{"tags":["Storyboard Editing"],"summary":"Check storyboard consistency","description":"Analyze frames for visual and narrative consistency issues","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"}],"responses":{"200":{"description":"Consistency check results","content":{"application/json":{"schema":{"type":"object","properties":{"overallScore":{"type":"number","minimum":0,"maximum":100},"issues":{"type":"array","items":{"type":"object","properties":{"frameId":{"type":"string"},"frameIndex":{"type":"number"},"type":{"type":"string","enum":["character","lighting","style","continuity","prop"]},"severity":{"type":"string","enum":["low","medium","high"]},"description":{"type":"string"},"suggestion":{"type":"string"}},"required":["frameId","frameIndex","type","severity","description"]}},"suggestions":{"type":"array","items":{"type":"string"}},"analyzedFrameCount":{"type":"number"}},"required":["overallScore","issues","suggestions","analyzedFrameCount"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}}},"/v1/studio/storyboards/{storyboardId}/frames/{frameId}/upload-image":{"post":{"tags":["Storyboard Editing"],"summary":"Upload frame image","description":"Upload or set a custom image for a frame","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"frameId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"imageUrl":{"type":"string","format":"uri","description":"URL of uploaded image"},"assetId":{"type":"string","description":"Asset ID if uploaded to assets service"}},"required":["imageUrl"]}}}},"responses":{"200":{"description":"Image uploaded","content":{"application/json":{"schema":{"type":"object","properties":{"frame":{"type":"object","properties":{"id":{"type":"string"},"imageUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"imageAssetId":{"type":["string","null"]}},"required":["id","imageUrl","thumbnailUrl","imageAssetId"]}},"required":["frame"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Frame not found"}}}},"/v1/studio/storyboards/{storyboardId}/frames/{frameId}/clone":{"post":{"tags":["Storyboard Editing"],"summary":"Clone frame","description":"Clone a frame with optional modifications","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"frameId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targetSceneId":{"type":"string","description":"Scene to clone into (defaults to same scene)"},"modifications":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"imagePrompt":{"type":"string"}}},"regenerateImage":{"type":"boolean","default":false}}}}}},"responses":{"201":{"description":"Frame cloned","content":{"application/json":{"schema":{"type":"object","properties":{"frame":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"orderIndex":{"type":"number"},"title":{"type":["string","null"]},"imageUrl":{"type":["string","null"]}},"required":["id","sceneId","orderIndex","title","imageUrl"]}},"required":["frame"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Frame not found"}}}},"/v1/studio/storyboards/{storyboardId}/comments":{"get":{"tags":["Storyboard Comments"],"summary":"List all comments for a storyboard","description":"Get all comments for a storyboard, optionally filtered by frame","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"frameId","in":"query"},{"schema":{"type":["boolean","null"]},"required":false,"name":"resolved","in":"query"},{"schema":{"type":["boolean","null"],"default":true},"required":false,"name":"includeReplies","in":"query"}],"responses":{"200":{"description":"List of comments","content":{"application/json":{"schema":{"type":"object","properties":{"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"frameId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"content":{"type":"string"},"positionX":{"type":["number","null"]},"positionY":{"type":["number","null"]},"parentId":{"type":["string","null"]},"resolved":{"type":"boolean","default":false},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","displayName","avatarUrl"]},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"frameId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"content":{"type":"string"},"positionX":{"type":["number","null"]},"positionY":{"type":["number","null"]},"parentId":{"type":["string","null"]},"resolved":{"type":"boolean","default":false},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","displayName","avatarUrl"]}},"required":["id","frameId","storyboardId","organizationId","content","createdBy","createdAt","updatedAt"]}},"replyCount":{"type":"number"}},"required":["id","frameId","storyboardId","organizationId","content","createdBy","createdAt","updatedAt"]}},"total":{"type":"number"}},"required":["comments","total"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}}},"/v1/studio/storyboards/{storyboardId}/frames/{frameId}/comments":{"get":{"tags":["Storyboard Comments"],"summary":"List comments for a specific frame","description":"Get all comments for a specific storyboard frame","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"frameId","in":"path"},{"schema":{"type":["boolean","null"]},"required":false,"name":"resolved","in":"query"},{"schema":{"type":["boolean","null"],"default":true},"required":false,"name":"includeReplies","in":"query"}],"responses":{"200":{"description":"List of frame comments","content":{"application/json":{"schema":{"type":"object","properties":{"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"frameId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"content":{"type":"string"},"positionX":{"type":["number","null"]},"positionY":{"type":["number","null"]},"parentId":{"type":["string","null"]},"resolved":{"type":"boolean","default":false},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","displayName","avatarUrl"]},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"frameId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"content":{"type":"string"},"positionX":{"type":["number","null"]},"positionY":{"type":["number","null"]},"parentId":{"type":["string","null"]},"resolved":{"type":"boolean","default":false},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","displayName","avatarUrl"]}},"required":["id","frameId","storyboardId","organizationId","content","createdBy","createdAt","updatedAt"]}},"replyCount":{"type":"number"}},"required":["id","frameId","storyboardId","organizationId","content","createdBy","createdAt","updatedAt"]}},"total":{"type":"number"}},"required":["comments","total"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Frame not found"}}},"post":{"tags":["Storyboard Comments"],"summary":"Create a comment","description":"Add a new comment to a storyboard frame","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"frameId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":5000},"positionX":{"type":"number","minimum":0,"maximum":1},"positionY":{"type":"number","minimum":0,"maximum":1},"parentId":{"type":"string"}},"required":["content"]}}}},"responses":{"201":{"description":"Comment created","content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string"},"frameId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"content":{"type":"string"},"positionX":{"type":["number","null"]},"positionY":{"type":["number","null"]},"parentId":{"type":["string","null"]},"resolved":{"type":"boolean","default":false},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","displayName","avatarUrl"]},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"frameId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"content":{"type":"string"},"positionX":{"type":["number","null"]},"positionY":{"type":["number","null"]},"parentId":{"type":["string","null"]},"resolved":{"type":"boolean","default":false},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","displayName","avatarUrl"]}},"required":["id","frameId","storyboardId","organizationId","content","createdBy","createdAt","updatedAt"]}},"replyCount":{"type":"number"}},"required":["id","frameId","storyboardId","organizationId","content","createdBy","createdAt","updatedAt"]}},"required":["comment"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Frame not found"}}}},"/v1/studio/storyboards/{storyboardId}/comments/{commentId}":{"get":{"tags":["Storyboard Comments"],"summary":"Get a comment","description":"Get a specific comment by ID with its replies","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"commentId","in":"path"}],"responses":{"200":{"description":"Comment details","content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string"},"frameId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"content":{"type":"string"},"positionX":{"type":["number","null"]},"positionY":{"type":["number","null"]},"parentId":{"type":["string","null"]},"resolved":{"type":"boolean","default":false},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","displayName","avatarUrl"]},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"frameId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"content":{"type":"string"},"positionX":{"type":["number","null"]},"positionY":{"type":["number","null"]},"parentId":{"type":["string","null"]},"resolved":{"type":"boolean","default":false},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","displayName","avatarUrl"]}},"required":["id","frameId","storyboardId","organizationId","content","createdBy","createdAt","updatedAt"]}},"replyCount":{"type":"number"}},"required":["id","frameId","storyboardId","organizationId","content","createdBy","createdAt","updatedAt"]}},"required":["comment"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Comment not found"}}},"patch":{"tags":["Storyboard Comments"],"summary":"Update a comment","description":"Update the content of a comment (author only)","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"commentId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":5000},"positionX":{"type":"number","minimum":0,"maximum":1},"positionY":{"type":"number","minimum":0,"maximum":1}}}}}},"responses":{"200":{"description":"Comment updated","content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string"},"frameId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"content":{"type":"string"},"positionX":{"type":["number","null"]},"positionY":{"type":["number","null"]},"parentId":{"type":["string","null"]},"resolved":{"type":"boolean","default":false},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","displayName","avatarUrl"]},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"frameId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"content":{"type":"string"},"positionX":{"type":["number","null"]},"positionY":{"type":["number","null"]},"parentId":{"type":["string","null"]},"resolved":{"type":"boolean","default":false},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","displayName","avatarUrl"]}},"required":["id","frameId","storyboardId","organizationId","content","createdBy","createdAt","updatedAt"]}},"replyCount":{"type":"number"}},"required":["id","frameId","storyboardId","organizationId","content","createdBy","createdAt","updatedAt"]}},"required":["comment"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Not comment author"},"404":{"description":"Comment not found"}}},"delete":{"tags":["Storyboard Comments"],"summary":"Delete a comment","description":"Delete a comment and all its replies (author or admin only)","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"commentId","in":"path"}],"responses":{"200":{"description":"Comment deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string"}},"required":["success","id"]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Not authorized to delete"},"404":{"description":"Comment not found"}}}},"/v1/studio/storyboards/{storyboardId}/comments/{commentId}/resolve":{"post":{"tags":["Storyboard Comments"],"summary":"Resolve or unresolve a comment","description":"Mark a comment thread as resolved or unresolved","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"commentId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"resolved":{"type":"boolean"}},"required":["resolved"]}}}},"responses":{"200":{"description":"Comment resolution updated","content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"object","properties":{"id":{"type":"string"},"frameId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"content":{"type":"string"},"positionX":{"type":["number","null"]},"positionY":{"type":["number","null"]},"parentId":{"type":["string","null"]},"resolved":{"type":"boolean","default":false},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","displayName","avatarUrl"]},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"frameId":{"type":"string"},"storyboardId":{"type":"string"},"organizationId":{"type":"string"},"content":{"type":"string"},"positionX":{"type":["number","null"]},"positionY":{"type":["number","null"]},"parentId":{"type":["string","null"]},"resolved":{"type":"boolean","default":false},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["id","displayName","avatarUrl"]}},"required":["id","frameId","storyboardId","organizationId","content","createdBy","createdAt","updatedAt"]}},"replyCount":{"type":"number"}},"required":["id","frameId","storyboardId","organizationId","content","createdBy","createdAt","updatedAt"]}},"required":["comment"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Comment not found"}}}},"/v1/studio/storyboards/{storyboardId}/exports":{"post":{"tags":["Storyboard Exports"],"summary":"Create an export","description":"Start exporting a storyboard in the specified format","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"options":{"oneOf":[{"type":"object","properties":{"format":{"type":"string","enum":["pdf"]},"pageSize":{"type":"string","enum":["letter","a4","tabloid"],"default":"letter"},"orientation":{"type":"string","enum":["portrait","landscape"],"default":"landscape"},"framesPerPage":{"type":"integer","minimum":1,"maximum":12,"default":6},"includeNotes":{"type":"boolean","default":true},"includeDialogue":{"type":"boolean","default":true},"includeTechnical":{"type":"boolean","default":false},"quality":{"type":"string","enum":["draft","standard","high"],"default":"standard"}},"required":["format"]},{"type":"object","properties":{"format":{"type":"string","enum":["images"]},"imageFormat":{"type":"string","enum":["jpeg","png","webp"],"default":"jpeg"},"quality":{"type":"integer","minimum":1,"maximum":100,"default":85},"includeOverlays":{"type":"boolean","default":false},"namingPattern":{"type":"string","enum":["sequential","scene-frame","custom"],"default":"scene-frame"}},"required":["format"]},{"type":"object","properties":{"format":{"type":"string","enum":["pptx"]},"template":{"type":"string","enum":["minimal","professional","branded"],"default":"professional"},"includeNotes":{"type":"boolean","default":true},"oneFramePerSlide":{"type":"boolean","default":true}},"required":["format"]},{"type":"object","properties":{"format":{"type":"string","enum":["production"]},"outputFormat":{"type":"string","enum":["edl","xml","json"],"default":"xml"},"includeTimecodes":{"type":"boolean","default":true},"frameRate":{"type":"number","default":24},"startTimecode":{"type":"string","default":"00:00:00:00"}},"required":["format"]}]},"sceneIds":{"type":"array","items":{"type":"string"}},"frameIds":{"type":"array","items":{"type":"string"}}},"required":["options"]}}}},"responses":{"202":{"description":"Export started","content":{"application/json":{"schema":{"type":"object","properties":{"export":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"status":{"type":"string","enum":["pending","processing","complete","failed"]},"format":{"type":"string","enum":["pdf","images","pptx","production"]},"progress":{"type":"number","minimum":0,"maximum":100},"downloadUrl":{"type":["string","null"]},"fileName":{"type":["string","null"]},"fileSize":{"type":["number","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]}},"required":["id","storyboardId","status","format","progress","downloadUrl","fileName","fileSize","error","createdAt","completedAt","expiresAt"]}},"required":["export"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}},"get":{"tags":["Storyboard Exports"],"summary":"List exports","description":"Get all exports for a storyboard","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string","enum":["pending","processing","complete","failed"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":10},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"List of exports","content":{"application/json":{"schema":{"type":"object","properties":{"exports":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"status":{"type":"string","enum":["pending","processing","complete","failed"]},"format":{"type":"string","enum":["pdf","images","pptx","production"]},"progress":{"type":"number","minimum":0,"maximum":100},"downloadUrl":{"type":["string","null"]},"fileName":{"type":["string","null"]},"fileSize":{"type":["number","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]}},"required":["id","storyboardId","status","format","progress","downloadUrl","fileName","fileSize","error","createdAt","completedAt","expiresAt"]}},"total":{"type":"number"}},"required":["exports","total"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Storyboard not found"}}}},"/v1/studio/storyboards/{storyboardId}/exports/{exportId}":{"get":{"tags":["Storyboard Exports"],"summary":"Get export status","description":"Check the status of an export job","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"exportId","in":"path"}],"responses":{"200":{"description":"Export status","content":{"application/json":{"schema":{"type":"object","properties":{"export":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"status":{"type":"string","enum":["pending","processing","complete","failed"]},"format":{"type":"string","enum":["pdf","images","pptx","production"]},"progress":{"type":"number","minimum":0,"maximum":100},"downloadUrl":{"type":["string","null"]},"fileName":{"type":["string","null"]},"fileSize":{"type":["number","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]}},"required":["id","storyboardId","status","format","progress","downloadUrl","fileName","fileSize","error","createdAt","completedAt","expiresAt"]}},"required":["export"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Export not found"}}}},"/v1/studio/storyboards/{storyboardId}/exports/{exportId}/cancel":{"post":{"tags":["Storyboard Exports"],"summary":"Cancel an export","description":"Cancel a pending or processing export job","parameters":[{"schema":{"type":"string"},"required":true,"name":"storyboardId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"exportId","in":"path"}],"responses":{"200":{"description":"Export cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"export":{"type":"object","properties":{"id":{"type":"string"},"storyboardId":{"type":"string"},"status":{"type":"string","enum":["pending","processing","complete","failed"]},"format":{"type":"string","enum":["pdf","images","pptx","production"]},"progress":{"type":"number","minimum":0,"maximum":100},"downloadUrl":{"type":["string","null"]},"fileName":{"type":["string","null"]},"fileSize":{"type":["number","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"completedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]}},"required":["id","storyboardId","status","format","progress","downloadUrl","fileName","fileSize","error","createdAt","completedAt","expiresAt"]}},"required":["export"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Export not found"},"409":{"description":"Export already completed or failed"}}}},"/v1/studio/projects/{projectId}/produce":{"post":{"tags":["Studio Production"],"summary":"Start production for a project","description":"Creates a production job and queues all storyboard frames for video generation","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["kling","veo","runway"]},"quality":{"type":"string","enum":["standard","high","ultra"]},"aspectRatio":{"type":"string"},"duration":{"type":"integer","minimum":1,"maximum":30},"priority":{"type":"string","enum":["low","normal","high","critical"]},"enableFallback":{"type":"boolean","default":true},"fallbackProvider":{"type":"string","enum":["kling","veo","runway"]},"autoSelectProvider":{"type":"boolean","default":false},"clipOverrides":{"type":"object","additionalProperties":{"type":"object","properties":{"provider":{"type":"string","enum":["kling","veo","runway"]},"prompt":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Production started","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"status":{"type":"string","enum":["pending","queued","processing","paused","complete","failed","cancelled"]},"provider":{"type":"string"},"totalClips":{"type":"number"},"completedClips":{"type":"number"},"failedClips":{"type":"number"},"progress":{"type":"number"},"currentStep":{"type":"string"},"estimatedTimeRemaining":{"type":"number"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"errorMessage":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","projectId","status","provider","totalClips","completedClips","failedClips","progress","createdAt"]},"clips":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"frameId":{"type":"string"},"orderIndex":{"type":"number"},"status":{"type":"string","enum":["pending","queued","generating","processing","retrying","paused","complete","failed","skipped","cancelled"]},"progress":{"type":"number"},"prompt":{"type":"string"},"referenceImageUrl":{"type":"string"},"generatedClipUrl":{"type":"string"},"durationMs":{"type":"number"},"providerJobId":{"type":"string"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"errorMessage":{"type":"string"},"provider":{"type":"string","enum":["kling","veo","runway"]},"usedProvider":{"type":"string","enum":["kling","veo","runway"]},"fallbackUsed":{"type":"boolean"},"fallbackReason":{"type":"string"}},"required":["id","jobId","orderIndex","status","progress"]}}},"required":["job","clips"]}}}},"400":{"description":"Invalid request or no frames to produce"},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"}}}},"/v1/studio/production/jobs/{jobId}":{"get":{"tags":["Studio Production"],"summary":"Get production job status","description":"Returns the job status with all clip statuses","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Job status retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"status":{"type":"string","enum":["pending","queued","processing","paused","complete","failed","cancelled"]},"provider":{"type":"string"},"totalClips":{"type":"number"},"completedClips":{"type":"number"},"failedClips":{"type":"number"},"progress":{"type":"number"},"currentStep":{"type":"string"},"estimatedTimeRemaining":{"type":"number"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"errorMessage":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","projectId","status","provider","totalClips","completedClips","failedClips","progress","createdAt"]},"clips":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"frameId":{"type":"string"},"orderIndex":{"type":"number"},"status":{"type":"string","enum":["pending","queued","generating","processing","retrying","paused","complete","failed","skipped","cancelled"]},"progress":{"type":"number"},"prompt":{"type":"string"},"referenceImageUrl":{"type":"string"},"generatedClipUrl":{"type":"string"},"durationMs":{"type":"number"},"providerJobId":{"type":"string"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"errorMessage":{"type":"string"},"provider":{"type":"string","enum":["kling","veo","runway"]},"usedProvider":{"type":"string","enum":["kling","veo","runway"]},"fallbackUsed":{"type":"boolean"},"fallbackReason":{"type":"string"}},"required":["id","jobId","orderIndex","status","progress"]}}},"required":["job","clips"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Job not found"}}}},"/v1/studio/production/clips/{clipId}":{"get":{"tags":["Studio Production"],"summary":"Get production clip status","description":"Returns the status of a single clip","parameters":[{"schema":{"type":"string"},"required":true,"name":"clipId","in":"path"}],"responses":{"200":{"description":"Clip status retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"clip":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"frameId":{"type":"string"},"orderIndex":{"type":"number"},"status":{"type":"string","enum":["pending","queued","generating","processing","retrying","paused","complete","failed","skipped","cancelled"]},"progress":{"type":"number"},"prompt":{"type":"string"},"referenceImageUrl":{"type":"string"},"generatedClipUrl":{"type":"string"},"durationMs":{"type":"number"},"providerJobId":{"type":"string"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"errorMessage":{"type":"string"},"provider":{"type":"string","enum":["kling","veo","runway"]},"usedProvider":{"type":"string","enum":["kling","veo","runway"]},"fallbackUsed":{"type":"boolean"},"fallbackReason":{"type":"string"}},"required":["id","jobId","orderIndex","status","progress"]}},"required":["clip"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Clip not found"}}}},"/v1/studio/projects/{projectId}/jobs":{"get":{"tags":["Studio Production"],"summary":"List production jobs for a project","description":"Returns all production jobs for a project","parameters":[{"schema":{"type":"string"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Jobs listed","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"status":{"type":"string","enum":["pending","queued","processing","paused","complete","failed","cancelled"]},"provider":{"type":"string"},"totalClips":{"type":"number"},"completedClips":{"type":"number"},"failedClips":{"type":"number"},"progress":{"type":"number"},"currentStep":{"type":"string"},"estimatedTimeRemaining":{"type":"number"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"errorMessage":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","projectId","status","provider","totalClips","completedClips","failedClips","progress","createdAt"]}},"total":{"type":"number"}},"required":["jobs","total"]}}}},"401":{"description":"Unauthorized"}}}},"/v1/studio/production/jobs/{jobId}/cancel":{"post":{"tags":["Studio Production"],"summary":"Cancel a production job","description":"Cancels a production job and all pending clips","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Job cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"status":{"type":"string","enum":["pending","queued","processing","paused","complete","failed","cancelled"]},"provider":{"type":"string"},"totalClips":{"type":"number"},"completedClips":{"type":"number"},"failedClips":{"type":"number"},"progress":{"type":"number"},"currentStep":{"type":"string"},"estimatedTimeRemaining":{"type":"number"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"errorMessage":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","projectId","status","provider","totalClips","completedClips","failedClips","progress","createdAt"]}},"required":["job"]}}}},"400":{"description":"Cannot cancel completed or failed job"},"401":{"description":"Unauthorized"},"404":{"description":"Job not found"}}}},"/v1/studio/production/jobs/{jobId}/progress":{"get":{"tags":["Studio Production"],"summary":"Get detailed job progress with segment breakdown","description":"Returns enhanced progress info with per-segment status, useful for parallel segment display","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Job progress retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"progress":{"type":"object","properties":{"jobId":{"type":"string"},"projectId":{"type":"string"},"status":{"type":"string","enum":["pending","queued","processing","paused","complete","failed","cancelled"]},"provider":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"segmentId":{"type":"string"},"segmentIndex":{"type":"number"},"status":{"type":"string","enum":["pending","processing","complete","failed"]},"totalClips":{"type":"number"},"completedClips":{"type":"number"},"failedClips":{"type":"number"},"currentClip":{"type":"object","properties":{"clipId":{"type":"string"},"orderIndex":{"type":"number"},"progress":{"type":"number"},"startedAt":{"type":"string"}},"required":["clipId","orderIndex","progress"]},"estimatedTimeRemaining":{"type":"number"}},"required":["segmentId","segmentIndex","status","totalClips","completedClips","failedClips","estimatedTimeRemaining"]}},"totalClips":{"type":"number"},"completedClips":{"type":"number"},"failedClips":{"type":"number"},"overallProgress":{"type":"number"},"estimatedTimeRemaining":{"type":"number"},"startedAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["jobId","projectId","status","provider","segments","totalClips","completedClips","failedClips","overallProgress","estimatedTimeRemaining","createdAt"]}},"required":["progress"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Job not found"}}}},"/v1/studio/production/clips/{clipId}/retry":{"post":{"tags":["Studio Production"],"summary":"Retry a failed clip","description":"Re-queues a failed clip for generation, optionally with a modified prompt","parameters":[{"schema":{"type":"string"},"required":true,"name":"clipId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"modifiedPrompt":{"type":"string"}}}}}},"responses":{"200":{"description":"Clip scheduled for retry","content":{"application/json":{"schema":{"type":"object","properties":{"clip":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"frameId":{"type":"string"},"orderIndex":{"type":"number"},"status":{"type":"string","enum":["pending","queued","generating","processing","retrying","paused","complete","failed","skipped","cancelled"]},"progress":{"type":"number"},"prompt":{"type":"string"},"referenceImageUrl":{"type":"string"},"generatedClipUrl":{"type":"string"},"durationMs":{"type":"number"},"providerJobId":{"type":"string"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"errorMessage":{"type":"string"},"provider":{"type":"string","enum":["kling","veo","runway"]},"usedProvider":{"type":"string","enum":["kling","veo","runway"]},"fallbackUsed":{"type":"boolean"},"fallbackReason":{"type":"string"}},"required":["id","jobId","orderIndex","status","progress"]},"message":{"type":"string"}},"required":["clip","message"]}}}},"400":{"description":"Clip cannot be retried (not in failed state)"},"401":{"description":"Unauthorized"},"404":{"description":"Clip not found"}}}},"/v1/studio/production/clips/{clipId}/skip":{"post":{"tags":["Studio Production"],"summary":"Skip a failed clip","description":"Marks a clip as skipped and continues with the next clip in the segment","parameters":[{"schema":{"type":"string"},"required":true,"name":"clipId","in":"path"}],"responses":{"200":{"description":"Clip skipped, continuing with next","content":{"application/json":{"schema":{"type":"object","properties":{"clip":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"frameId":{"type":"string"},"orderIndex":{"type":"number"},"status":{"type":"string","enum":["pending","queued","generating","processing","retrying","paused","complete","failed","skipped","cancelled"]},"progress":{"type":"number"},"prompt":{"type":"string"},"referenceImageUrl":{"type":"string"},"generatedClipUrl":{"type":"string"},"durationMs":{"type":"number"},"providerJobId":{"type":"string"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"errorMessage":{"type":"string"},"provider":{"type":"string","enum":["kling","veo","runway"]},"usedProvider":{"type":"string","enum":["kling","veo","runway"]},"fallbackUsed":{"type":"boolean"},"fallbackReason":{"type":"string"}},"required":["id","jobId","orderIndex","status","progress"]},"message":{"type":"string"},"nextClipId":{"type":"string"}},"required":["clip","message"]}}}},"400":{"description":"Clip cannot be skipped"},"401":{"description":"Unauthorized"},"404":{"description":"Clip not found"}}}},"/v1/studio/production/jobs/{jobId}/pause":{"post":{"tags":["Studio Production"],"summary":"Pause a production job","description":"Pauses all pending and generating clips in the job","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Job paused","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"status":{"type":"string","enum":["pending","queued","processing","paused","complete","failed","cancelled"]},"provider":{"type":"string"},"totalClips":{"type":"number"},"completedClips":{"type":"number"},"failedClips":{"type":"number"},"progress":{"type":"number"},"currentStep":{"type":"string"},"estimatedTimeRemaining":{"type":"number"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"errorMessage":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","projectId","status","provider","totalClips","completedClips","failedClips","progress","createdAt"]},"pausedClips":{"type":"number"}},"required":["job","pausedClips"]}}}},"400":{"description":"Job cannot be paused"},"401":{"description":"Unauthorized"},"404":{"description":"Job not found"}}}},"/v1/studio/production/jobs/{jobId}/resume":{"post":{"tags":["Studio Production"],"summary":"Resume a paused job","description":"Resumes processing of paused clips","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Job resumed","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"status":{"type":"string","enum":["pending","queued","processing","paused","complete","failed","cancelled"]},"provider":{"type":"string"},"totalClips":{"type":"number"},"completedClips":{"type":"number"},"failedClips":{"type":"number"},"progress":{"type":"number"},"currentStep":{"type":"string"},"estimatedTimeRemaining":{"type":"number"},"startedAt":{"type":"string"},"completedAt":{"type":"string"},"errorMessage":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","projectId","status","provider","totalClips","completedClips","failedClips","progress","createdAt"]},"resumedClips":{"type":"number"}},"required":["job","resumedClips"]}}}},"400":{"description":"Job is not paused"},"401":{"description":"Unauthorized"},"404":{"description":"Job not found"}}}},"/v1/studio/production/veo/generate-scene":{"post":{"tags":["VEO Scene Generation"],"summary":"Generate a video scene with VEO 3.1","description":"\n    Generates a video scene using VEO 3.1 with support for:\n    - First/last frame interpolation for smooth transitions\n    - Native dialogue audio generation\n    - 4, 6, or 8 second durations\n  ","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"Scene visual prompt describing what should happen","example":"A charismatic host demonstrates the product with excitement"},"firstFrameUrl":{"type":"string","format":"uri","description":"URL to the first frame image for image-to-video with interpolation"},"lastFrameUrl":{"type":"string","format":"uri","description":"URL to the last frame image for smooth scene transitions"},"dialogue":{"type":"string","description":"Spoken dialogue to be embedded in native audio","example":"Are you tired of stubborn stains? We have the solution!"},"durationSeconds":{"type":"number","minimum":4,"maximum":8,"default":8,"description":"Scene duration (VEO supports 4, 6, or 8 seconds)"},"aspectRatio":{"type":"string","enum":["16:9","9:16"],"default":"16:9"},"resolution":{"type":"string","enum":["720p","1080p","4k"],"default":"1080p"},"generateAudio":{"type":"boolean","default":true,"description":"Generate native audio with dialogue"},"negativePrompt":{"type":"string","description":"What to avoid in the generation"}},"required":["prompt"]}}}},"responses":{"200":{"description":"Scene generation complete","content":{"application/json":{"schema":{"type":"object","properties":{"providerJobId":{"type":"string","description":"VEO operation name for status polling"},"videoUrl":{"type":"string","description":"URL to the generated video"},"durationMs":{"type":"number","description":"Video duration in milliseconds"}},"required":["providerJobId","videoUrl","durationMs"]}}}},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"},"429":{"description":"Rate limited"},"500":{"description":"Generation failed"}}}},"/v1/studio/production/veo/extend-video":{"post":{"tags":["VEO Scene Generation"],"summary":"Extend a VEO-generated video","description":"\n    Extends a previously generated video by chaining a new scene.\n    Each extension can add up to 7 seconds, with a maximum total of 148 seconds.\n  ","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"previousVideoId":{"type":"string","description":"VEO operation name from previous generation to extend"},"prompt":{"type":"string","minLength":1,"description":"Prompt for the extension segment"},"dialogue":{"type":"string","description":"Continued dialogue for the extension"},"extensionSeconds":{"type":"number","minimum":1,"maximum":7,"default":7,"description":"Extension duration (max 7 seconds per call)"},"resolution":{"type":"string","enum":["720p","1080p","4k"],"default":"1080p"}},"required":["previousVideoId","prompt"]}}}},"responses":{"200":{"description":"Video extension complete","content":{"application/json":{"schema":{"type":"object","properties":{"providerJobId":{"type":"string","description":"VEO operation name for the extended video"},"videoUrl":{"type":"string","description":"URL to the extended video"},"totalDurationMs":{"type":"number","description":"Total video duration after extension"}},"required":["providerJobId","videoUrl","totalDurationMs"]}}}},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"},"404":{"description":"Previous video not found"},"429":{"description":"Rate limited"},"500":{"description":"Extension failed"}}}},"/v1/studio/production/veo/status/{operationId}":{"get":{"tags":["VEO Scene Generation"],"summary":"Get VEO job status","description":"Poll for the status of a VEO generation job","parameters":[{"schema":{"type":"string","description":"VEO operation name"},"required":true,"description":"VEO operation name","name":"operationId","in":"path"}],"responses":{"200":{"description":"Job status","content":{"application/json":{"schema":{"type":"object","properties":{"operationId":{"type":"string"},"status":{"type":"string","enum":["processing","complete","failed"]},"progress":{"type":"number","minimum":0,"maximum":100},"videoUrl":{"type":"string"},"error":{"type":"string"}},"required":["operationId","status","progress"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Job not found"}}}},"/v1/studio/production/veo/cancel/{operationId}":{"post":{"tags":["VEO Scene Generation"],"summary":"Cancel a VEO job","description":"Cancel an in-progress VEO generation job","parameters":[{"schema":{"type":"string"},"required":true,"name":"operationId","in":"path"}],"responses":{"200":{"description":"Job cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Job not found"}}}},"/v1/studio/production/kling/generate-scene":{"post":{"tags":["Kling Scene Generation"],"summary":"Generate a video scene with Kling AI","description":"\n    Generates a video scene using Kling AI with support for:\n    - Text-to-video or image-to-video generation\n    - 5 or 10 second durations\n    - 16:9, 9:16, or 1:1 aspect ratios\n  ","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"description":"Scene visual prompt describing what should happen","example":"A charismatic host demonstrates the product with excitement"},"referenceImageUrl":{"type":"string","format":"uri","description":"URL to reference image for image-to-video generation"},"durationSeconds":{"type":"number","minimum":5,"maximum":10,"default":5,"description":"Scene duration (Kling supports 5 or 10 seconds)"},"aspectRatio":{"type":"string","enum":["16:9","9:16","1:1"],"default":"16:9"},"negativePrompt":{"type":"string","description":"What to avoid in the generation"}},"required":["prompt"]}}}},"responses":{"200":{"description":"Scene generation complete","content":{"application/json":{"schema":{"type":"object","properties":{"providerJobId":{"type":"string","description":"Kling task ID for status polling"},"videoUrl":{"type":"string","description":"URL to the generated video"},"durationMs":{"type":"number","description":"Video duration in milliseconds"}},"required":["providerJobId","videoUrl","durationMs"]}}}},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"},"429":{"description":"Rate limited"},"500":{"description":"Generation failed"}}}},"/v1/studio/production/kling/status/{taskId}":{"get":{"tags":["Kling Scene Generation"],"summary":"Get Kling job status","description":"Poll for the status of a Kling generation job","parameters":[{"schema":{"type":"string","description":"Kling task ID"},"required":true,"description":"Kling task ID","name":"taskId","in":"path"}],"responses":{"200":{"description":"Job status","content":{"application/json":{"schema":{"type":"object","properties":{"taskId":{"type":"string"},"status":{"type":"string","enum":["pending","processing","complete","failed"]},"progress":{"type":"number","minimum":0,"maximum":100},"videoUrl":{"type":"string"},"error":{"type":"string"}},"required":["taskId","status","progress"]}}}},"401":{"description":"Unauthorized"},"404":{"description":"Job not found"}}}}},"webhooks":{}}