{"openapi":"3.0.3","info":{"title":"Viral View API","version":"2026-08-08","description":"Public remix workflow API for paid Viral View accounts. Runtime base URL is https://app.viralview.io. Bearer keys use the vv_live_ prefix. 429 responses include Retry-After and RateLimit headers."},"servers":[{"url":"https://app.viralview.io"}],"paths":{"/api/ugc/project":{"get":{"operationId":"projectListOrGet","summary":"List projects, load one project, or list reusable character candidates.","description":"List projects, load one project, or list reusable character candidates.","security":[{"bearerAuth":[]}],"parameters":[{"name":"ProjectGetRequest","in":"query","required":false,"description":"Query fields described by ProjectGetRequest.","schema":{"$ref":"#/components/schemas/ProjectGetRequest"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectGetResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"projectSave","summary":"Create or update an owned project.","description":"Create or update an owned project.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSaveResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSaveRequest"}}}}},"delete":{"operationId":"projectDelete","summary":"Delete an owned project.","description":"Delete an owned project.","security":[{"bearerAuth":[]}],"parameters":[{"name":"ProjectDeleteRequest","in":"query","required":false,"description":"Query fields described by ProjectDeleteRequest.","schema":{"$ref":"#/components/schemas/ProjectDeleteRequest"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/ugc/scan-product":{"post":{"operationId":"scanProduct","summary":"Extract editable product facts and import the main product image.","description":"Extract editable product facts and import the main product image.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductScanResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductScanRequest"}}}}}},"/api/ugc/extract-video":{"post":{"operationId":"extractVideoStart","summary":"Start extraction of a supported video link.","description":"Start extraction of a supported video link.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionStartResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionStartRequest"}}}}},"get":{"operationId":"extractVideoStatus","summary":"Poll an owned extraction job.","description":"Poll an owned extraction job.","security":[{"bearerAuth":[]}],"parameters":[{"name":"JobIdQuery","in":"query","required":false,"description":"Query fields described by JobIdQuery.","schema":{"$ref":"#/components/schemas/JobIdQuery"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionStatusResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"extractVideoCancel","summary":"Cancel an owned extraction job.","description":"Cancel an owned extraction job.","security":[{"bearerAuth":[]}],"parameters":[{"name":"JobIdQuery","in":"query","required":false,"description":"Query fields described by JobIdQuery.","schema":{"$ref":"#/components/schemas/JobIdQuery"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionCancelResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/ugc/analyze-video":{"post":{"operationId":"analyzeVideo","summary":"Analyze a source video or refine approved scene cuts.","description":"Analyze a source video or refine approved scene cuts. May stream as text/event-stream.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeVideoResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeVideoRequest"}}}}}},"/api/ugc/rewrite-script":{"post":{"operationId":"rewriteScript","summary":"Rewrite source dialogue for the target product or fit one scene.","description":"Rewrite source dialogue for the target product or fit one scene. May stream as text/event-stream.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewriteScriptResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewriteScriptRequest"}}}}}},"/api/ugc/generate-script":{"post":{"operationId":"generateScript","summary":"Generate a structured multi-scene target-product script.","description":"Generate a structured multi-scene target-product script.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateScriptResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateScriptRequest"}}}}}},"/api/ugc/describe-character-frame":{"post":{"operationId":"describeCharacterFrame","summary":"Prepare a privacy-preserving fictional character prompt from a source frame.","description":"Prepare a privacy-preserving fictional character prompt from a source frame.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DescribeCharacterResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DescribeCharacterRequest"}}}}}},"/api/ugc/lock-character":{"post":{"operationId":"lockCharacter","summary":"Create a reusable lock from the selected character image.","description":"Create a reusable lock from the selected character image.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockCharacterResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockCharacterRequest"}}}}}},"/api/ugc/prepare-character-identity-ref":{"post":{"operationId":"prepareCharacterIdentity","summary":"Mirror the selected character into a stable owned identity reference.","description":"Mirror the selected character into a stable owned identity reference.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityReferenceResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageUrlRequest"}}}}}},"/api/ugc/describe-source-frame":{"post":{"operationId":"describeSourceFrame","summary":"Build a source-scene reconstruction brief without starting generation.","description":"Build a source-scene reconstruction brief without starting generation. May stream as application/x-ndjson.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DescribeSourceFrameResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DescribeSourceFrameRequest"}}}}}},"/api/ugc/check-remade-frame":{"post":{"operationId":"checkRemadeFrame","summary":"Compare a remade frame against the locked character and source scene.","description":"Compare a remade frame against the locked character and source scene.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameCheckResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameCheckRequest"}}}}}},"/api/ugc/enhance-character-edit-prompt":{"post":{"operationId":"enhanceCharacterEdit","summary":"Turn a rough character edit into a bounded image-edit instruction.","description":"Turn a rough character edit into a bounded image-edit instruction.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnhanceEditRequest"}}}}}},"/api/ugc/generate-overlay":{"post":{"operationId":"imageGenerate","summary":"Submit one approved paid character or frame image job.","description":"Submit one approved paid character or frame image job. Paid generation: start only after an explicit human yes.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerateResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerateRequest"}}}}},"get":{"operationId":"imageStatus","summary":"Poll one image job without spending again.","description":"Poll one image job without spending again.","security":[{"bearerAuth":[]}],"parameters":[{"name":"ImageStatusRequest","in":"query","required":false,"description":"Query fields described by ImageStatusRequest.","schema":{"$ref":"#/components/schemas/ImageStatusRequest"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageStatusResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/ugc/generate-kling":{"post":{"operationId":"klingVideo","summary":"Alias for the video generate or check operation.","description":"Alias for the video generate or check operation. Paid when request.action == 'generate'.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJobResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJobRequest"}}}}}},"/api/ugc/generate-veo":{"post":{"operationId":"veoVideo","summary":"Submit an approved paid video job or poll an existing task.","description":"Submit an approved paid video job or poll an existing task. Paid when request.action == 'generate'.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJobResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJobRequest"}}}}}},"/api/ugc/stitch-videos":{"post":{"operationId":"stitchStart","summary":"Create a synchronous or asynchronous final export.","description":"Create a synchronous or asynchronous final export.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StitchResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StitchRequest"}}}}},"get":{"operationId":"stitchStatus","summary":"Poll an owned asynchronous export.","description":"Poll an owned asynchronous export.","security":[{"bearerAuth":[]}],"parameters":[{"name":"JobIdQuery","in":"query","required":false,"description":"Query fields described by JobIdQuery.","schema":{"$ref":"#/components/schemas/JobIdQuery"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StitchStatusResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/ugc/ad-library":{"get":{"operationId":"adLibraryList","summary":"Search and page through approved source ads.","description":"Search and page through approved source ads.","security":[{"bearerAuth":[]}],"parameters":[{"name":"AdLibraryQuery","in":"query","required":false,"description":"Query fields described by AdLibraryQuery.","schema":{"$ref":"#/components/schemas/AdLibraryQuery"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdLibraryResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/ugc/ad-library/{id}":{"get":{"operationId":"adLibraryItem","summary":"Load one approved source ad and its signed video URL.","description":"Load one approved source ad and its signed video URL.","security":[{"bearerAuth":[]}],"parameters":[{"name":"AdLibraryItemRequest","in":"query","required":false,"description":"Query fields described by AdLibraryItemRequest.","schema":{"$ref":"#/components/schemas/AdLibraryItemRequest"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdLibraryItemResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/ugc/kie-balance":{"get":{"operationId":"balance","summary":"Read the account's generation-provider credit balance.","description":"Read the account's generation-provider credit balance.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/ugc/kie-status":{"get":{"operationId":"providerStatus","summary":"Check generation-provider endpoint reachability.","description":"Check generation-provider endpoint reachability.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderStatusResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/ugc/redo-captions":{"post":{"operationId":"redoCaptions","summary":"Transcribe owned generated scene videos into word-level captions.","description":"Transcribe owned generated scene videos into word-level captions.","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedoCaptionsResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedoCaptionsRequest"}}}}}},"/api/ugc/usage":{"get":{"operationId":"usage","summary":"List recent owner-scoped generation and export usage.","description":"List recent owner-scoped generation and export usage.","security":[{"bearerAuth":[]}],"parameters":[{"name":"UsageQuery","in":"query","required":false,"description":"Query fields described by UsageQuery.","schema":{"$ref":"#/components/schemas/UsageQuery"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResponse"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"vv_live_"}},"schemas":{"EmptyRequest":{"type":"object","additionalProperties":false},"SuccessResponse":{"type":"object","required":["success"],"properties":{"success":{"const":true}},"additionalProperties":true},"ErrorResponse":{"type":"object","required":["error"],"properties":{"success":{"type":"boolean"},"error":{"type":"string"},"code":{"type":"string"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"number"}},"additionalProperties":true},"Project":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"step":{"type":["number","null"]},"created_at":{"type":["number","null"]},"updated_at":{"type":["number","null"]}},"additionalProperties":true},"ProjectGetRequest":{"type":"object","properties":{"id":{"type":"string"},"characterLibrary":{"enum":["1"]}},"additionalProperties":false},"ProjectGetResponse":{"type":"object","required":["success"],"properties":{"success":{"const":true},"project":{"$ref":"#/schemas/Project"},"projects":{"type":"array","items":{"$ref":"#/schemas/Project"}},"characterCandidates":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":false},"ProjectSaveRequest":{"type":"object","properties":{"id":{"type":"string"},"clientSaveSessionId":{"type":"string","maxLength":100},"clientRevision":{"type":"integer","minimum":1}},"additionalProperties":true},"ProjectSaveResponse":{"type":"object","required":["success","project"],"properties":{"success":{"const":true},"clientSaveSessionId":{"type":["string","null"]},"clientRevision":{"type":["integer","null"]},"project":{"$ref":"#/schemas/Project"}},"additionalProperties":false},"ProjectDeleteRequest":{"type":"object","required":["id"],"properties":{"id":{"type":"string"}},"additionalProperties":false},"ProductScanRequest":{"type":"object","required":["productUrl"],"properties":{"productUrl":{"type":"string","format":"uri"}},"additionalProperties":false},"Product":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"benefits":{"type":"array","items":{"type":"string"}},"imageUrl":{"type":"string"},"price":{"type":"string"},"brand":{"type":"string"}},"additionalProperties":true},"ProductScanResponse":{"type":"object","required":["success","product","source","imageWarning"],"properties":{"success":{"const":true},"product":{"$ref":"#/schemas/Product"},"source":{"const":"ai"},"imageWarning":{"type":"string"}},"additionalProperties":false},"ExtractionStartRequest":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}},"additionalProperties":false},"ExtractionStartResponse":{"type":"object","required":["success","jobId","status"],"properties":{"success":{"const":true},"jobId":{"type":"string"},"status":{"enum":["queued","extracting","storing"]},"deduplicated":{"type":"boolean"}},"additionalProperties":false},"JobIdQuery":{"type":"object","required":["jobId"],"properties":{"jobId":{"type":"string"}},"additionalProperties":false},"ExtractionStatusResponse":{"type":"object","required":["success","status","jobId"],"properties":{"success":{"type":"boolean"},"status":{"enum":["queued","extracting","storing","done","failed","cancelled"]},"jobId":{"type":"string"},"progress":{"type":"number"},"phase":{"type":"string"},"videoUrl":{"type":"string"},"durationSec":{"type":"number"},"sizeBytes":{"type":"integer"},"code":{"type":"string"},"error":{"type":"string"}},"additionalProperties":false},"ExtractionCancelResponse":{"type":"object","required":["success","status","jobId"],"properties":{"success":{"const":true},"status":{"const":"cancelled"},"jobId":{"type":"string"}},"additionalProperties":false},"AnalysisFrame":{"type":"object","required":["url","timestamp"],"properties":{"url":{"type":"string"},"timestamp":{"type":"number","minimum":0}},"additionalProperties":false},"AnalyzeVideoRequest":{"type":"object","properties":{"videoUrl":{"type":"string"},"videoSourceKind":{"enum":["upload","direct","link","library","meta"]},"videoSourceLibraryId":{"type":"string"},"analysisFrames":{"type":"array","maxItems":16,"items":{"$ref":"#/schemas/AnalysisFrame"}},"analysisFrameUrls":{"type":"array","maxItems":16,"items":{"type":"string"}},"existingTranscript":{"type":["object","null"],"additionalProperties":true},"cacheOnly":{"type":"boolean"},"mode":{"enum":["refine-scenes"]},"sceneCuts":{"type":"array","items":{"type":"number"}},"analysisData":{"type":"object","additionalProperties":true},"experienceVersion":{"type":"number"}},"additionalProperties":false},"AnalyzeVideoResponse":{"type":"object","required":["success"],"properties":{"success":{"const":true},"analysis":{"type":"object","additionalProperties":true},"scenes":{"type":"array","items":{"type":"object","additionalProperties":true}},"resolvedVideoUrl":{"type":"string"},"cacheHit":{"type":"boolean"}},"additionalProperties":true},"RewriteScriptRequest":{"type":"object","properties":{"text":{"type":"string"},"sceneDialogues":{"type":"object","additionalProperties":{"type":"string"}},"scenes":{"type":"array","items":{"type":"object","additionalProperties":true}},"productName":{"type":"string"},"productDescription":{"type":"string"},"sourceKind":{"type":"string"},"mode":{"enum":["","expand-scene-dialogue","fit-scene-dialogue"]},"targetSceneNumber":{"type":"number"},"targetWordCount":{"type":"number"}},"additionalProperties":false},"RewriteScriptResponse":{"type":"object","required":["success","provider"],"properties":{"success":{"const":true},"provider":{"type":"string"},"transcript":{"type":"string"},"dialogue":{"type":"string"},"sceneDialogues":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"GenerateScriptRequest":{"type":"object","required":["analysis"],"properties":{"analysis":{"type":"object","additionalProperties":true},"customization":{"type":"object","properties":{"productName":{"type":"string"},"productDescription":{"type":"string"},"productImageUrl":{"type":"string"},"targetLanguage":{"type":"string"},"characterAdjustments":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"GenerateScriptResponse":{"type":"object","required":["success","script"],"properties":{"success":{"const":true},"script":{"type":"object","additionalProperties":true}},"additionalProperties":false},"ImageUrlRequest":{"type":"object","required":["imageUrl"],"properties":{"imageUrl":{"type":"string"}},"additionalProperties":false},"DescribeCharacterRequest":{"type":"object","required":["imageUrl"],"properties":{"imageUrl":{"type":"string"},"variationHint":{"type":"string"},"sourceCastingHint":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"DescribeCharacterResponse":{"type":"object","required":["success","sourceBrief","generationPrompt","provider"],"properties":{"success":{"const":true},"sourceBrief":{"type":"object","additionalProperties":true},"generationPrompt":{"type":"string"},"provider":{"type":"string"}},"additionalProperties":false},"LockCharacterRequest":{"type":"object","required":["imageUrl"],"properties":{"imageUrl":{"type":"string"},"promptDraft":{"type":"string"}},"additionalProperties":false},"LockCharacterResponse":{"type":"object","required":["success","lock","actorLabel","traits"],"properties":{"success":{"const":true},"lock":{"type":"string"},"actorLabel":{"type":"string"},"traits":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"IdentityReferenceResponse":{"type":"object","required":["success","imageUrl","crop"],"properties":{"success":{"const":true},"imageUrl":{"type":"string"},"crop":{"type":"null"}},"additionalProperties":false},"DescribeSourceFrameRequest":{"type":"object","required":["imageUrl"],"properties":{"imageUrl":{"type":"string"},"sceneNumber":{"type":"number"},"frameType":{"type":"string"},"streamProgress":{"type":"boolean"}},"additionalProperties":false},"DescribeSourceFrameResponse":{"type":"object","required":["success","sourceFrameBrief","finalGenerationPrompt","sourceFrameFingerprint"],"properties":{"success":{"const":true},"provider":{"type":"string"},"sourceFrameBrief":{"type":"string"},"finalGenerationPrompt":{"type":"string"},"sourceFrameFingerprint":{"type":"object","additionalProperties":true},"clothing":{"type":"string"},"clothingColorRead":{"type":"string"},"visibleTextToRemove":{"type":"array","items":{"type":"string"}},"actionBeat":{"type":"string"},"camera":{"type":"string"},"cameraGeometry":{"type":"string"},"foregroundAnchors":{"type":"string"},"perspectiveAnchors":{"type":"string"},"layoutMap":{"type":"string"},"subjectPlacement":{"type":"string"},"gaze":{"type":"string"},"hipPose":{"type":"string"},"armPose":{"type":"string"},"environment":{"type":"string"}},"additionalProperties":false},"FrameCheckRequest":{"type":"object","required":["sourceUrl","characterUrl","remadeUrl"],"properties":{"sourceUrl":{"type":"string"},"characterUrl":{"type":"string"},"remadeUrl":{"type":"string"},"lock":{"type":"string"},"sceneNumber":{"type":"number"},"frameType":{"type":"string"}},"additionalProperties":false},"FrameCheckResponse":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean"},"pass":{"type":"boolean"},"confidence":{"type":"number","minimum":0,"maximum":1},"issues":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"},"qaUnavailable":{"type":"boolean"},"error":{"type":"string"}},"additionalProperties":false},"EnhanceEditRequest":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string"},"productName":{"type":"string"},"productDescription":{"type":"string"}},"additionalProperties":false},"PromptResponse":{"type":"object","required":["success","prompt"],"properties":{"success":{"const":true},"prompt":{"type":"string"}},"additionalProperties":false},"ImageGenerateRequest":{"type":"object","required":["prompt","aspectRatio","model"],"properties":{"prompt":{"type":"string"},"aspectRatio":{"type":"string"},"referenceImageUrl":{"type":"string"},"referenceImageUrls":{"type":"array","maxItems":3,"items":{"type":"string"}},"model":{"type":"string"},"requestId":{"type":"string","maxLength":128},"usageKind":{"enum":["character","frame"]}},"additionalProperties":false},"ImageGenerateResponse":{"type":"object","required":["success","taskId","model"],"properties":{"success":{"const":true},"taskId":{"type":"string"},"model":{"type":"string"},"promptAdapted":{"type":"boolean"},"recovered":{"type":"boolean"}},"additionalProperties":true},"ImageStatusRequest":{"type":"object","required":["taskId"],"properties":{"taskId":{"type":"string"},"sourceImageUrl":{"type":"string"}},"additionalProperties":false},"ImageStatusResponse":{"type":"object","required":["success","status"],"properties":{"success":{"type":"boolean"},"status":{"enum":["processing","success","failed","unchanged","save_failed"]},"progress":{"type":["number","null"]},"imageUrl":{"type":"string"},"creditsConsumed":{"type":["number","string","null"]},"retryable":{"type":"boolean"},"error":{"type":"string"}},"additionalProperties":true},"VideoJobRequest":{"type":"object","required":["action"],"properties":{"action":{"enum":["generate","check"]},"taskId":{"type":"string"},"prompt":{"type":"string"},"aspectRatio":{"type":"string"},"videoModel":{"enum":["kling-v3-turbo","grok-imagine-video-1-5","seedance-2-mini","kling-3","seedance-2","gemini-omni-video"]},"quality":{"enum":["480p","720p","1080p","4k"]},"imageUrls":{"type":"array","maxItems":1,"items":{"type":"string"}},"videoUrl":{"type":"string"},"videoUrls":{"type":"array","maxItems":1,"items":{"type":"string"}},"durationSeconds":{"type":"number","minimum":3,"maximum":10},"sound":{"type":"boolean"},"dialogue":{"type":"string"}},"additionalProperties":false},"VideoJobResponse":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean"},"taskId":{"type":"string"},"done":{"type":"boolean"},"state":{"type":"string"},"progress":{"type":["number","null"]},"videos":{"type":"array","items":{"type":"object","required":["uri","mimeType"],"properties":{"uri":{"type":"string"},"mimeType":{"const":"video/mp4"}},"additionalProperties":false}},"creditsConsumed":{"type":["number","string","null"]},"error":{"type":"string"}},"additionalProperties":true},"StitchRequest":{"type":"object","properties":{"scenes":{"type":"array","minItems":1,"maxItems":30,"items":{"type":"object","additionalProperties":true}},"videoUrls":{"type":"array","minItems":1,"maxItems":30,"items":{"type":"string"}},"previewOnly":{"type":"boolean"},"preset":{"enum":["fast","final"]},"timelineGraph":{"type":"object","additionalProperties":true},"renderSignature":{"type":"string"},"async":{"type":"boolean"}},"additionalProperties":true},"StitchResponse":{"type":"object","required":["success"],"properties":{"success":{"const":true},"async":{"type":"boolean"},"jobId":{"type":"string"},"status":{"type":"string"},"videoUrl":{"type":"string"},"timelineGraphSignature":{"type":"string"}},"additionalProperties":true},"StitchStatusResponse":{"type":"object","required":["success"],"properties":{"success":{"const":true},"status":{"type":"string"},"progress":{"type":"number"},"videoUrl":{"type":"string"},"duration":{"type":"number"},"sizeBytes":{"type":"number"}},"additionalProperties":true},"AdLibraryQuery":{"type":"object","properties":{"query":{"type":"string","maxLength":100},"sourcePlatform":{"enum":["meta_ads","tiktok_shop"]},"tiktokShopCategory":{"type":"string","maxLength":100},"niche":{"type":"string","maxLength":100},"format":{"type":"string","maxLength":100},"style":{"type":"string","maxLength":100},"limit":{"type":"integer","minimum":1,"maximum":24},"cursor":{"type":"string","maxLength":600}},"additionalProperties":false},"AdLibraryResponse":{"type":"object","required":["success","manifestVersion","items","tiktokShopCategories","niches","formats","styles","nextCursor"],"properties":{"success":{"const":true},"manifestVersion":{"type":"string"},"items":{"type":"array","items":{"type":"object","required":["id","title","source","sourcePlatform","style","why","durationSec","posterUrl"],"additionalProperties":true}},"tiktokShopCategories":{"type":"array","items":{"type":"string"}},"niches":{"type":"array","items":{"type":"string"}},"formats":{"type":"array","items":{"type":"string"}},"styles":{"type":"array","items":{"type":"string"}},"nextCursor":{"type":["string","null"]}},"additionalProperties":false},"AdLibraryItemRequest":{"type":"object","required":["id"],"properties":{"id":{"type":"string","pattern":"^[a-f0-9]{24}$"}},"additionalProperties":false},"AdLibraryItemResponse":{"type":"object","required":["success","manifestVersion","item"],"properties":{"success":{"const":true},"manifestVersion":{"type":"string"},"item":{"type":"object","required":["id","title","videoPath","videoUrl"],"additionalProperties":true}},"additionalProperties":false},"BalanceResponse":{"type":"object","required":["success","credits","usd","checkedAt"],"properties":{"success":{"const":true},"credits":{"type":"number"},"usd":{"type":"number"},"checkedAt":{"type":"string","format":"date-time"}},"additionalProperties":false},"ProviderStatusResponse":{"type":"object","required":["success","status","checkedAt","message","checks"],"properties":{"success":{"const":true},"status":{"enum":["online","down"]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":"string"},"checks":{"type":"array","items":{"type":"object","required":["name","ok","latencyMs"],"additionalProperties":true}}},"additionalProperties":false},"RedoCaptionsRequest":{"type":"object","required":["scenes"],"properties":{"scenes":{"type":"array","minItems":1,"items":{"type":"object","required":["sceneNumber","videoUrl"],"properties":{"sceneNumber":{"type":"number"},"videoUrl":{"type":"string"},"sourceDuration":{"type":"number"},"expectedText":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false},"RedoCaptionsResponse":{"type":"object","required":["success","source","provider","model","captions"],"properties":{"success":{"const":true},"source":{"const":"audio-word"},"provider":{"type":"string"},"model":{"type":"string"},"captions":{"type":"array","items":{"type":"object","additionalProperties":true}}},"additionalProperties":false},"UsageQuery":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false},"UsageResponse":{"type":"object","required":["success","events"],"properties":{"success":{"const":true},"events":{"type":"array","maxItems":100,"items":{"type":"object","required":["timestamp","kind","model","sceneCount","costBasis"],"properties":{"timestamp":{"type":"string","format":"date-time"},"kind":{"enum":["character","frame","video","export"]},"model":{"type":["string","null"]},"sceneCount":{"type":["integer","null"]},"costBasis":{"oneOf":[{"type":"null"},{"type":"object","required":["amount","unit","source"],"properties":{"amount":{"type":"number","minimum":0},"unit":{"const":"credits"},"source":{"const":"provider_reported"}},"additionalProperties":false}]}},"additionalProperties":false}}},"additionalProperties":false}},"responses":{"Error":{"description":"Structured JSON error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimited":{"description":"Rate limited","headers":{"Retry-After":{"schema":{"type":"integer"}},"RateLimit":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}