{"openapi":"3.1.0","info":{"title":"VideoResolver API","version":"0.0.1","description":"Download public videos and audio from a link. Authenticate with a personal API key from your account (Bearer token). The same key works with the MCP server at /api/mcp; see /agent-guide.md."},"servers":[{"url":"https://www.videoresolver.com/api/v1"}],"security":[{"bearerAuth":[]}],"paths":{"/account":{"get":{"summary":"Plan and remaining credits","operationId":"getAccount","responses":{"200":{"description":"Account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/media":{"get":{"summary":"Look up a media link without downloading it","operationId":"getMedia","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"}}],"responses":{"200":{"description":"Media details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}}},"400":{"description":"Invalid link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Unreadable or unsupported media","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/downloads":{"get":{"summary":"Most recent downloads","operationId":"listDownloads","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}}],"responses":{"200":{"description":"Downloads","content":{"application/json":{"schema":{"type":"object","properties":{"downloads":{"type":"array","items":{"$ref":"#/components/schemas/Download"}}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Start a download","description":"Charges 1 credit per started minute of media, only if the balance covers it. Poll GET /downloads/{id} until status is ready.","operationId":"createDownload","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"format":{"type":"string","enum":["mp4","mp3","m4a","wav"],"default":"mp4","description":"Paid plan or credit pack only; free accounts get mp4."},"quality":{"type":"string","enum":["best","1080p","720p","480p","360p","320kbps","128kbps"],"default":"best"}}}}}},"responses":{"202":{"description":"Download started","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Download"}}}},"400":{"description":"Invalid link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/downloads/{id}":{"get":{"summary":"Download status","description":"When status is ready, download_url is a signed link valid for 1 hour; request the download again for a fresh link.","operationId":"getDownload","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Download","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Download"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Personal API key (vr_…)"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"Account":{"type":"object","properties":{"plan":{"type":"string","enum":["free","basic","pro","mega"]},"credits":{"type":"integer"},"renews_at":{"type":["string","null"],"format":"date-time"},"manage_url":{"type":"string","format":"uri"}}},"Media":{"type":"object","properties":{"title":{"type":"string"},"channel":{"type":["string","null"]},"platform":{"type":["string","null"]},"thumbnail":{"type":["string","null"]},"duration_seconds":{"type":"integer"},"credits_required":{"type":"integer"}}},"Download":{"type":"object","properties":{"download_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"platform":{"type":["string","null"]},"duration_seconds":{"type":"integer"},"format":{"type":"string"},"quality":{"type":"string"},"status":{"type":"string","enum":["analyzed","processing","storing","ready","failed","expired"]},"progress":{"type":"integer","minimum":0,"maximum":100},"credits":{"type":"integer"},"expires_at":{"type":["string","null"],"format":"date-time"},"download_url":{"type":"string","format":"uri","description":"Present when status is ready"}}}}}}