Attachments, pictures, PDFs and audio
Specs: attachments, file tools (export_pdf, generate_audio, generate_image), models (speech, pictures).
Images, PDFs, text files, audio and video, as far as the model takes them:
| Images | PDFs | Text | Audio and video | |
|---|---|---|---|---|
| Gemini | PNG, JPEG, WebP, GIF, BMP, HEIC, HEIF | read as they are | yes | MP3, WAV, AAC, FLAC, Ogg, Opus, M4A; MP4, MOV, MPEG, WebM, AVI, WMV, FLV, 3GP |
| Claude | PNG, JPEG, WebP, GIF, BMP | read as they are | yes | no |
| OpenAI, Ollama and others | PNG, JPEG, WebP, GIF, BMP | as their text | yes | no |
- Only what the model takes. The desktop app’s attach button offers only the types the current agent’s model takes, and paste, drop,
@mentionsand/attachrefuse others with the reason (“claude-sonnet-5 can’t take talk.mov”). Switch agent or model, and the list follows. - Text files (notes, CSV, JSON, code; up to 1 MB) go to every model as text.
- GIF and BMP become PNG, which every provider takes.
- Audio and video go to Gemini. Up to 14 MB goes in the request; larger files, up to 2 GB from the workspace, go through Gemini’s Files API, where Google keeps them for 48 hours, and Blitz uploads them again after that. With Gemini on Vertex AI there’s no Files API, so 14 MB is the limit. A file dropped into the desktop app can be up to 30 MB; put a larger one in the workspace and attach it from there (
@talk.mp4). The agent opens recordings and videos in the workspace withview_media. - Switching models keeps a conversation’s files: a model that can’t take one gets a note saying so (PDFs and text, their text).
- The desktop app plays sound, and MP4, MOV and WebM video, when you open one; other video opens in the system’s player.
Mention an image in a prompt (what's wrong with @screenshots/login.png?, or @"with spaces.png"), queue one with /attach <path>, paste a screenshot with /paste, or pass --image on the command line. The model also has a view_image tool for images it finds in the workspace. In the desktop app, attach or paste into the chat.
For Ollama, pick a vision model.
- Files are read through the workspace sandbox: blocked paths and anything outside the workspace are refused.
- Pictures larger than
[images] max_dimension(1568 px) or 3.75 MB are scaled down and re-encoded. Headers are checked before decoding, so oversized “decompression bomb” files are rejected. - Session files store a short reference, not the image. The picture is kept once in
~/.blitz/images(owner-only, named by its SHA-256) and deleted afterretain_days(30) unused. The audit log records the path and hash. /pasteusesosascripton macOS,wl-pasteorxclipon Linux, and PowerShell on Windows.
PDFs attach the way images do: summarise @papers/attention.pdf, /attach, --image, or attach, paste or drop one in the desktop app. The agent reads one it finds with view_document, and read_file on a PDF gives its text, page by page.
- Gemini and Claude read the PDF itself, figures, tables and equations included, while it’s within their API’s limits (Gemini: 14 MB and 1,000 pages; Claude: 22 MB and 100 pages).
- Other models get its text, taken from the PDF and marked as such: OpenAI-compatible models, Ollama, Claude on Bedrock, and any PDF over those limits. A scanned PDF has no text to give; use a model that reads PDFs.
- Up to 32 MB a PDF. It’s kept once in
~/.blitz/images, like an image, with its text beside it once read. Switching models mid-session is safe: each request gives the PDF the way that model takes it. /contextcounts PDFs apart from images, about 1,500 tokens a page.
export_pdf typesets a Markdown file as a PDF beside it (notes/week1.md → notes/week1.pdf, or output), in pure Go, so it works in the terminal, in jobs and in the service. It asks before writing, like any file the agent creates, and /undo removes it. Ask for a PDF of something that isn’t a file (“a summary of our conversation as a PDF”) and only the PDF is written: the agent gives the tool the Markdown itself.
- Headings become the PDF’s outline; lists, task lists, quotes, tables, code (highlighted), rules and page numbers are laid out; accents, Greek, Cyrillic and maths symbols print.
- Pictures the file shows in the workspace are included (an HTML
<img>too); web pictures and other raw HTML aren’t. Maths and Mermaid diagrams print as their source: export from the desktop app to draw them. - Paper is A4 or Letter:
[pdf] page_size = "a4","letter", or"auto"(the default, from your locale).
In the desktop app, Export › Export as PDF in a Markdown file’s bar prints the preview exactly as it shows, diagrams included, with the system’s own web engine. No browser needed.
export_docx writes a Markdown file as a Word document beside it (notes/week1.md → notes/week1.docx), with the same rules as export_pdf: it asks first, /undo removes it, and “a summary of our conversation as a Word document” writes only the .docx. In the desktop app, Export › Export as Word in a Markdown file’s bar does the same with what’s in the editor, and /export notes.docx (or blitz sessions export <id> -o notes.docx) writes a conversation.
- It uses Word’s own styles: headings are Heading 1–6 (so the navigation pane and a table of contents work), and lists, quotes, code and tables have styles you can change for the whole document at once.
- Links stay links, including links to a heading in the same file; pictures the file shows in the workspace are embedded, SVG and HTML
<img>tags included. - Maths (
$…$and$$…$$) becomes Word equations you can edit. - From the desktop app, Mermaid diagrams are drawn into the document; the agent’s
export_docxand/exportkeep a diagram as its code. Other raw HTML is left out.
generate_audio reads text aloud into a sound file, for an audio overview of your notes or a two-host conversation about a paper. Set a speech model first:
[audio]
model = "gemini/gemini-2.5-flash-preview-tts" # or "openai/gpt-4o-mini-tts"
voice = "Kore" # optional
speakers = [{ name = "Ana", voice = "Kore" }, { name = "Ben", voice = "Puck" }] # for two hosts
In the desktop app it’s Speech model in a workspace’s settings, under Agent and model. Until one is set, agents don’t have the tool.
- One voice, or two: with
speakers, each line of the script starts with a speaker’s name and a colon (Ana: So what is attention?). - Gemini makes
.wavfiles; OpenAI makes.mp3. Markdown formatting isn’t read out. A call takes at mostmax_chars(9,000, about ten minutes); split a longer script into parts. - It asks first (it sends the text to the provider), and its cost goes in the session’s
/cost. Withsandbox.allow_network = falseit’s refused. - The desktop app plays
.wav,.mp3,.m4a,.ogg,.opusand.flacfiles when you open them. - The next model in the conversation can hear what it made, if it takes audio (Gemini does).
Ask for a picture (“draw a poster for the study group”, “make our logo blue”) and the agent draws it with generate_image, whatever model you talk to. Set an image model first:
[images]
model = "gemini/gemini-3.1-flash-image" # or gemini-3.1-flash-lite-image, gemini-3-pro-image
# model = "openai/gpt-image-2" # or gpt-image-2.5-sunburst, gpt-image-2.5-flare, gpt-image-1.5, gpt-image-1
OpenAI’s image models use your OpenAI key: they make up to four pictures a request, square, landscape (3:2) or portrait (2:3), and start from up to 16 pictures you give them. In Pictures they’re listed under OpenAI once you’ve set up an OpenAI key. Their prices aren’t in Blitz’s price list yet, so the cost shown (about $0.04 a picture) is an estimate.
In the desktop app it’s Image model in a workspace’s settings, under Agent and model. Until one is set, agents don’t have the tool, and the agent tells you to set one.
With your organization’s service, choose one of its image models instead (model = "enterprise/gemini-3.1-flash-image", or the name your admins gave it). Pictures then go through the service, with your organization’s sign-in, checks, budgets and logs, and you don’t need a Gemini key of your own. You can also pick an organization’s image model as a conversation’s model: the pictures it draws show in the conversation.
- The picture goes into the workspace (
images/poster.png) and shows in the conversation, with Save. The agent sees it too, so you can ask for changes. - To change a picture or match its style, mention it: “make @logo.png blue”. PNG, JPEG or WebP pictures go with the request, as many as the model takes (14 with Gemini’s larger models, 16 with OpenAI’s; Imagen takes none).
- The agent can ask for any shape and size the model makes (panoramic 4:1 and 8:1 too, 0.5K to 4K; larger costs more), and with Imagen or OpenAI’s models for up to four pictures at once, written beside each other (
poster.png,poster-2.png). Imagen works here too (model = "gemini/imagen-4.0-generate-preview"). - What it draws is kept as a Pictures session as well: Open in Pictures beside the picture in the conversation opens it in the panel, where you can refine it.
- It asks first (it sends the prompt, and any pictures, to Google or your organization’s service), and its cost goes in the session’s
/cost: about $0.07 a 1K picture with 3.1 Flash Image, $0.13 with 3 Pro Image. Withsandbox.allow_network = falseit’s refused.
For more than one picture in passing, open Pictures: the brush icon in the chat box, /picture (with what to draw, to start there), or in the file tree Edit in Pictures on a picture or Make a picture here on a folder. It’s a place to work on pictures, with everything the model can do:
- Model: Gemini’s image models (Nano Banana 2.1, 3.1 Flash Image, 3 Pro Image, the Lite and 2.5 ones) and Imagen, with what a picture costs. The settings below follow the model: what it doesn’t take is hidden or locked, and a model change says what it put back.
- Start from or match: drop pictures from the computer or the file tree, paste one, or pick one from the workspace, and say what each is for: a Character to keep the same, an Object to keep faithful, a Style to take the look of (up to 14 with the larger Gemini models).
- Pictures (1 to 4 with Imagen), Shape (drawn as itself, panoramic 4:1 and 8:1 included where the model has them), Size (0.5K to 4K), Thinking, and Search the web (and image search) to ground a picture in real places and things.
- Advanced: what to avoid, people, the format and quality, a seed, and prompt improvement (Imagen).
Each turn shows what it will cost before you make it. With a Gemini model a session is a conversation: say what to change (“make the sky darker”) and the next picture changes the last, or Start from this on any picture. With Imagen or OpenAI’s models each turn stands on its own: Try again under a turn makes it again as it was, and Vary (Imagen) makes it again with a new seed. Every picture can be Saved into the workspace (pictures/, or [images] folder), saved somewhere else, opened, used as a reference, copied or added to the chat. Sessions are kept: Sessions at the top reopens them.
blitz picture makes a turn as the panel does, with the same checks: what the model doesn’t take is refused before anything is sent.
blitz picture "a lighthouse at dusk, bold title at the top" --ratio 3:2 -o posters/lighthouse.png
blitz picture -n 4 -m gemini/imagen-4.0-generate-preview "a red fox in the snow"
echo "make it a watercolour" | blitz picture --ref posters/lighthouse.png:style
blitz picture --continue pic-1a2b3c4d5e6f "now at night"
It prints where each picture was saved (-o, numbered when there are several, or the pictures folder), what it cost, and its Pictures session, which the desktop’s Pictures reopens. blitz picture models lists the image models with their shapes and sizes (the default marked *), blitz picture list the sessions, blitz picture show <session> one session’s turns (each prompt, its settings and references, where its pictures were saved, what the model said and what it cost; --json for JSON), and blitz picture delete <session> removes one (not what was saved).
A model that makes pictures or audio (Gemini’s image models, for one) puts them in the conversation: a picture shows as one, audio with a player, anything else as a chip. Save writes it into the workspace under its name, which says the model that made it (gemini-3-pro-image-1a2b3c4d.png). In the terminal, Blitz prints where it’s kept. It stays part of the conversation: switch to another model and that model sees it too, if it takes pictures.