{"openapi":"3.1.0","info":{"title":"YTSave Universal API","description":"Universal multi-tenant resolver and download-job API for public or authorized media. Job-producing endpoints require X-API-Key credentials issued by an operator after contact approval; the first-party website uses a separate visitor-bound proof.","version":"1.0.0"},"paths":{"/v1/resolve":{"post":{"summary":"Resolve Media","operationId":"resolve_media_v1_resolve_post","parameters":[{"name":"x-tenant-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Key"}},{"name":"x-antibot-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Antibot-Token"}},{"name":"x-ytsave-browser","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ytsave-Browser"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/resolve-batch":{"post":{"summary":"Resolve Media Batch","description":"Analyze a small URL batch without creating jobs or consuming quota.","operationId":"resolve_media_batch_v1_resolve_batch_post","parameters":[{"name":"x-tenant-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Key"}},{"name":"x-ytsave-browser","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ytsave-Browser"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultiLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/preview":{"post":{"summary":"Preview Media","description":"Return lightweight display metadata without starting media extraction.","operationId":"preview_media_v1_preview_post","parameters":[{"name":"x-tenant-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs":{"post":{"summary":"Enqueue Job","operationId":"enqueue_job_v1_jobs_post","parameters":[{"name":"x-tenant-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Key"}},{"name":"x-antibot-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Antibot-Token"}},{"name":"x-ytsave-browser","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ytsave-Browser"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/probe":{"post":{"tags":["experimental"],"summary":"Probe Any Website","operationId":"probe_any_website_v1_probe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProbeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}":{"get":{"summary":"Get Job","operationId":"get_job_v1_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"wait_seconds","in":"query","required":false,"schema":{"type":"number","default":0.0,"title":"Wait Seconds"}},{"name":"x-tenant-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Key"}},{"name":"x-ytsave-browser","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ytsave-Browser"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}/cancel":{"post":{"summary":"Cancel Download Job","operationId":"cancel_download_job_v1_jobs__job_id__cancel_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-tenant-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Tenant-Key"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}/feedback":{"post":{"summary":"Download Feedback","operationId":"download_feedback_v1_jobs__job_id__feedback_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadFeedbackRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/download/{token}/direct":{"get":{"summary":"Direct Download","description":"Hand an eligible public CDN stream to the visitor without proxying bytes.","operationId":"direct_download_download__token__direct_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/download/{token}":{"get":{"summary":"Download","operationId":"download_download__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/extras/{token}":{"get":{"summary":"Download Media Extra","description":"Deliver one small subtitle/thumbnail without exposing its signed source URL.","operationId":"download_media_extra_v1_extras__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/platforms":{"get":{"summary":"Platforms","operationId":"platforms_v1_platforms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/sources/status":{"get":{"summary":"Source Runtime Status","description":"Return aggregate source health without submitted paths, queries or titles.","operationId":"source_runtime_status_v1_sources_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/source-requests":{"post":{"summary":"Request Source","description":"Count demand by hostname only; never retain a submitted path or query.","operationId":"request_source_v1_source_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/extractors":{"get":{"summary":"Extractors","operationId":"extractors_v1_extractors_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"working_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Working Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/health/platforms":{"get":{"summary":"Platform Health","operationId":"platform_health_v1_health_platforms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/health/providers":{"get":{"summary":"Provider Health","operationId":"provider_health_v1_health_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/readyz":{"get":{"summary":"Readyz","operationId":"readyz_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"CapabilityProfile":{"properties":{"schema_version":{"type":"integer","maximum":1.0,"minimum":1.0,"title":"Schema Version","default":1},"browser_family":{"type":"string","maxLength":24,"title":"Browser Family","default":"browser"},"mobile":{"type":"boolean","title":"Mobile","default":false},"writable_stream":{"type":"boolean","title":"Writable Stream","default":false},"readable_stream":{"type":"boolean","title":"Readable Stream","default":false},"web_worker":{"type":"boolean","title":"Web Worker","default":false},"wasm":{"type":"boolean","title":"Wasm","default":false},"file_system_access":{"type":"boolean","title":"File System Access","default":false},"web_codecs":{"type":"boolean","title":"Web Codecs","default":false},"service_worker":{"type":"boolean","title":"Service Worker","default":false},"direct_media_probe":{"type":"boolean","title":"Direct Media Probe","default":false},"hardware_concurrency":{"anyOf":[{"type":"integer","maximum":64.0,"minimum":1.0},{"type":"null"}],"title":"Hardware Concurrency"},"device_memory_gib":{"anyOf":[{"type":"number","maximum":64.0,"minimum":0.25},{"type":"null"}],"title":"Device Memory Gib"}},"type":"object","title":"CapabilityProfile","description":"Coarse, privacy-bounded browser capabilities used for delivery planning.\n\nThis is deliberately not a device fingerprint. It contains no user agent,\nscreen dimensions, IP address, persistent identifier, URL or credentials."},"DownloadFeedbackRequest":{"properties":{"success":{"type":"boolean","title":"Success"},"reason":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Reason"}},"type":"object","required":["success"],"title":"DownloadFeedbackRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"JobRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"format_id":{"type":"string","title":"Format Id"},"tenant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant"},"capability_profile":{"anyOf":[{"$ref":"#/components/schemas/CapabilityProfile"},{"type":"null"}]}},"type":"object","required":["url","format_id"],"title":"JobRequest"},"MultiLinkRequest":{"properties":{"urls":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Urls"},"tenant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant"}},"type":"object","required":["urls"],"title":"MultiLinkRequest"},"ProbeRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"}},"type":"object","required":["url"],"title":"ProbeRequest"},"ResolveRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"tenant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant"}},"type":"object","required":["url"],"title":"ResolveRequest"},"SourceRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"}},"type":"object","required":["url"],"title":"SourceRequest"},"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"}}}}