When to Pass StreamInfo to MarkItDown Convert Methods: A Complete Guide

Pass a StreamInfo object to MarkItDown's convert methods whenever you need to override automatic file type detection, such as when processing raw binary streams, handling ambiguous MIME types, or ensuring deterministic behavior in unit tests.

The microsoft/markitdown library automatically infers file formats using filename extensions, MIME headers, and the Magika content-type detector. However, when dealing with raw BytesIO objects, misleading URLs, or custom encodings, you should explicitly provide StreamInfo metadata to ensure the correct converter is selected. This

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →