Download an image or video
Delivers one image or video from a result, by the link the result gave, with Range support so players can seek and downloads can resume. Video comes as a streaming playlist plus a poster image. The file’s owner account is checked first: one that does not exist, or that Bluesky removed, is a 404. The status of the individual post a file belongs to is not checked: if that matters, check the post first with post-detail. 1 credit per request.
/media Utilities https://api.fetchlayer.dev/bluesky/media Headers
Authorization string required Bearer token — your FetchLayer API key.
Parameters
url string required An image or video link as a result gave it (media[].url, thumbnailUrl or videoUrl, an avatar or a banner). Only Bluesky media links; anything else is a 400.
Response Fields
media
Download an image or video
(binary) file The file, streamed with its own content type. A Range request is answered with 206 and content-range.
Request
curl -X GET "https://api.fetchlayer.dev/bluesky/media?url=https%3A%2F%2Fcdn.bsky.app%2Fimg%2Ffeed_fullsize%2Fplain%2Fdid%3Aplc%3Az72i7hdynmk6r22z27h6tvur%2F%E2%80%A6%40jpeg" \
-H "Authorization: Bearer ss-your-key"Response
{
"note": "The image’s bytes, streamed with its own content type."
}