{"uid":"cap_X1H8N29zZ42Y3OOwCQO_l","slug":"fastapi-online-media-download-url-magnet-to-binary-111bb5d8","name":"fastapi.online — Media Download (URL/Magnet to Binary)","description":"Self-hosted AI API gateway. Expensive endpoints require an x402 micropayment (USDC on Base) before executing.","url":"https://api.fastapi.online/download","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["url"],"properties":{"url":{"type":"string","maxLength":4096,"minLength":8,"description":"Public http(s) URL, or a magnet: link, of the media to pull."},"type":{"enum":["video","audio","image","magnet","auto"],"type":"string","default":"auto"},"filename":{"type":"string","maxLength":200}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":"<binary stream>"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_SgvedY1STfTEYa7F66Bih","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Downloads media (video, audio, image, or magnet-linked content) from a public URL or magnet link and returns the binary stream","exampleAgentPrompt":"Can you download the video at https://example.com/clip.mp4 and give me the file? Treat it as type 'video' and save it as 'clip.mp4'.","exampleUseCases":[{"title":"Archive a public video file","prompt":"Grab the video at https://archive.org/download/sample/sample.mp4 and download it for me as 'archive-sample.mp4' — use type 'video'."},{"title":"Fetch remote image for processing","prompt":"Download the image from https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/200px-PNG_transparency_demonstration_1.png as type 'image' and save it as 'demo.png'."},{"title":"Download audio from magnet link","prompt":"Pull the audio content from this magnet link — magnet:?xt=urn:btih:EXAMPLEHASH&dn=podcast.mp3 — set the type to 'audio' and filename to 'podcast.mp3'."}],"resultDescription":"A binary stream of the requested media file (video, audio, or image). The response is raw binary content, suitable for saving to disk or piping into further processing steps.","failureModes":["URL is not publicly accessible or returns a non-200 status — download fails","Magnet link has no seeders or content is unavailable — timeout or empty result","URL points to non-media content — may return unexpected binary or error","File too large — may time out or exceed server limits","Invalid or malformed URL/magnet string — validation error returned","Unsupported media type at the given URL — type mismatch error"],"whenToPreferThis":"Use this endpoint when you need to programmatically fetch a media file (video, audio, or image) from a known public URL or magnet link and receive the raw binary content — especially when you want a pay-per-call, no-signup approach via crypto. Prefer this over general HTTP fetch tools when magnet link support or media-type-aware downloading is needed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T05:29:08.796Z","isFirstParty":false}