IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Python class

MediaDataUriFetcher

MediaDataUriFetcher​

class max.pipelines.request.MediaDataUriFetcher(*args, **kwargs)

source

Bases: Protocol

Fetches a web media URL and returns it as a base64 data: URI.

The serving layer supplies the implementation (see max.serve.router._image_resolution.fetch_media_data_uri), which is where the byte caps and host validation for client-supplied URLs live. This library cannot fetch on its own: it does not depend on max.serve, and an unvalidated downloader here would be a second SSRF surface to harden.