{"openapi":"3.1.0","info":{"title":"DipNet YouTube IP Agent","description":"## A backend application to manage and analyze YouTube video data based on intellectual property\n\n**Author:** BroxiAI  \n**Version:** 1.0.9\n**Last Updated:** 2026-04-24\n**Updated by:** Jason\n\n### Features\n- Open Global access and send webhook (Live environment)\n- YouTube video data collection and analysis\n- Intellectual property management\n- Video metadata processing\n- Strike verification with BroxiAI Agent\n- Video search with BroxiAI Agent\n","version":"1.0.9"},"paths":{"/key/info":{"get":{"summary":"Get Key Info","description":"Retrieves key information by ID.\nGET method - no authentication required, no credit usage.","operationId":"get_key_info_key_info_get","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/add":{"post":{"summary":"Add Youtube Url","description":"Checks if a YouTube URL exists in the database.\nIf not, it saves the URL. If it exists, it returns the information from the database.","operationId":"add_youtube_url_add_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddURLRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddURLResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/get":{"get":{"summary":"Get Video Info","description":"Retrieves the information for a specific video and all related detected videos.\nGET method - no credit usage.","operationId":"get_video_info_get_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"video_id","in":"query","required":true,"schema":{"type":"string","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/check":{"post":{"summary":"Check Video","description":"Fetches essential video metadata in order to generate a search query for the scan endpoint.","operationId":"check_video_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/contact":{"post":{"summary":"Get Channel Contact","description":"Fetches channel contact info (emails, socials, network/MCN, metadata).\nAccepts a YouTube channel URL, @handle, custom name, or channel ID (UC…).","operationId":"get_channel_contact_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/scan":{"post":{"summary":"Scan For Similar Videos","description":"Queues a similarity scan. Returns 202 immediately; the actual scan runs in\nthe background and posts the final status to the configured webhook.\nThis endpoint uses youtube_credit.","operationId":"scan_for_similar_videos_scan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/scan_global":{"post":{"summary":"Scan Global For Similar Videos","description":"Queues a wide-coverage similarity scan (max 200 items). Returns 202\nimmediately; results are persisted to the same detected-videos table and a\nwebhook fires when finished. Does NOT consume youtube_credit.\n\nNote: /scan automatically chains into this same logic on success, so this\nendpoint exists for explicit on-demand global scans.","operationId":"scan_global_for_similar_videos_scan_global_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/scan/{scan_id}":{"get":{"summary":"Get Scan Status","description":"Returns the current status of a scan job.\nGET method - no authentication, no credit usage.","operationId":"get_scan_status_scan__scan_id__get","parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/report":{"post":{"summary":"Submit Report","description":"Saves report information (ip_info, ip_cert) and updates the status of detected videos.\nAutomatically downloads files from signed URLs in ip_info/ip_cert and saves them to R2 storage.","operationId":"submit_report_report_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AddURLRequest":{"properties":{"youtube_url":{"type":"string","title":"Youtube Url"}},"type":"object","required":["youtube_url"],"title":"AddURLRequest"},"AddURLResponse":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"video_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Video Id"},"data":{"anyOf":[{"$ref":"#/components/schemas/VideoIPResponse"},{"type":"null"}]}},"type":"object","required":["status","message"],"title":"AddURLResponse"},"CheckRequest":{"properties":{"video_id":{"type":"string","title":"Video Id"}},"type":"object","required":["video_id"],"title":"CheckRequest"},"ContactRequest":{"properties":{"channel":{"type":"string","title":"Channel"}},"type":"object","required":["channel"],"title":"ContactRequest"},"GetVideoResponse":{"properties":{"status":{"type":"string","title":"Status"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["status","data"],"title":"GetVideoResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeyInfoResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"broxi_credit":{"type":"integer","title":"Broxi Credit"},"youtube_credit":{"type":"integer","title":"Youtube Credit"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","broxi_credit","youtube_credit","created_at","updated_at"],"title":"KeyInfoResponse"},"ReportRequest":{"properties":{"video_id":{"type":"string","title":"Video Id"},"ip_info":{"type":"string","title":"Ip Info"},"ip_cert":{"type":"string","title":"Ip Cert"},"report_list":{"additionalProperties":{"type":"string"},"type":"object","title":"Report List"}},"type":"object","required":["video_id","ip_info","ip_cert","report_list"],"title":"ReportRequest"},"ScanRequest":{"properties":{"video_id":{"type":"string","title":"Video Id"},"is_sandbox":{"type":"boolean","title":"Is Sandbox","default":false},"scan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scan Id"}},"type":"object","required":["video_id"],"title":"ScanRequest"},"ScanStatusResponse":{"properties":{"scan_id":{"type":"string","title":"Scan Id"},"video_id":{"type":"string","format":"uuid","title":"Video Id"},"status":{"type":"string","title":"Status"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"total_results":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Results","default":0},"verified_videos":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Verified Videos","default":0},"saved_videos":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Saved Videos","default":0},"verified_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verified Title"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["scan_id","video_id","status","created_at","updated_at"],"title":"ScanStatusResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VideoIPResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"youtube_url":{"type":"string","title":"Youtube Url"},"ip_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Info"},"ip_cert":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Cert"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"channel_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Name"},"channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"},"channel_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Handle"},"subscriber_count":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriber Count"},"upload_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upload Date"},"date_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Text"},"relative_date_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relative Date Text"},"view_count":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"View Count"},"likes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Likes"},"comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comments"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"duration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duration"},"captions":{"anyOf":[{},{"type":"null"}],"title":"Captions"}},"type":"object","required":["id","youtube_url","ip_info","ip_cert","created_at","updated_at","title","description","channel_name","channel_id","channel_handle","subscriber_count","upload_date","date_text","relative_date_text","view_count","likes","comments","keywords","thumbnail_url","duration","captions"],"title":"VideoIPResponse"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"key"}}}}