{"openapi":"3.1.0","info":{"title":"BibiGPT OpenAPI 规范","description":"音视频 AI 学习助理的开放 API，加速音视频内容的信息提取，借助 AI 直接采取行动。","version":"1.1.0"},"servers":[{"url":"https://api.bibigpt.co/api"}],"externalDocs":{"url":"https://docs.bibigpt.co/api"},"paths":{"/version":{"get":{"operationId":"version","summary":"Get the version of the API","tags":["open"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/expandUrl":{"get":{"operationId":"expandUrl","summary":"Expand shortened video or audio URLs","tags":["open"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"url","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"costDuration":{"type":"number"},"remainingTime":{"type":"number"}},"required":["url"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/summarize":{"get":{"operationId":"summarize","summary":"Generate video or audio summary from url","tags":["open"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"url","schema":{"type":"string","description":"The URL to the video (e.g., ?url=https://www.bilibili.com/video/BV1Sk4y1x7r2)"},"required":true,"description":"The URL to the video (e.g., ?url=https://www.bilibili.com/video/BV1Sk4y1x7r2)"},{"in":"query","name":"includeDetail","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string"},"service":{"type":"string"},"sourceUrl":{"type":"string"},"htmlUrl":{"type":"string"},"summary":{"type":"string"},"costDuration":{"type":"number"},"remainingTime":{"type":"number"},"billingNote":{"type":"string"},"detail":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string"},"dbId":{"type":"string"},"id":{"type":"string"},"embedId":{"type":"string"},"pageId":{"type":"string"},"url":{"type":"string"},"rawLang":{"type":"string"},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"type":{"type":"string","enum":["bilibili","youtube","podcast","douyin","tiktok","wechat-channels","online-media","url-media","import-file","local-video","local-audio","record-audio","local-subtitle","webpage","meeting"]},"title":{"type":"string"},"cover":{"type":"string"},"author":{"type":"string"},"authorId":{"type":"string"},"duration":{"type":"number"},"publishedDate":{},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"descriptionText":{"type":"string"},"contentText":{"type":"string"},"aiImages":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number"},"endTime":{"type":"number"},"image":{"type":"string"},"prompt":{"type":"string"}},"required":["startTime","endTime","prompt"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"local_path":{"type":"string"},"status":{"type":"string"},"isPaid":{"type":"boolean"},"isPreviewOnly":{"type":"boolean"},"sourceLevel":{"type":"string","enum":["guest","authenticated","transcribed"]}},"required":["id","url","type","title","duration"],"additionalProperties":false},{"type":"object","properties":{"dbId":{"type":"string"},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"videoUrl":{"type":"string"},"title":{"type":"string"},"cover":{"type":"string"},"duration":{"type":"number"},"subtitleUrl":{"type":"string"},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"description":{"type":"string"},"format":{"type":"string"},"author":{"type":"string"},"publishedDate":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"rawUrl":{"type":"string"},"rawHtml":{"type":"string"}},"required":["audioUrl","title","cover","duration","description","format","content","rawUrl","rawHtml"],"additionalProperties":false}]}},"required":["success","id","service","sourceUrl","htmlUrl","costDuration","remainingTime"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"summarizeViaPost","summary":"Generate video or audio summary from url (POST variant for agent payment)","tags":["open"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"The URL to the video (e.g., ?url=https://www.bilibili.com/video/BV1Sk4y1x7r2)"},"includeDetail":{"description":"Include audio, video or media webpage detail in response","type":"boolean"}},"required":["url"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string"},"service":{"type":"string"},"sourceUrl":{"type":"string"},"htmlUrl":{"type":"string"},"summary":{"type":"string"},"costDuration":{"type":"number"},"remainingTime":{"type":"number"},"billingNote":{"type":"string"},"detail":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string"},"dbId":{"type":"string"},"id":{"type":"string"},"embedId":{"type":"string"},"pageId":{"type":"string"},"url":{"type":"string"},"rawLang":{"type":"string"},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"type":{"type":"string","enum":["bilibili","youtube","podcast","douyin","tiktok","wechat-channels","online-media","url-media","import-file","local-video","local-audio","record-audio","local-subtitle","webpage","meeting"]},"title":{"type":"string"},"cover":{"type":"string"},"author":{"type":"string"},"authorId":{"type":"string"},"duration":{"type":"number"},"publishedDate":{},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"descriptionText":{"type":"string"},"contentText":{"type":"string"},"aiImages":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number"},"endTime":{"type":"number"},"image":{"type":"string"},"prompt":{"type":"string"}},"required":["startTime","endTime","prompt"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"local_path":{"type":"string"},"status":{"type":"string"},"isPaid":{"type":"boolean"},"isPreviewOnly":{"type":"boolean"},"sourceLevel":{"type":"string","enum":["guest","authenticated","transcribed"]}},"required":["id","url","type","title","duration"],"additionalProperties":false},{"type":"object","properties":{"dbId":{"type":"string"},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"videoUrl":{"type":"string"},"title":{"type":"string"},"cover":{"type":"string"},"duration":{"type":"number"},"subtitleUrl":{"type":"string"},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"description":{"type":"string"},"format":{"type":"string"},"author":{"type":"string"},"publishedDate":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"rawUrl":{"type":"string"},"rawHtml":{"type":"string"}},"required":["audioUrl","title","cover","duration","description","format","content","rawUrl","rawHtml"],"additionalProperties":false}]}},"required":["success","id","service","sourceUrl","htmlUrl","costDuration","remainingTime"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/summarizeWithConfig":{"post":{"operationId":"summarizeWithConfig","summary":"Generate configurable summary from url based on prompt config","tags":["open"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"The URL to the video (e.g., ?url=https://www.bilibili.com/video/BV1Sk4y1x7r2)"},"includeDetail":{"description":"Include audio, video or media webpage detail in response","type":"boolean"},"promptConfig":{"type":"object","properties":{"customPrompt":{"type":"string"},"outputLanguage":{"type":"string"},"autoTranslateLanguage":{"type":"string"},"showEmoji":{"type":"boolean"},"detailLevel":{"type":"number"},"sentenceNumber":{"type":"number"},"isRefresh":{"type":"boolean"},"skipSave":{"type":"boolean"},"showTimestamp":{"type":"boolean"},"audioLanguage":{"type":"string"},"whisperPrompt":{"type":"string"},"transcribeProvider":{"type":"string"},"elevenlabsApiKey":{"type":"string"},"openRouterApiKey":{"type":"string"},"apiKey":{"type":"string"},"stepfunApiKey":{"type":"string"},"fishAudioApiKey":{"type":"string"},"geminiApiKey":{"type":"string"},"volcengineAppId":{"type":"string"},"volcengineAccessToken":{"type":"string"},"speakerCount":{"type":"number"}}},"videoDetail":{"type":"object","properties":{"summary":{"type":"string"},"dbId":{"type":"string"},"id":{"type":"string"},"embedId":{"type":"string"},"pageId":{"type":"string"},"url":{"type":"string"},"subtitleUrl":{"type":"string"},"rawLang":{"type":"string"},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"]}},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"type":{"type":"string","enum":["bilibili","youtube","podcast","douyin","tiktok","wechat-channels","online-media","url-media","import-file","local-video","local-audio","record-audio","local-subtitle","webpage","meeting"]},"title":{"type":"string"},"cover":{"type":"string"},"author":{"type":"string"},"authorId":{"type":"string"},"duration":{"type":"number"},"publishedDate":{},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"]}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"]}},{"type":"null"}]},"descriptionText":{"type":"string"},"contentText":{"type":"string"},"aiImages":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number"},"endTime":{"type":"number"},"image":{"type":"string"},"prompt":{"type":"string"}},"required":["startTime","endTime","prompt"]}},"images":{"type":"array","items":{"type":"string"}},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"]}},"local_path":{"type":"string"},"status":{"type":"string"},"isPaid":{"type":"boolean"},"isPreviewOnly":{"type":"boolean"},"sourceLevel":{"type":"string","enum":["guest","authenticated","transcribed"]}},"required":["id","url","type","title","duration"]},"providedSubtitle":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"]}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"]}},"isAuthenticatedFetch":{"type":"boolean"},"providedDurationSec":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"forceReprocess":{"type":"boolean"}},"required":["url"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string"},"service":{"type":"string"},"sourceUrl":{"type":"string"},"htmlUrl":{"type":"string"},"summary":{"type":"string"},"costDuration":{"type":"number"},"remainingTime":{"type":"number"},"billingNote":{"type":"string"},"detail":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string"},"dbId":{"type":"string"},"id":{"type":"string"},"embedId":{"type":"string"},"pageId":{"type":"string"},"url":{"type":"string"},"rawLang":{"type":"string"},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"type":{"type":"string","enum":["bilibili","youtube","podcast","douyin","tiktok","wechat-channels","online-media","url-media","import-file","local-video","local-audio","record-audio","local-subtitle","webpage","meeting"]},"title":{"type":"string"},"cover":{"type":"string"},"author":{"type":"string"},"authorId":{"type":"string"},"duration":{"type":"number"},"publishedDate":{},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"descriptionText":{"type":"string"},"contentText":{"type":"string"},"aiImages":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number"},"endTime":{"type":"number"},"image":{"type":"string"},"prompt":{"type":"string"}},"required":["startTime","endTime","prompt"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"local_path":{"type":"string"},"status":{"type":"string"},"isPaid":{"type":"boolean"},"isPreviewOnly":{"type":"boolean"},"sourceLevel":{"type":"string","enum":["guest","authenticated","transcribed"]}},"required":["id","url","type","title","duration"],"additionalProperties":false},{"type":"object","properties":{"dbId":{"type":"string"},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"videoUrl":{"type":"string"},"title":{"type":"string"},"cover":{"type":"string"},"duration":{"type":"number"},"subtitleUrl":{"type":"string"},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"description":{"type":"string"},"format":{"type":"string"},"author":{"type":"string"},"publishedDate":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"rawUrl":{"type":"string"},"rawHtml":{"type":"string"}},"required":["audioUrl","title","cover","duration","description","format","content","rawUrl","rawHtml"],"additionalProperties":false}]}},"required":["success","id","service","sourceUrl","htmlUrl","costDuration","remainingTime"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/summarizeByChapter":{"get":{"operationId":"summarizeByChapter","summary":"Generate chapter summary for url","tags":["open"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"url","schema":{"type":"string","description":"The URL to the video (e.g., ?url=https://www.bilibili.com/video/BV1Sk4y1x7r2)"},"required":true,"description":"The URL to the video (e.g., ?url=https://www.bilibili.com/video/BV1Sk4y1x7r2)"},{"in":"query","name":"includeDetail","schema":{"type":"boolean"}},{"in":"query","name":"outputLanguage","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string"},"service":{"type":"string"},"sourceUrl":{"type":"string"},"htmlUrl":{"type":"string"},"summary":{"type":"string"},"costDuration":{"type":"number"},"remainingTime":{"type":"number"},"billingNote":{"type":"string"},"detail":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string"},"dbId":{"type":"string"},"id":{"type":"string"},"embedId":{"type":"string"},"pageId":{"type":"string"},"url":{"type":"string"},"rawLang":{"type":"string"},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"type":{"type":"string","enum":["bilibili","youtube","podcast","douyin","tiktok","wechat-channels","online-media","url-media","import-file","local-video","local-audio","record-audio","local-subtitle","webpage","meeting"]},"title":{"type":"string"},"cover":{"type":"string"},"author":{"type":"string"},"authorId":{"type":"string"},"duration":{"type":"number"},"publishedDate":{},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"descriptionText":{"type":"string"},"contentText":{"type":"string"},"aiImages":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number"},"endTime":{"type":"number"},"image":{"type":"string"},"prompt":{"type":"string"}},"required":["startTime","endTime","prompt"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"local_path":{"type":"string"},"status":{"type":"string"},"isPaid":{"type":"boolean"},"isPreviewOnly":{"type":"boolean"},"sourceLevel":{"type":"string","enum":["guest","authenticated","transcribed"]}},"required":["id","url","type","title","duration"],"additionalProperties":false},{"type":"object","properties":{"dbId":{"type":"string"},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"videoUrl":{"type":"string"},"title":{"type":"string"},"cover":{"type":"string"},"duration":{"type":"number"},"subtitleUrl":{"type":"string"},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"description":{"type":"string"},"format":{"type":"string"},"author":{"type":"string"},"publishedDate":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"rawUrl":{"type":"string"},"rawHtml":{"type":"string"}},"required":["audioUrl","title","cover","duration","description","format","content","rawUrl","rawHtml"],"additionalProperties":false}]},"url":{"type":"string"},"title":{"type":"string"},"chapterSummary":{"type":"string"},"chapters":{"type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"contents":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"},{"type":"string"}],"items":false,"minItems":3,"maxItems":3}},"summary":{"type":"string"},"title":{"type":"string"}},"required":["start","end","contents","summary","title"],"additionalProperties":false}}},"required":["success","id","service","sourceUrl","htmlUrl","costDuration","remainingTime","url","title","chapters"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/createSummaryTask":{"get":{"operationId":"createSummaryTask","summary":"Submit video summary processing task","tags":["open"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"url","schema":{"type":"string","description":"The URL to the video (e.g., ?url=https://www.bilibili.com/video/BV1Sk4y1x7r2)"},"required":true,"description":"The URL to the video (e.g., ?url=https://www.bilibili.com/video/BV1Sk4y1x7r2)"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"taskId":{"type":"string"},"status":{"type":"string"},"message":{"type":["string","null"]},"summary":{"type":"string"}},"required":["success","taskId","status"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/getSummaryTaskStatus":{"get":{"operationId":"getSummaryTaskStatus","summary":"Check task status and get result if completed","tags":["open"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"taskId","schema":{"type":"string"},"required":true},{"in":"query","name":"includeDetail","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean"},"taskId":{"type":"string"},"status":{"type":"string"},"message":{"type":["string","null"]},"summary":{"type":"string"}},"required":["success","taskId","status"],"additionalProperties":false},{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string"},"service":{"type":"string"},"sourceUrl":{"type":"string"},"htmlUrl":{"type":"string"},"summary":{"type":"string"},"costDuration":{"type":"number"},"remainingTime":{"type":"number"},"billingNote":{"type":"string"},"detail":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string"},"dbId":{"type":"string"},"id":{"type":"string"},"embedId":{"type":"string"},"pageId":{"type":"string"},"url":{"type":"string"},"rawLang":{"type":"string"},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"type":{"type":"string","enum":["bilibili","youtube","podcast","douyin","tiktok","wechat-channels","online-media","url-media","import-file","local-video","local-audio","record-audio","local-subtitle","webpage","meeting"]},"title":{"type":"string"},"cover":{"type":"string"},"author":{"type":"string"},"authorId":{"type":"string"},"duration":{"type":"number"},"publishedDate":{},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"descriptionText":{"type":"string"},"contentText":{"type":"string"},"aiImages":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number"},"endTime":{"type":"number"},"image":{"type":"string"},"prompt":{"type":"string"}},"required":["startTime","endTime","prompt"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"local_path":{"type":"string"},"status":{"type":"string"},"isPaid":{"type":"boolean"},"isPreviewOnly":{"type":"boolean"},"sourceLevel":{"type":"string","enum":["guest","authenticated","transcribed"]}},"required":["id","url","type","title","duration"],"additionalProperties":false},{"type":"object","properties":{"dbId":{"type":"string"},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"videoUrl":{"type":"string"},"title":{"type":"string"},"cover":{"type":"string"},"duration":{"type":"number"},"subtitleUrl":{"type":"string"},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"description":{"type":"string"},"format":{"type":"string"},"author":{"type":"string"},"publishedDate":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"rawUrl":{"type":"string"},"rawHtml":{"type":"string"}},"required":["audioUrl","title","cover","duration","description","format","content","rawUrl","rawHtml"],"additionalProperties":false}]}},"required":["success","id","service","sourceUrl","htmlUrl","costDuration","remainingTime"],"additionalProperties":false}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/getMvProject":{"get":{"operationId":"getMvProject","summary":"Read one SunoMV music video project as structured JSON (progress, cast, shots, clips)","tags":["open"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"contentId","schema":{"type":"string","description":"Song ID (the <id> in https://suno.bi/song/<id>)"},"required":true,"description":"Song ID (the <id> in https://suno.bi/song/<id>)"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"dslVersion":{"type":"number"},"contentId":{"type":"string"},"updatedAt":{"type":"string"},"options":{"type":"object","properties":{"styleId":{"type":"string"},"styleName":{"type":"string"},"imageModel":{"type":"string"},"aspectRatio":{"type":"string"}},"required":["styleId","styleName","imageModel","aspectRatio"],"additionalProperties":false},"workflow":{"type":"object","properties":{"currentStep":{"type":["string","null"]},"doneCount":{"type":"number"},"totalCount":{"type":"number"},"exportable":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"done":{"type":"number"},"total":{"type":"number"},"failed":{"type":"number"},"spendGuard":{"type":"boolean"}},"required":["id","status","spendGuard"],"additionalProperties":false}},"pendingGates":{"type":"array","items":{"type":"string"}},"shotTextOldLook":{"type":"array","items":{"type":"number"}}},"required":["currentStep","doneCount","totalCount","exportable","steps"],"additionalProperties":false},"direction":{"anyOf":[{"type":"object","properties":{"genre":{"type":"string"},"premise":{"type":"string"},"emotionalArc":{"type":"string"},"setting":{"type":"string"},"paletteAndLook":{"type":"string"},"visualMotifs":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},{"type":"null"}]},"music":{"type":"object","properties":{"audioUrl":{"type":["string","null"]},"vibe":{"type":"string"},"tempoFeel":{"type":"string"}},"required":["audioUrl"],"additionalProperties":false},"cast":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"imageUrl":{"type":["string","null"]},"source":{"type":"string"},"appearsIn":{"type":"array","items":{"type":"number"}},"scope":{"type":"string","enum":["all","some","none"]}},"required":["id","name","imageUrl","appearsIn","scope"],"additionalProperties":false}},"locations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"imageUrl":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"shots":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"startSec":{"type":"number"},"endSec":{"type":"number"},"lyric":{"type":"string"},"prompt":{"type":"string"},"promptSource":{"type":"string","enum":["override","script"]},"action":{"type":"string"},"mood":{"type":"string"},"actionOutOfSync":{"type":"boolean"},"camera":{"type":"object","properties":{"size":{"type":"string"},"angle":{"type":"string"},"movement":{"type":"string"}},"additionalProperties":false},"locationId":{"type":"string"},"cast":{"type":"array","items":{"type":"string"}},"still":{"type":"object","properties":{"status":{"type":"string"},"url":{"type":"string"},"versions":{"type":"number"},"error":{"type":"string"},"outdated":{"type":"boolean"},"qa":{"type":"object","properties":{"verdict":{"type":"string"},"excludedVisible":{"type":"array","items":{"type":"string"}},"faceMismatch":{"type":"array","items":{"type":"string"}},"designMismatch":{"type":"array","items":{"type":"string"}},"outfitMismatch":{"type":"array","items":{"type":"string"}},"avoidVisible":{"type":"array","items":{"type":"string"}},"keepMissing":{"type":"array","items":{"type":"string"}},"duplicated":{"type":"array","items":{"type":"string"}},"wardrobeMismatch":{"type":"array","items":{"type":"string"}},"sceneMismatch":{"type":"boolean"},"peopleCount":{"type":"number"}},"required":["verdict"],"additionalProperties":false}},"required":["status","versions"],"additionalProperties":false}},"required":["index","startSec","endSec","lyric","prompt","promptSource","cast","still"],"additionalProperties":false}},"clips":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"startSec":{"type":"number"},"endSec":{"type":"number"},"section":{"type":"string"},"shotIndexes":{"type":"array","items":{"type":"number"}},"cards":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"look":{"type":"string"},"video":{"type":"object","properties":{"status":{"type":"string"},"url":{"type":"string"},"model":{"type":"string"},"versions":{"type":"number"},"usable":{"type":"boolean"},"error":{"type":"string"},"outdated":{"type":"boolean"},"playableSec":{"type":"number"},"lipsync":{"type":"string","enum":["native","refined","generating"]}},"required":["status","versions","usable"],"additionalProperties":false},"approved":{"type":"boolean"},"pinned":{"type":"boolean"},"pinnedStale":{"type":"boolean"},"drift":{"type":"string","enum":["unnamedLead","hairConflict"]}},"required":["index","startSec","endSec","section","shotIndexes","look","video"],"additionalProperties":false}},"patches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"startSec":{"type":"number"},"endSec":{"type":"number"},"clipIndexes":{"type":"array","items":{"type":"number"}},"status":{"type":"string"},"model":{"type":"string"},"instruction":{"type":"string"}},"required":["id","startSec","endSec","clipIndexes","status"],"additionalProperties":false}},"spend":{"type":"object","properties":{"planCredits":{"type":"number"},"paidCredits":{"type":"number"},"refundedCredits":{"type":"number"},"lines":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"what":{"type":"string"},"count":{"type":"number"},"credits":{"type":"number"},"source":{"type":"string","enum":["plan","balance","refunded"]}},"required":["at","what","count","credits","source"],"additionalProperties":false}},"olderLines":{"type":"number"}},"required":["planCredits","paidCredits","refundedCredits","lines","olderLines"],"additionalProperties":false}},"required":["dslVersion","contentId","options","workflow","direction","music","cast","locations","shots","clips"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/getSubtitle":{"get":{"operationId":"getSubtitle","summary":"Only returns the video subtitles array in detail","tags":["open"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"url","schema":{"type":"string","description":"The URL to the video (e.g., ?url=https://www.bilibili.com/video/BV1Sk4y1x7r2)"},"required":true,"description":"The URL to the video (e.g., ?url=https://www.bilibili.com/video/BV1Sk4y1x7r2)"},{"in":"query","name":"audioLanguage","schema":{"type":"string"}},{"in":"query","name":"transcribeProvider","schema":{"type":"string"}},{"in":"query","name":"whisperPrompt","schema":{"type":"string"}},{"in":"query","name":"apiKey","schema":{"type":"string"}},{"in":"query","name":"enabledSpeaker","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string"},"service":{"type":"string"},"sourceUrl":{"type":"string"},"htmlUrl":{"type":"string"},"summary":{"type":"string"},"costDuration":{"type":"number"},"remainingTime":{"type":"number"},"billingNote":{"type":"string"},"detail":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string"},"dbId":{"type":"string"},"id":{"type":"string"},"embedId":{"type":"string"},"pageId":{"type":"string"},"url":{"type":"string"},"rawLang":{"type":"string"},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"type":{"type":"string","enum":["bilibili","youtube","podcast","douyin","tiktok","wechat-channels","online-media","url-media","import-file","local-video","local-audio","record-audio","local-subtitle","webpage","meeting"]},"title":{"type":"string"},"cover":{"type":"string"},"author":{"type":"string"},"authorId":{"type":"string"},"duration":{"type":"number"},"publishedDate":{},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"descriptionText":{"type":"string"},"contentText":{"type":"string"},"aiImages":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number"},"endTime":{"type":"number"},"image":{"type":"string"},"prompt":{"type":"string"}},"required":["startTime","endTime","prompt"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"local_path":{"type":"string"},"status":{"type":"string"},"isPaid":{"type":"boolean"},"isPreviewOnly":{"type":"boolean"},"sourceLevel":{"type":"string","enum":["guest","authenticated","transcribed"]}},"required":["id","url","type","title","duration"],"additionalProperties":false},{"type":"object","properties":{"dbId":{"type":"string"},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"videoUrl":{"type":"string"},"title":{"type":"string"},"cover":{"type":"string"},"duration":{"type":"number"},"subtitleUrl":{"type":"string"},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"description":{"type":"string"},"format":{"type":"string"},"author":{"type":"string"},"publishedDate":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"rawUrl":{"type":"string"},"rawHtml":{"type":"string"}},"required":["audioUrl","title","cover","duration","description","format","content","rawUrl","rawHtml"],"additionalProperties":false}]}},"required":["success","id","service","sourceUrl","htmlUrl","costDuration","remainingTime"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/getPolishedText":{"get":{"operationId":"getPolishedText","summary":"Polish video subtitles into readable article segments","tags":["open"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"url","schema":{"type":"string","description":"The URL to the video (e.g., ?url=https://www.bilibili.com/video/BV1Sk4y1x7r2)"},"required":true,"description":"The URL to the video (e.g., ?url=https://www.bilibili.com/video/BV1Sk4y1x7r2)"},{"in":"query","name":"includeDetail","schema":{"type":"boolean"}},{"in":"query","name":"keywords","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string"},"service":{"type":"string"},"sourceUrl":{"type":"string"},"htmlUrl":{"type":"string"},"title":{"type":"string"},"segments":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number"},"endTime":{"type":"number"},"chapterTitle":{"type":"string"},"polishedText":{"type":"string"},"fromCache":{"type":"boolean"}},"required":["startTime","endTime","polishedText","fromCache"],"additionalProperties":false}},"costDuration":{"type":"number"},"remainingTime":{"type":"number"},"detail":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string"},"dbId":{"type":"string"},"id":{"type":"string"},"embedId":{"type":"string"},"pageId":{"type":"string"},"url":{"type":"string"},"rawLang":{"type":"string"},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"type":{"type":"string","enum":["bilibili","youtube","podcast","douyin","tiktok","wechat-channels","online-media","url-media","import-file","local-video","local-audio","record-audio","local-subtitle","webpage","meeting"]},"title":{"type":"string"},"cover":{"type":"string"},"author":{"type":"string"},"authorId":{"type":"string"},"duration":{"type":"number"},"publishedDate":{},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"descriptionText":{"type":"string"},"contentText":{"type":"string"},"aiImages":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number"},"endTime":{"type":"number"},"image":{"type":"string"},"prompt":{"type":"string"}},"required":["startTime","endTime","prompt"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"local_path":{"type":"string"},"status":{"type":"string"},"isPaid":{"type":"boolean"},"isPreviewOnly":{"type":"boolean"},"sourceLevel":{"type":"string","enum":["guest","authenticated","transcribed"]}},"required":["id","url","type","title","duration"],"additionalProperties":false},{"type":"object","properties":{"dbId":{"type":"string"},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"videoUrl":{"type":"string"},"title":{"type":"string"},"cover":{"type":"string"},"duration":{"type":"number"},"subtitleUrl":{"type":"string"},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"description":{"type":"string"},"format":{"type":"string"},"author":{"type":"string"},"publishedDate":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"rawUrl":{"type":"string"},"rawHtml":{"type":"string"}},"required":["audioUrl","title","cover","duration","description","format","content","rawUrl","rawHtml"],"additionalProperties":false}]}},"required":["success","id","service","sourceUrl","htmlUrl","segments","costDuration","remainingTime"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/express":{"get":{"operationId":"express","summary":"Rewrite video subtitles as a polished article","tags":["open"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"url","schema":{"type":"string","description":"The URL to the video (e.g., ?url=https://www.bilibili.com/video/BV1Sk4y1x7r2)"},"required":true,"description":"The URL to the video (e.g., ?url=https://www.bilibili.com/video/BV1Sk4y1x7r2)"},{"in":"query","name":"includeDetail","schema":{"type":"boolean"}},{"in":"query","name":"outputLanguage","schema":{"type":"string"}},{"in":"query","name":"model","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"id":{"type":"string"},"service":{"type":"string"},"sourceUrl":{"type":"string"},"htmlUrl":{"type":"string"},"title":{"type":"string"},"article":{"type":"string"},"fromCache":{"type":"boolean"},"costDuration":{"type":"number"},"remainingTime":{"type":"number"},"detail":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string"},"dbId":{"type":"string"},"id":{"type":"string"},"embedId":{"type":"string"},"pageId":{"type":"string"},"url":{"type":"string"},"rawLang":{"type":"string"},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"type":{"type":"string","enum":["bilibili","youtube","podcast","douyin","tiktok","wechat-channels","online-media","url-media","import-file","local-video","local-audio","record-audio","local-subtitle","webpage","meeting"]},"title":{"type":"string"},"cover":{"type":"string"},"author":{"type":"string"},"authorId":{"type":"string"},"duration":{"type":"number"},"publishedDate":{},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"descriptionText":{"type":"string"},"contentText":{"type":"string"},"aiImages":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number"},"endTime":{"type":"number"},"image":{"type":"string"},"prompt":{"type":"string"}},"required":["startTime","endTime","prompt"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"local_path":{"type":"string"},"status":{"type":"string"},"isPaid":{"type":"boolean"},"isPreviewOnly":{"type":"boolean"},"sourceLevel":{"type":"string","enum":["guest","authenticated","transcribed"]}},"required":["id","url","type","title","duration"],"additionalProperties":false},{"type":"object","properties":{"dbId":{"type":"string"},"audioUrl":{"type":"string"},"playUrl":{"type":"string"},"videoUrl":{"type":"string"},"title":{"type":"string"},"cover":{"type":"string"},"duration":{"type":"number"},"subtitleUrl":{"type":"string"},"subtitlesArray":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"number","description":"The start time of the subtitle item in seconds, e.g. 53.58"},"end":{"type":"number","description":"The end time of the subtitle item in seconds, e.g. 65.08"},"text":{"type":"string","description":"The text of the subtitle item"},"index":{"type":"number","description":"The index of the subtitle item"},"words":{"description":"The words of the subtitle item","type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"},"punctuation":{"type":"string"}},"required":["start","end","text"],"additionalProperties":false}},"speaker_id":{"description":"The speaker id of the subtitle item","type":["number","null"]},"section":{"description":"Source lyric section for this vocal line","type":"string","enum":["intro","verse","pre-chorus","chorus","bridge","inst","outro","hook"]},"imagePrompt":{"description":"Seed image prompt for instrumental structure rows","type":"string"},"_isGrouped":{"description":"Whether this subtitle is a grouped subtitle","type":"boolean"},"_originalSubtitles":{"description":"Original subtitles that were grouped together","type":"array","items":{}}},"required":["startTime","end","text","index"],"additionalProperties":false}},{"type":"null"}]},"translationUrls":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"url":{"type":"string"}},"required":["code","url"],"additionalProperties":false}},"description":{"type":"string"},"format":{"type":"string"},"author":{"type":"string"},"publishedDate":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"chapters":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"content":{"type":"string"},"type":{"type":"number"},"imgUrl":{"type":"string"}},"required":["from","to","content"],"additionalProperties":false}},"images":{"type":"array","items":{"type":"string"}},"rawUrl":{"type":"string"},"rawHtml":{"type":"string"}},"required":["audioUrl","title","cover","duration","description","format","content","rawUrl","rawHtml"],"additionalProperties":false}]}},"required":["success","id","service","sourceUrl","htmlUrl","article","fromCache","costDuration","remainingTime"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/generateImage":{"post":{"operationId":"generateImage","summary":"Generate or edit an image with AI (chatimg.ai)","description":"Transform a source image with an AI model and prompt (e.g. style transfer, editing). Requires an API token (Authorization: Bearer <token>). Billing: charged from your chatimg.ai credits per image — openai: 25 credits, gpt-image-2: 50 credits, gpt-image-2.5-flare: 50 credits, gpt-image-2.5-sunburst: 50 credits, mai-image-2.6-flash: 20 credits, flux: 12 credits, gemini: 10 credits, nanobanana-pro: 30 credits, nanobanana-2-lite: 12 credits, nanobanana-2: 20 credits, nanobanana-2.1: 20 credits, grok: 30 credits, ideogram-4.5: 35 credits, seedream: 15 credits, seedream-5-flash: 12 credits, flux3: 18 credits, flux3-klein: 12 credits, krea-3: 15 credits, hy-image-3.5: 12 credits, qwen: 8 credits, qwen-image-2.1: 8 credits, qwen-image-2.1-turbo: 8 credits, qwen-image-2.1-pro: 15 credits, qwen-image-3.0: 18 credits, qwen-image-3.0-pro: 25 credits, z-image-turbo: 5 credits, flux-2-flex: 25 credits. See GET /v1/imagePricing for machine-readable pricing. Generation is asynchronous: poll GET /v1/imageStatus with the same imageUrl until status is completed. Failed generations are automatically refunded.","tags":["open"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"imageUrl":{"type":"string","minLength":1,"description":"URL of the source image to process. Supports http URLs and base64 encoded images (with or without data:image/... prefix)"},"prompt":{"description":"Prompt describing the desired transformation (default: ghibli style)","type":"string"},"model":{"default":"nanobanana-2-lite","description":"AI model to use (default: nanobanana-2-lite). Pricing per image: openai: 25 credits, gpt-image-2: 50 credits, gpt-image-2.5-flare: 50 credits, gpt-image-2.5-sunburst: 50 credits, mai-image-2.6-flash: 20 credits, flux: 12 credits, gemini: 10 credits, nanobanana-pro: 30 credits, nanobanana-2-lite: 12 credits, nanobanana-2: 20 credits, nanobanana-2.1: 20 credits, grok: 30 credits, ideogram-4.5: 35 credits, seedream: 15 credits, seedream-5-flash: 12 credits, flux3: 18 credits, flux3-klein: 12 credits, krea-3: 15 credits, hy-image-3.5: 12 credits, qwen: 8 credits, qwen-image-2.1: 8 credits, qwen-image-2.1-turbo: 8 credits, qwen-image-2.1-pro: 15 credits, qwen-image-3.0: 18 credits, qwen-image-3.0-pro: 25 credits, z-image-turbo: 5 credits, flux-2-flex: 25 credits","type":"string","enum":["openai","gpt-image-2","gpt-image-2.5-flare","gpt-image-2.5-sunburst","mai-image-2.6-flash","flux","gemini","nanobanana-pro","nanobanana-2-lite","nanobanana-2","nanobanana-2.1","grok","ideogram-4.5","seedream","seedream-5-flash","flux3","flux3-klein","krea-3","hy-image-3.5","qwen","qwen-image-2.1","qwen-image-2.1-turbo","qwen-image-2.1-pro","qwen-image-3.0","qwen-image-3.0-pro","z-image-turbo","flux-2-flex"]},"resolution":{"description":"Output resolution tier: 1K (default), 2K or 4K. Only models that support tiers honor it; 2K costs 2.5x, 4K costs 5x. Others keep their default size and price.","type":"string","enum":["1K","2K","4K"]}},"required":["imageUrl"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"taskId":{"type":"string","description":"Unique identifier for the generation task"},"status":{"type":"string","enum":["pending","completed","error","unknown"],"description":"Initial status of the generation task (pending)"},"imageUrl":{"type":"string","description":"The source image URL, used as the key when polling /v1/imageStatus"},"timestamp":{"type":"number","description":"Timestamp when the task was created"},"costCredits":{"type":"number","description":"Credits charged for this generation"},"balanceRemaining":{"type":"number","description":"Remaining credits balance after this charge"}},"required":["taskId","status","imageUrl","timestamp","costCredits","balanceRemaining"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/imageStatus":{"get":{"operationId":"getImageStatus","summary":"Get the status of an image generation task","description":"Poll the status of a generation started via POST /v1/generateImage, keyed by the source imageUrl. Read-only and free of charge. When completed, `generatedImageUrl` holds the result image.","tags":["open"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"imageUrl","schema":{"type":"string","minLength":1,"description":"The source image URL passed to /v1/generateImage"},"required":true,"description":"The source image URL passed to /v1/generateImage"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","completed","error","unknown"],"description":"Current status of the generation task"},"imageUrl":{"type":"string","description":"URL of the image to check status for"},"timestamp":{"description":"Timestamp when the task was created","type":"number"},"progress":{"description":"Progress of the generation task","type":"number"},"result":{"description":"Result of the generation task","type":"string"},"generatedImageUrl":{"description":"URL of the generated image","type":"string"},"error":{"description":"Error message of the generation task","type":"string"},"taskId":{"description":"Unique identifier for the generation task","type":"string"}},"required":["status","imageUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/imagePricing":{"get":{"operationId":"getImagePricing","summary":"List available image models and their credits pricing","description":"Machine-readable pricing for POST /v1/generateImage: per-image credits price of each model, plus one-time credits top-up packs. No authentication required.","tags":["open"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","description":"Model identifier, pass as the `model` param of /v1/generateImage"},"credits":{"type":"number","description":"Credits charged per generated image (1K / model default size)"},"resolutions":{"type":"array","items":{"type":"string","enum":["1K","2K","4K"]},"description":"Resolution tiers accepted by the `resolution` param; empty = model default size only"}},"required":["model","credits","resolutions"],"additionalProperties":false},"description":"Per-image credits price of each available model"},"creditPacks":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"credits":{"type":"number"},"priceUsd":{"type":"number"}},"required":["productId","credits","priceUsd"],"additionalProperties":false},"description":"One-time credits top-up packs (purchase at https://chatimg.ai/pricing)"}},"required":["models","creditPacks"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/me":{"get":{"operationId":"getAccountInfo","summary":"Get current account, plan and remaining minutes","tags":["agent","account"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":["string","null"]},"plan":{"type":"object","properties":{"tier":{"type":"string","enum":["free","plus","pro","lifetime"]},"isPaidMember":{"type":"boolean"},"expiresAt":{"type":["string","null"]}},"required":["tier","isPaidMember","expiresAt"],"additionalProperties":false},"remainingMinutes":{"type":"number"}},"required":["userId","email","plan","remainingMinutes"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/feed":{"get":{"operationId":"getLatestFeed","summary":"Latest videos across all subscribed channels","tags":["agent","feed"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"since","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}},{"in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"contentId":{"type":["string","null"]},"channelId":{"type":["string","null"]},"channelTitle":{"type":["string","null"]},"title":{"type":["string","null"]},"sourceUrl":{"type":"string"},"coverUrl":{"type":["string","null"]},"duration":{"type":["string","null"]},"publishedAt":{"type":"string"},"isUnseen":{"type":"boolean"}},"required":["contentId","channelId","channelTitle","title","sourceUrl","coverUrl","duration","publishedAt","isUnseen"],"additionalProperties":false}},"failedChannels":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"channelTitle":{"type":["string","null"]},"channelUrl":{"type":"string"},"message":{"type":"string"}},"required":["channelId","channelTitle","channelUrl","message"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","failedChannels","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/channel/health":{"get":{"operationId":"getChannelHealth","summary":"Probe RSS health for every subscribed channel","tags":["agent","channel"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"channelUrl":{"type":"string"},"channelTitle":{"type":["string","null"]},"ok":{"type":"boolean"},"message":{"type":["string","null"]},"latestPublishedAt":{"type":["string","null"]},"checkedAt":{"type":"string"}},"required":["channelId","channelUrl","channelTitle","ok","message","latestPublishedAt","checkedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/feed/markSeen":{"post":{"operationId":"markFeedSeen","summary":"Bump last-seen cursor for one or all subscribed channels","tags":["agent","feed"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channelUrl":{"type":"string","format":"uri"},"channelId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"timestamp":{"type":"string"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"updatedCount":{"type":"number"}},"required":["updatedCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/library/remove":{"post":{"operationId":"deleteSavedVideo","summary":"Delete a saved video from the library","tags":["agent","library"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Saved video id (list_saved_videos / search_saved_videos `id`)."}},"required":["contentId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/library/list":{"get":{"operationId":"listSavedVideos","summary":"List saved videos with pagination","tags":["agent","library"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"type":"string"}},{"in":"query","name":"channelId","schema":{"type":"string"}},{"in":"query","name":"sortBy","schema":{"default":"updatedAt","type":"string","enum":["createdAt","updatedAt"]}},{"in":"query","name":"sortOrder","schema":{"default":"desc","type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":["string","null"]},"sourceUrl":{"type":"string"},"coverUrl":{"type":["string","null"]},"duration":{"type":["number","null"]},"channelId":{"type":["string","null"]},"channelTitle":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","title","sourceUrl","coverUrl","duration","channelId","channelTitle","createdAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]},"total":{"type":"number"}},"required":["videos","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/library/get":{"get":{"operationId":"getSavedVideo","summary":"Get a saved video with summary, chapters, subtitles, note","tags":["agent","library"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":["string","null"]},"sourceUrl":{"type":"string"},"coverUrl":{"type":["string","null"]},"duration":{"type":["number","null"]},"note":{"type":["string","null"]},"summary":{"type":["string","null"]},"chapters":{"anyOf":[{"type":"array","items":{}},{"type":"null"}]},"subtitles":{"anyOf":[{"type":"array","items":{}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","sourceUrl","coverUrl","duration","note","summary","chapters","subtitles","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/library/search":{"get":{"operationId":"searchSavedVideos","summary":"Search across saved videos (title, subtitles, notes)","tags":["agent","library"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"keyword","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"limit","schema":{"default":10,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"contentId":{"type":"string"},"title":{"type":["string","null"]},"sourceUrl":{"type":"string"},"snippet":{"type":"string"},"timestamp":{"type":["number","null"]},"matchType":{"type":"string","enum":["title","subtitle","note","summary"]}},"required":["contentId","title","sourceUrl","snippet","timestamp","matchType"],"additionalProperties":false}},"count":{"type":"number"}},"required":["results","count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/channels/list":{"get":{"operationId":"listChannels","summary":"List subscribed channels","tags":["agent","channels"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"folderId":{"type":["string","null"]},"title":{"type":["string","null"]},"url":{"type":"string"},"platform":{"type":["string","null"]},"logoUrl":{"type":["string","null"]},"description":{"type":["string","null"]},"lastSummarizedAt":{"type":["string","null"]}},"required":["id","folderId","title","url","platform","logoUrl","description","lastSummarizedAt"],"additionalProperties":false}}},"required":["channels"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/channels/folders":{"get":{"operationId":"listChannelFolders","summary":"List the folder tree of subscribed channels","tags":["agent","channels"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"folders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parentId":{"type":["string","null"]},"depth":{"type":"number"}},"required":["id","name","parentId","depth"],"additionalProperties":false}}},"required":["folders"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/channels/createFolder":{"post":{"operationId":"createChannelFolder","summary":"Create a folder for subscribed channels","tags":["agent","channels"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"parentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/channels/moveFolder":{"post":{"operationId":"moveChannelFolder","summary":"Move a channel folder under another folder or to root","tags":["agent","channels"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"newParentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["folderId","newParentId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/channels/setFolder":{"post":{"operationId":"setChannelFolder","summary":"Put a subscribed channel into a folder","tags":["agent","channels"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channelId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"folderId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["channelId","folderId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/channels/deleteFolder":{"post":{"operationId":"deleteChannelFolder","summary":"Delete a channel folder","tags":["agent","channels"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folderId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["folderId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/channels/getNote":{"get":{"operationId":"getChannelNote","summary":"Read the user's note on a channel","tags":["agent","channels"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"channelUrl","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}},"required":["note"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/channels/setNote":{"post":{"operationId":"setChannelNote","summary":"Write the user's note on a channel","tags":["agent","channels"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channelUrl":{"type":"string","minLength":1},"note":{"type":"string","maxLength":500}},"required":["channelUrl","note"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string"}},"required":["note"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/channels/setStarred":{"post":{"operationId":"setChannelStarred","summary":"Mark a subscribed channel as special follow","tags":["agent","channels"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channelId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"starred":{"type":"boolean"}},"required":["channelId","starred"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"starred":{"type":"boolean"}},"required":["starred"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/channels/subscribe":{"post":{"operationId":"subscribeChannel","summary":"Subscribe to a channel by URL","tags":["agent","channels"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channelUrl":{"type":"string","format":"uri"},"author":{"type":"string"}},"required":["channelUrl"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"channelId":{"type":"string"},"fellBack":{"type":"boolean"},"fallbackReason":{"type":["string","null"]}},"required":["channelId","fellBack","fallbackReason"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/channels/unsubscribe":{"post":{"operationId":"unsubscribeChannel","summary":"Unsubscribe from a channel","tags":["agent","channels"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channelUrl":{"type":"string","format":"uri"}},"required":["channelUrl"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/channels/videos":{"get":{"operationId":"getChannelVideos","summary":"Latest videos from a channel","tags":["agent","channels"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"channelUrl","schema":{"type":"string","format":"uri"},"required":true},{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]},"videos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"publishedAt":{"type":["string","null"]},"coverUrl":{"type":["string","null"]}},"required":["id","title","url","publishedAt","coverUrl"],"additionalProperties":false}}},"required":["title","description","videos"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/collections/list":{"get":{"operationId":"listCollections","summary":"List user collections (owned + purchased)","tags":["agent","collections"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"type":"string"}},{"in":"query","name":"scope","schema":{"default":"all","type":"string","enum":["owned","purchased","all"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":["string","null"]},"isPublic":{"type":"boolean"},"videoCount":{"type":"number"},"coverUrl":{"type":["string","null"]},"ownership":{"type":"string","enum":["owned","purchased"]}},"required":["id","name","slug","isPublic","videoCount","coverUrl","ownership"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["collections","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/collections/get":{"get":{"operationId":"getCollection","summary":"Get a collection with its items","tags":["agent","collections"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"isPublic":{"type":"boolean"},"ownership":{"type":"string","enum":["owned","purchased"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":["string","null"]},"sourceUrl":{"type":"string"},"coverUrl":{"type":["string","null"]},"duration":{"type":["number","null"]},"channelId":{"type":["string","null"]},"channelTitle":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","title","sourceUrl","coverUrl","duration","channelId","channelTitle","createdAt"],"additionalProperties":false}},"aggregatedSummary":{"type":["string","null"]}},"required":["id","name","description","isPublic","ownership","items","aggregatedSummary"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/collections/create":{"post":{"operationId":"createCollection","summary":"Create a new collection","tags":["agent","collections"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":2000},"isPublic":{"default":false,"type":"boolean"},"parentId":{"description":"Parent folder (collection) id; omit or null for root.","anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/collections/folders":{"get":{"operationId":"listCollectionFolders","summary":"List the folder tree of owned collections","tags":["agent","collections"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"folders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"type":["string","null"]},"parentId":{"type":["string","null"]},"depth":{"type":"number"},"sortOrder":{"type":["number","null"]}},"required":["id","name","emoji","parentId","depth","sortOrder"],"additionalProperties":false}}},"required":["folders"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/collections/move":{"post":{"operationId":"moveCollection","summary":"Move a collection folder under another folder or to root","tags":["agent","collections"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"newParentId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"position":{"description":"Index among the new siblings in custom order; 0 = first.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["collectionId","newParentId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/collections/update":{"post":{"operationId":"updateCollection","summary":"Rename a collection or change its description, emoji or visibility","tags":["agent","collections"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}]},"isPublic":{"type":"boolean"}},"required":["collectionId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/collections/removeItems":{"post":{"operationId":"removeFromCollection","summary":"Remove items from a collection","tags":["agent","collections"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contentIds":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1},"description":"Item ids as returned by get_collection (items[].id)."}},"required":["collectionId","contentIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"number"},"notInCollection":{"type":"number"}},"required":["removed","notInCollection"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/collections/moveItems":{"post":{"operationId":"moveCollectionItems","summary":"Move or copy items between collections","tags":["agent","collections"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceCollectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"targetCollectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contentIds":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1},"description":"Item ids as returned by get_collection (items[].id)."},"mode":{"default":"move","type":"string","enum":["move","copy"]}},"required":["sourceCollectionId","targetCollectionId","contentIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processed":{"type":"number"},"duplicates":{"type":"number"},"notInCollection":{"type":"number"}},"required":["processed","duplicates","notInCollection"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/collections/forContent":{"get":{"operationId":"getVideoCollections","summary":"List the collections a saved video belongs to","tags":["agent","collections"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"contentId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["collections"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/collections/remove":{"post":{"operationId":"deleteCollection","summary":"Delete a collection","tags":["agent","collections"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["collectionId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/collections/updateSummary":{"post":{"operationId":"updateCollectionSummary","summary":"Replace a collection's aggregated summary","tags":["agent","collections"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"summary":{"type":"string","minLength":1}},"required":["collectionId","summary"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/collections/chatHistory":{"get":{"operationId":"getCollectionChatHistory","summary":"Get cached chat history for a collection","tags":["agent","collections"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"collectionId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{}},"suggestedQuestions":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":["string","null"]}},"required":["messages","suggestedQuestions","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/collections/addItem":{"post":{"operationId":"addToCollection","summary":"Add a saved video to a collection","tags":["agent","collections"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string"},"contentId":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"}},"required":["collectionId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/notes/list":{"get":{"operationId":"listNotes","summary":"List user notes across all saved videos","tags":["agent","notes"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"limit","schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"array","items":{"type":"object","properties":{"contentId":{"type":"string"},"title":{"type":["string","null"]},"sourceUrl":{"type":["string","null"]},"excerpt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["contentId","title","sourceUrl","excerpt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["notes","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/notes/get":{"get":{"operationId":"getNote","summary":"Get a single note by content id","tags":["agent","notes"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"contentId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"contentId":{"type":"string"},"note":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["contentId","note","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/notes/update":{"post":{"operationId":"updateNote","summary":"Create or update a note for a saved video","tags":["agent","notes"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contentId":{"type":"string"},"text":{"type":"string"}},"required":["contentId","text"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/highlights/videos":{"get":{"operationId":"listHighlightedVideos","summary":"List saved videos that have highlights","tags":["agent","highlights"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"source","schema":{"default":"highlights","type":"string","enum":["highlights","topics"]}},{"in":"query","name":"limit","schema":{"default":30,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"videos":{"type":"array","items":{"type":"object","properties":{"contentId":{"type":["string","null"]},"title":{"type":["string","null"]},"sourceUrl":{"type":"string"},"count":{"type":"number"},"lastUpdatedAt":{"type":["string","null"]}},"required":["contentId","title","sourceUrl","count","lastUpdatedAt"],"additionalProperties":false}}},"required":["videos"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/highlights/get":{"get":{"operationId":"getVideoHighlights","summary":"Read a saved video's highlights and AI highlight topics","tags":["agent","highlights"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"contentId","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Saved video id (list_saved_videos / search_saved_videos `id`)."},"required":true,"description":"Saved video id (list_saved_videos / search_saved_videos `id`)."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"highlights":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string"},"sectionId":{"type":"string"},"highlightId":{"type":"string"},"text":{"type":"string"},"comment":{"type":["string","null"]},"timestampSeconds":{"type":["number","null"]},"createdAt":{"type":["string","null"]}},"required":["scope","sectionId","highlightId","text","comment","timestampSeconds","createdAt"],"additionalProperties":false}},"topics":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"summary":{"type":["string","null"]},"segments":{"type":"array","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"summary":{"type":"string"}},"required":["start","end","summary"],"additionalProperties":false}}},"required":["title","summary","segments"],"additionalProperties":false}}},"required":["highlights","topics"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/highlights/add":{"post":{"operationId":"addHighlight","summary":"Highlight a moment of a saved video","tags":["agent","highlights"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Saved video id (list_saved_videos / search_saved_videos `id`)."},"timestamp":{"type":"number","minimum":0},"text":{"type":"string","maxLength":2000},"comment":{"type":"string","maxLength":4000}},"required":["contentId","timestamp"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string"},"sectionId":{"type":"string"},"highlightId":{"type":"string"},"text":{"type":"string"},"comment":{"type":["string","null"]},"timestampSeconds":{"type":["number","null"]},"createdAt":{"type":["string","null"]}},"required":["scope","sectionId","highlightId","text","comment","timestampSeconds","createdAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/highlights/setComment":{"post":{"operationId":"setHighlightComment","summary":"Change the comment on a highlight","tags":["agent","highlights"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","minLength":1},"sectionId":{"type":"string","minLength":1},"highlightId":{"type":"string","minLength":1},"contentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Saved video id (list_saved_videos / search_saved_videos `id`)."},"comment":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["scope","sectionId","highlightId","contentId","comment"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/highlights/remove":{"post":{"operationId":"deleteHighlights","summary":"Delete highlights of a saved video","tags":["agent","highlights"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Saved video id (list_saved_videos / search_saved_videos `id`)."},"highlights":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","minLength":1},"sectionId":{"type":"string","minLength":1},"highlightId":{"type":"string","minLength":1}},"required":["scope","sectionId","highlightId"]}},"all":{"type":"boolean"}},"required":["contentId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"anyOf":[{"type":"number"},{"type":"string","const":"all"}]}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/video/mindmap":{"post":{"operationId":"generateVideoMindmap","summary":"Generate XMind mindmap from a saved video summary","tags":["agent","video"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contentId":{"type":"string"},"summary":{"type":"string","minLength":1},"isRefresh":{"type":"boolean"}},"required":["contentId","summary"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"fileUrl":{"type":"string"}},"required":["fileUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/video/visuals":{"post":{"operationId":"extractVideoVisuals","summary":"Create / look up a visual analysis task for a video","tags":["agent","video"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"videoUrl":{"type":"string","format":"uri"},"speed":{"default":1,"type":"number","minimum":0.5,"maximum":4},"model":{"default":"gemini-3.8-flash","type":"string"},"force":{"default":false,"type":"boolean"},"language":{"type":"string"}},"required":["videoUrl"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"taskId":{"type":"string"},"status":{"type":"string","enum":["pending","processing","completed","failed","superseded"]},"isFromCache":{"type":"boolean"}},"required":["taskId","status"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/summary/byPrompt":{"post":{"operationId":"generateSummaryByPrompt","summary":"Re-summarize a saved video with a custom prompt","tags":["agent","summary"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contentId":{"type":"string"},"customPrompt":{"type":"string","minLength":1,"maxLength":4000},"outputLanguage":{"type":"string"},"model":{"type":"string"}},"required":["contentId","customPrompt"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string"},"fromCache":{"type":"boolean"}},"required":["summary","fromCache"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/notion/status":{"get":{"operationId":"getNotionStatus","summary":"Check whether the user has connected Notion","tags":["agent","notion"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"connected":{"type":"boolean"},"workspaceId":{"type":["string","null"]},"workspaceName":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["connected","workspaceId","workspaceName","email"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/v1/notion/exportNote":{"post":{"operationId":"exportToNotion","summary":"Export a saved video summary to Notion","tags":["agent","notion"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contentId":{"type":"string"},"databaseId":{"type":"string"}},"required":["contentId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"pageUrl":{"type":["string","null"]}},"required":["success","pageUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}},"components":{"schemas":{"error.BAD_REQUEST":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Invalid input data"},"code":{"type":"string","description":"The error code","example":"BAD_REQUEST"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Invalid input data error (400)","description":"The error information","example":{"code":"BAD_REQUEST","message":"Invalid input data","issues":[]}},"error.UNAUTHORIZED":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Authorization not provided"},"code":{"type":"string","description":"The error code","example":"UNAUTHORIZED"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Authorization not provided error (401)","description":"The error information","example":{"code":"UNAUTHORIZED","message":"Authorization not provided","issues":[]}},"error.FORBIDDEN":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Insufficient access"},"code":{"type":"string","description":"The error code","example":"FORBIDDEN"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Insufficient access error (403)","description":"The error information","example":{"code":"FORBIDDEN","message":"Insufficient access","issues":[]}},"error.NOT_FOUND":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Not found"},"code":{"type":"string","description":"The error code","example":"NOT_FOUND"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Not found error (404)","description":"The error information","example":{"code":"NOT_FOUND","message":"Not found","issues":[]}},"error.INTERNAL_SERVER_ERROR":{"type":"object","properties":{"message":{"type":"string","description":"The error message","example":"Internal server error"},"code":{"type":"string","description":"The error code","example":"INTERNAL_SERVER_ERROR"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false,"title":"Internal server error error (500)","description":"The error information","example":{"code":"INTERNAL_SERVER_ERROR","message":"Internal server error","issues":[]}}},"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}}}}