> Version notice: This site documents BAML v0, the legacy DSL. BAML v1 is a separate, fully featured programming language in public beta. If the user intends to use BAML v1, ignore this site's content and use the BAML v1 documentation instead. If the intended version is unclear, clarify it before using this page.
> For clean Markdown of any page, append .md to the page URL. For the complete documentation index, see https://docs.boundaryml.com/llms.txt. For MCP access, connect to https://docs.boundaryml.com/_mcp/server.

# Image / Audio / Pdf / Video

> Learn how to handle image, audio, Pdf, and video inputs in BAML functions

BAML functions can accept image, audio, Pdf, and video inputs for multimedia processing capabilities. Choose the appropriate type based on your needs:

#### [Image](./image)

Create Image objects from URLs, base64 data, or browser-specific sources like File and Blob objects.

#### [Audio](./audio)

Create Audio objects from URLs, base64 data, or browser-specific sources like File and Blob objects.

#### [Pdf](./pdf)

Create Pdf objects from URLs, base64 data, or browser-specific sources like File and Blob objects.

#### [Video](./video)

Create Video objects from URLs, base64 data, or browser-specific sources like File and Blob objects.

## URL Resolution

BAML automatically handles URL-to-base64 conversion based on provider requirements. You can control this behavior using the `media_url_handler` configuration option in your client definition.

By default:

* URLs are converted to base64 for providers that don't support external URLs
* Google Cloud Storage URLs (gs\://) are preserved when using Google providers
* MIME types are added when required by the provider

See the client configuration documentation for provider-specific defaults and configuration options.