DSL reference

Options go in brackets after the source — att("report.pdf[pages: 1-4]") — or as keyword arguments: att("report.pdf", pages="1-4"). This page is generated from the option schemas in the code itself (the same data behind att.options(...) and GET /v1/options), so it cannot drift.

.bmp .gif .heic .heif .jpeg .jpg .png .tif .tiff .webp

optiontypedefaultwhat it does
max_dimintDownscale so the longest side is at most this many pixels
max_dim: 1024
rotateintRotate counterclockwise by this many degrees (negative = clockwise)
rotate: 90
ocrbool_or_autoFalseRecognize text in the image with RapidOCR: true/false, or auto (only when rapidocr is installed)
ocr: true
ocr_enginestrrapidocrOCR engine: rapidocr (local, default) or lighton (remote LightOnOCR vLLM endpoint via ATTACHMENTS_LIGHTON_URL)
ocr_engine: lighton

.cfg .css .ini .java .js .json .log .markdown .md .py .rst .tex .toml .ts .txt .xml .yaml .yml __text__

No options — it just works.

.csv .tsv

optiontypedefaultwhat it does
rows (alias: max_rows, limit)int200Maximum number of data rows rendered as text.
rows: 100
summaryboolFalseAppend a pandas-backed summary (shape, dtypes, numeric stats).
summary: true
delimiter (alias: sep)strField delimiter: a literal character or tab/comma/semicolon/pipe. Overrides sniffing.
delimiter: semicolon

.docx

optiontypedefaultwhat it does
images (alias: render)boolFalseExtract embedded images.
images: true

.flac .m4a .mp3 .ogg .opus .wav

optiontypedefaultwhat it does
modelstrbaseWhisper model size: tiny, base, small, medium, or large-v3.
model: small
languagestrSpoken language code (e.g. 'en', 'fr'); omit to autodetect.
language: en

.htm .html

optiontypedefaultwhat it does
images (alias: render)boolFalseExtract inline data-URI images.
images: true
select (alias: css)strCSS selector; extract only matching elements
select: "h1, .article"

.ipynb

optiontypedefaultwhat it does
outputsboolFalseInclude per-cell execution outputs: text outputs as fenced blocks (truncated at ~2000 chars each) and image/png outputs as image items.
outputs: true

.pdf

optiontypedefaultwhat it does
pages (alias: page)pagesPages to include: a 1-based page number or range.
pages: 1-4
password (alias: pw)strPassword for encrypted PDFs.
password: secret
images (alias: render)bool_or_autoautoRender pages to PNG: true/false, or auto (only when no text).
images: true
dpiint200Resolution for rendered page images.
dpi: 300
ocrbool_or_autoautoOCR scanned pages with RapidOCR when there is no text layer: true/false, or auto (only when rapidocr is installed).
ocr: true
ocr_enginestrrapidocrOCR engine: rapidocr (local, default) or lighton (remote LightOnOCR vLLM endpoint via ATTACHMENTS_LIGHTON_URL).
ocr_engine: lighton
max_pagesintHard cap on the number of pages parsed/rendered.
max_pages: 10

.pptx

optiontypedefaultwhat it does
images (alias: render)bool_or_autoFalseExtract embedded slide pictures: true/false ('auto'/'always' behave like true; slides are never rasterized).
images: true

.svg .svgz

optiontypedefaultwhat it does
images (alias: render)bool_or_autoFalseRasterize the SVG to PNG with cairosvg (true/false/auto/always).
images: true

.xls .xlsx

optiontypedefaultwhat it does
sheetstr_or_intSheet to render: a sheet name or 0-based index. Omit to render all sheets.
sheet: Sales
rows (alias: max_rows)int200Maximum number of rows rendered as text per sheet.
rows: 100