{"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/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, hy-image-3.5: 12 credits, qwen: 8 credits, qwen-image-2.1: 8 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, hy-image-3.5: 12 credits, qwen: 8 credits, qwen-image-2.1: 8 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","hy-image-3.5","qwen","qwen-image-2.1","z-image-turbo","flux-2-flex"]}},"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"}},"required":["model","credits"],"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/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"},"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","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/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"}},"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/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/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"}}}}