āļāļđāđāļĄāļ·āļāļāļēāļĢāļāļķāļāļĢāļđāļāļ āļēāļāļāļēāļ PDF āđāļĨāļ°āļŠāļĢāđāļēāļ Markdown āļāļĢāđāļāļĄ Alternative Text āļāđāļ§āļĒ Docling#
1. āđāļāđāļēāļŦāļĄāļēāļĒ#
āļāļđāđāļĄāļ·āļāļāļĩāđāļāļāļīāļāļēāļĒāļ§āļīāļāļĩāđāļāđ Docling āđāļāļ·āđāļāđāļāļĨāļāđāļāļāļŠāļēāļĢ PDF āđāļāđāļāļĢāļđāļāđāļāļ Markdown āļāļĢāđāļāļĄāļāļąāļ:
- āļāļķāļāļĢāļđāļāļ āļēāļāļāļāļāļāļēāļ PDF â āļāļąāļāļāļķāļāļĢāļđāļāļ āļēāļāđāļāđāļĨāļ°āļ āļēāļāđāļāđāļāđāļāļĨāđāđāļĒāļāļāđāļēāļāļŦāļēāļ āļŦāļĢāļ·āļāļāļąāļ (embed) āđāļāđāļ base64 āļ āļēāļĒāđāļāđāļāļĨāđ Markdown
- āļŠāļĢāđāļēāļ Alternative Text (Alt Text) āļāļąāļāđāļāļĄāļąāļāļī â āđāļāđāđāļĄāđāļāļĨ AI (Vision-Language Model) āļ§āļīāđāļāļĢāļēāļ°āļŦāđāļĢāļđāļāļ āļēāļāđāļĨāļ°āļŠāļĢāđāļēāļāļāļģāļāļāļīāļāļēāļĒāļŠāļģāļŦāļĢāļąāļ
āđāļ Markdown
āļāļģāđāļĄāļāļķāļāļŠāļģāļāļąāļ?#
- Accessibility: Alt text āļāđāļ§āļĒāđāļŦāđ Screen Reader āļāđāļēāļāđāļāđāđāļĨāļ°āđāļāđāļ Web Accessibility āļĄāļēāļāļĢāļāļēāļ
- RAG / Gen AI: āđāļāļāļŠāļēāļĢ Markdown āļāļĩāđāļĄāļĩ alt text āļŠāļĄāļāļđāļĢāļāđāļāđāļ§āļĒāđāļŦāđāļĢāļ°āļāļ AI āđāļāđāļēāđāļāđāļāļ·āđāļāļŦāļēāļĢāļđāļāļ āļēāļāđāļāđāļāļĩāļāļķāđāļ
- Documentation: āđāļāļāļŠāļēāļĢāļāļĩāđāđāļāđāļĄāļĩāļāļ§āļēāļĄāļŠāļĄāļāļđāļĢāļāđāļāļąāđāļāļāđāļāļāļ§āļēāļĄāđāļĨāļ°āļĢāļđāļāļ āļēāļāļāļĢāđāļāļĄāļāļģāļāļāļīāļāļēāļĒ
Workflow āļ āļēāļāļĢāļ§āļĄ#
PDF Document
â
âž
Docling Pipeline (PdfPipelineOptions)
âââ generate_picture_images=True â āļāļķāļāļĢāļđāļāļ āļēāļ
âââ images_scale=2.0 â āļāļ§āļēāļĄāļĨāļ°āđāļāļĩāļĒāļāļŠāļđāļ
âââ do_picture_description=True â AI āļŠāļĢāđāļēāļ description
â
âž
DoclingDocument
â
âââ export_to_markdown(image_mode=ImageRefMode.REFERENCED)
â â Markdown āļāļĢāđāļāļĄ 
â
âââ save_as_markdown(...)
â āļāļąāļāļāļķāļāđāļāļĨāđ .md āļāļĢāđāļāļĄāđāļāļĨāđāļāļāļĢāđāļĢāļđāļāļ āļēāļ
āļ§āļīāļāļĩāļāļĩāđāļĢāļāļāļĢāļąāļ#
| āļ§āļīāļāļĩ | āđāļŦāļĄāļēāļ°āļāļąāļ | āļĢāļēāļĒāļĨāļ°āđāļāļĩāļĒāļ |
|---|---|---|
| Python SDK | āļāļąāļāļāļąāļāļāļē, batch processing, automation | āļāļ§āļāļāļļāļĄāđāļāđāļĨāļ°āđāļāļĩāļĒāļ āļĒāļ·āļāļŦāļĒāļļāđāļāļŠāļđāļ |
| REST API (docling-serve) | āļĢāļ°āļāļ microservice, āļāļĩāļĄāļāđāļēāļāļ āļēāļĐāļē | āļāđāļēāļĒ āđāļāđ HTTP request āđāļāđāļāļąāļāļāļĩ |
2. āļ§āļīāļāļĩāļāļĩāđ 1: āđāļāđ Python SDK#
2.1 āļāļēāļĢāļāļīāļāļāļąāđāļ#
āļāļīāļāļāļąāđāļ Docling āļāđāļ§āļĒ pip:
pip install docling
āļāđāļāļāļģāļŦāļāļāļĢāļ°āļāļ:
- Python 3.9 āļāļķāđāļāđāļ
- āļŠāļģāļŦāļĢāļąāļ
do_picture_description=True: āļāđāļāļāļāļēāļĢ GPU (āđāļāļ°āļāļģ) āļŦāļĢāļ·āļ CPU āļāļĩāđāļĄāļĩ RAM āđāļāļĩāļĒāļāļāļāļŠāļģāļŦāļĢāļąāļāđāļŦāļĨāļ vision model
2.2 āļāļēāļĢāļāļąāđāļāļāđāļē Pipeline Options#
Docling āđāļāđ PdfPipelineOptions āđāļāļāļēāļĢāļāļ§āļāļāļļāļĄāļāļĢāļ°āļāļ§āļāļāļēāļĢāđāļāļĨāļ PDF
generate_picture_images=True#
āđāļāļīāļāđāļāđāļāļēāļāļāļēāļĢāļāļķāļāļĢāļđāļāļ āļēāļ (PictureItem) āļāļāļāļāļēāļ PDF āđāļāđāļāļ āļēāļāđāļĒāļāļāđāļēāļāļŦāļēāļ
pipeline_options = PdfPipelineOptions(
generate_picture_images=True # Default: False
)
āļŦāļĄāļēāļĒāđāļŦāļāļļ: āļŦāļēāļāđāļĄāđāļāļąāđāļāļāđāļē
generate_picture_images=TrueāļĢāļđāļāļ āļēāļāļāļ°āļāļđāļāđāļāļāļāļĩāđāļāđāļ§āļĒ placeholder āđāļāđāļēāļāļąāđāļ
images_scale=2.0#
āļāļĢāļąāļāļāļ§āļēāļĄāļĨāļ°āđāļāļĩāļĒāļāļāļāļāļĢāļđāļāļ āļēāļāļāļĩāđāļāļķāļāļāļāļāļĄāļē
pipeline_options = PdfPipelineOptions(
generate_picture_images=True,
images_scale=2.0 # Default: 1.0, CLI default: 2.0
)
āļāđāļē images_scale | āļāļĨāļĨāļąāļāļāđ | āļāļāļēāļāđāļāļĨāđ |
|---|---|---|
| 1.0 (default) | āļāļ§āļēāļĄāļĨāļ°āđāļāļĩāļĒāļāļāļāļāļī | āđāļĨāđāļ |
| 2.0 (āđāļāļ°āļāļģ) | āļāļ§āļēāļĄāļĨāļ°āđāļāļĩāļĒāļāļŠāļđāļāļāļķāđāļ 2à | āļāļĨāļēāļ |
| 3.0+ | āļāļ§āļēāļĄāļĨāļ°āđāļāļĩāļĒāļāļŠāļđāļāļĄāļēāļ | āđāļŦāļāđ |
â ïļ āļāļģāđāļāļ·āļāļ: āļĄāļĩāļĢāļēāļĒāļāļēāļāļāļąāļāļŦāļē image cropping āđāļĄāļ·āđāļ
images_scale > 1.0āđāļāļāļēāļāđāļ§āļāļĢāđāļāļąāļ āļŦāļēāļāļāļāļāļąāļāļŦāļē āđāļŦāđāļĨāļāļāđāļāđimages_scale=1.0āļāđāļāļ
do_picture_description=True#
āđāļāļīāļāđāļāđāļāļēāļ AI Vision-Language Model āđāļāļ·āđāļāļŠāļĢāđāļēāļāļāļģāļāļāļīāļāļēāļĒāļĢāļđāļāļ āļēāļ
pipeline_options = PdfPipelineOptions(
generate_picture_images=True,
do_picture_description=True # Default: False
)
picture_description_preset="granite_vision"#
āđāļĨāļ·āļāļ preset āļāļāļāđāļĄāđāļāļĨāļāļĩāđāđāļāđāļŠāļĢāđāļēāļāļāļģāļāļāļīāļāļēāļĒ
Available presets āļŠāļģāļŦāļĢāļąāļ picture description:
| Preset | āđāļĄāđāļāļĨ | āļŦāļĄāļēāļĒāđāļŦāļāļļ |
|---|---|---|
smolvlm | SmolVLM | Default - āđāļĢāđāļ§ āļāļāļēāļāđāļĨāđāļ |
granite_vision | Granite-Vision-3.3-2B | āđāļāļ°āļāļģ - āļŠāļĄāļāļļāļĨ |
pixtral | Pixtral | āļāļ§āļēāļĄāļŠāļēāļĄāļēāļĢāļāļŠāļđāļ |
qwen | Qwen-VL | āļāļēāļāđāļĨāļ·āļāļ |
pipeline_options = PdfPipelineOptions(
do_picture_description=True,
picture_description_preset="granite_vision"
)
picture_description_area_threshold#
āļāļģāļŦāļāļāļāļāļēāļāļāļąāđāļāļāđāļģāļāļāļāļĢāļđāļāļ āļēāļ (āđāļāļĩāļĒāļāļāļąāļāļāļ·āđāļāļāļĩāđāļŦāļāđāļē) āļāļĩāđāļāļ°āļāļĢāļ°āļĄāļ§āļĨāļāļĨ
pipeline_options = PdfPipelineOptions(
do_picture_description=True,
picture_description_area_threshold=0 # āļāļāļīāļāļēāļĒ *āļāļļāļ* āļĢāļđāļ (default: 0.05 = 5%)
)
| āļāđāļē | āļāļĨ |
|---|---|
0 | āļāļāļīāļāļēāļĒāļāļļāļāļĢāļđāļ āđāļĄāđāļ§āđāļēāļāļ°āđāļĨāđāļāđāļāđāđāļŦāļ |
0.05 (default) | āļāļāļīāļāļēāļĒāđāļāļāļēāļ°āļĢāļđāļāļāļĩāđāđāļŦāļāđāļāļ§āđāļē 5% āļāļāļāļŦāļāđāļē |
0.1 | āļāļāļīāļāļēāļĒāđāļāļāļēāļ°āļĢāļđāļāļāļĩāđāđāļŦāļāđāļāļ§āđāļē 10% āļāļāļāļŦāļāđāļē |
ImageRefMode â āļāļ§āļāļāļļāļĄāļāļēāļĢāļāļąāļāļĢāļđāļāļ āļēāļāđāļ Markdown#
ImageRefMode enum āļāļēāļ docling_core.types.doc āļāļ§āļāļāļļāļĄāļ§āđāļēāļĢāļđāļāļ āļēāļāļāļ°āļāļĢāļēāļāļāđāļ Markdown āļāļĒāđāļēāļāđāļĢ
| āđāļŦāļĄāļ | āļāđāļē | āļāļĨāļĨāļąāļāļāđāđāļ Markdown | āđāļŦāļĄāļēāļ°āļāļąāļ |
|---|---|---|---|
PLACEHOLDER | "placeholder" | <!-- image --> | āļāļāļŠāļāļ layout |
EMBEDDED | "embedded" |  | āđāļāļĨāđāđāļāļĩāļĒāļ§ (portable) |
REFERENCED | "referenced" |  | Version control, āđāļ§āđāļ |
2.3 āļāļąāļ§āļāļĒāđāļēāļāđāļāđāļāļŠāļĄāļāļđāļĢāļāđ#
from pathlib import Path
from docling.document_converter import DocumentConverter, PdfFormatOption
from docling.datamodel.pipeline_options import PdfPipelineOptions
from docling.datamodel.base_models import InputFormat
from docling_core.types.doc import ImageRefMode
# 1. āļāļąāđāļāļāđāļē Pipeline Options
pipeline_options = PdfPipelineOptions(
generate_picture_images=True, # āļāļķāļāļĢāļđāļāļ āļēāļāļāļāļāļĄāļē
images_scale=2.0, # āļāļ§āļēāļĄāļĨāļ°āđāļāļĩāļĒāļāļŠāļđāļāļāļķāđāļ 2Ã
do_picture_description=True, # āļŠāļĢāđāļēāļ AI description
picture_description_preset="granite_vision", # āđāļāđ Granite Vision
picture_description_area_threshold=0, # āļāļāļīāļāļēāļĒāļāļļāļāļĢāļđāļ
)
# 2. āļŠāļĢāđāļēāļ DocumentConverter
converter = DocumentConverter(
format_options={
InputFormat.PDF: PdfFormatOption(
pipeline_options=pipeline_options
)
}
)
# 3. āđāļāļĨāļāđāļāļāļŠāļēāļĢ
result = converter.convert("document.pdf")
# 4. Export āđāļāđāļ Markdown
output_dir = Path("output")
output_dir.mkdir(exist_ok=True)
# āļ§āļīāļāļĩāļāļĩāđ 1: āļāļąāļāļāļķāļāđāļāļĨāđ .md āļāļĢāđāļāļĄāđāļāļĨāđāļāļāļĢāđāļĢāļđāļāļ āļēāļ (āđāļāļ°āļāļģ)
result.document.save_as_markdown(
output_dir / "document.md",
image_mode=ImageRefMode.REFERENCED # āļĢāļđāļāļ āļēāļāļāļĒāļđāđāđāļāđāļāļĨāđāļāļāļĢāđāđāļĒāļ
)
# āļ§āļīāļāļĩāļāļĩāđ 2: āļāļķāļ Markdown string āđāļāļĒāļāļĢāļ (āļĢāļđāļāļ āļēāļāđāļāđāļ base64)
markdown_str = result.document.export_to_markdown(
image_mode=ImageRefMode.EMBEDDED # āļĢāļđāļāļ āļēāļāļāļĒāļđāđāđāļ Markdown āđāļĨāļĒ
)
print(markdown_str[:500]) # āđāļŠāļāļ 500 āļāļąāļ§āļāļąāļāļĐāļĢāđāļĢāļ
āļāļāļīāļāļēāļĒāļāļĨāļĨāļąāļāļāđ:
save_as_markdown(..., image_mode=ImageRefMode.REFERENCED)āļāļ°āļŠāļĢāđāļēāļ:- āđāļāļĨāđ
output/document.md - āđāļāļĨāđāļāļāļĢāđ
output/document_artifacts/āļāļĩāđāļĄāļĩāļĢāļđāļāļ āļēāļāļāļąāđāļāļŦāļĄāļ
- āđāļāļĨāđ
2.4 āļāļēāļĢāļāļ§āļāļāļļāļĄ Alt Text āļāđāļ§āļĒ image_alt_mode (āļāļĩāđāļāļāļĢāđāļāļģāļĨāļąāļāļāļąāļāļāļē)#
ðŽ āļŠāļāļēāļāļ°: āļāļĩāđāļāļāļĢāđāļāļĩāđāļāļĒāļđāđāđāļ PR #463 āļāļāļ docling-core â āļĒāļąāļāđāļĄāđ merge āđāļāđāļē main branch āļāļīāļāļāļēāļĄāļŠāļāļēāļāļ°āđāļāđāļāļĩāđ github.com/docling-project/docling-core/pull/463
āđāļĄāļ·āđāļ merge āđāļĨāđāļ§ āļāļ°āļŠāļēāļĄāļēāļĢāļāđāļāđ ImageAltTextMode āđāļāļ·āđāļāļāļ§āļāļāļļāļĄ alt text āđāļ Markdown āđāļāđ 3 āđāļŦāļĄāļ :
āđāļŦāļĄāļ STATIC (default)#
āđāļāđāļāđāļāļāļ§āļēāļĄ "Image" āļāļēāļĒāļāļąāļ§ â āđāļĢāļĩāļĒāļāļāđāļēāļĒ backward compatible
from docling_core.transforms.serializer.markdown import (
MarkdownDocSerializer,
MarkdownParams,
ImageAltTextMode,
)
serializer = MarkdownDocSerializer(
doc=result.document,
params=MarkdownParams(
image_mode=ImageRefMode.REFERENCED,
image_alt_mode=ImageAltTextMode.STATIC, # default
)
)
output = serializer.serialize().text
āļāļĨāļĨāļąāļāļāđ:

āđāļŦāļĄāļ CAPTION#
āđāļāđ caption āļāļāļāļĢāļđāļāļ āļēāļ (āļāđāļēāļĄāļĩāđāļ PDF) āđāļāđāļ alt text
params = MarkdownParams(
image_mode=ImageRefMode.REFERENCED,
image_alt_mode=ImageAltTextMode.CAPTION,
)
āļāļĨāļĨāļąāļāļāđ:

āļŦāļēāļāđāļĄāđāļĄāļĩ caption āļāļ° fallback āđāļāđāļ
"Image"
āđāļŦāļĄāļ DESCRIPTION#
āđāļāđāļāļģāļāļāļīāļāļēāļĒāļāļĩāđ AI āļŠāļĢāđāļēāļāļāļķāđāļ (āļāđāļāļāđāļāļīāļ do_picture_description=True)
params = MarkdownParams(
image_mode=ImageRefMode.REFERENCED,
image_alt_mode=ImageAltTextMode.DESCRIPTION,
)
āļāļĨāļĨāļąāļāļāđ:

āļŦāļēāļāđāļĄāđāļĄāļĩ AI description āļāļ° fallback āđāļāđāļ
"Image"
āļāļēāļĢāļēāļ Fallback Logic#
| āđāļŦāļĄāļ | āļāđāļāļĄāļđāļĨāļĄāļĩ | āļāđāļāļĄāļđāļĨāđāļĄāđāļĄāļĩ |
|---|---|---|
| STATIC | "Image" | "Image" |
| CAPTION | caption text | "Image" |
| DESCRIPTION | AI description | "Image" |
3. āļ§āļīāļāļĩāļāļĩāđ 2: āđāļāđ REST API (docling-serve)#
docling-serve āļāļ·āļ HTTP API server āļŠāļģāļŦāļĢāļąāļ Docling āđāļŦāļĄāļēāļ°āļāļąāļāļāļēāļĢ integrate āđāļ microservice āļŦāļĢāļ·āļāđāļāđāļāļēāļāļāļēāļāļŦāļĨāļēāļĒāļ āļēāļĐāļē
3.1 āļāļēāļĢāļāļīāļāļāļąāđāļāđāļĨāļ°āļĢāļąāļ docling-serve#
āļāļīāļāļāļąāđāļ:
# āļāļīāļāļāļąāđāļāļāļ·āđāļāļāļēāļ
pip install docling-serve
# āļāļīāļāļāļąāđāļāļāļĢāđāļāļĄ UI āļŠāļģāļŦāļĢāļąāļāļāļāļŠāļāļ
pip install "docling-serve[ui]"
āļĢāļąāļ server:
# āļĢāļąāļ server āļāļ·āđāļāļāļēāļ (port 5001 āđāļāļĒ default)
docling-serve run
# āļĢāļąāļāļāļĢāđāļāļĄ UI āļŠāļģāļŦāļĢāļąāļāļāļāļŠāļāļāļāļĩāđ http://localhost:5001/ui
docling-serve run --enable-ui
Server āļāļ°āļĢāļąāļāļāļĩāđ http://localhost:5001 āđāļāļĒ default
āđāļāļīāļāđāļāđ Remote Services (āļŠāļģāļŦāļĢāļąāļ custom VLM API):
export DOCLING_SERVE_ENABLE_REMOTE_SERVICES=true docling-serve run
API Documentation: āđāļāđāļēāļāļķāļāđāļāđāļāļĩāđ http://localhost:5001/docs (Swagger UI)
3.2 Endpoints āļŦāļĨāļąāļ#
| Endpoint | Method | āđāļāđāļāļąāļ |
|---|---|---|
/v1/convert/file | POST | āļāļąāļāđāļŦāļĨāļāđāļāļĨāđ PDF āđāļāļĒāļāļĢāļ (multipart/form-data) |
/v1/convert/source | POST | āļĢāļ°āļāļļ URL āļŦāļĢāļ·āļ base64 āđāļ JSON body |
3.3 āļāļąāļ§āļāļĒāđāļēāļ API Request#
āļ§āļīāļāļĩāļāļĩāđ 1: āļāļąāļāđāļŦāļĨāļāđāļāļĨāđāļāđāļ§āļĒ multipart/form-data (/v1/convert/file)#
curl -X POST "http://localhost:5001/v1/convert/file" \
-H "accept: application/json" \
-F "files=@document.pdf;type=application/pdf" \
-F "to_formats=md" \
-F "generate_picture_images=true" \
-F "images_scale=2.0" \
-F "do_picture_description=true" \
-F "picture_description_preset=granite_vision" \
-F "picture_description_area_threshold=0" \
-F "image_export_mode=referenced"
āļ§āļīāļāļĩāļāļĩāđ 2: āļĢāļ°āļāļļ URL āļāđāļ§āļĒ JSON payload (/v1/convert/source)#
curl -X POST "http://localhost:5001/v1/convert/source" \
-H "Content-Type: application/json" \
-d '{
"options": {
"to_formats": ["md"],
"do_picture_description": true,
"picture_description_preset": "granite_vision",
"picture_description_area_threshold": 0,
"image_export_mode": "referenced"
},
"sources": [
{ "kind": "http", "url": "https://example.com/document.pdf" }
]
}'
āļ§āļīāļāļĩāļāļĩāđ 3: āļŠāđāļāđāļāļĨāđāđāļāđāļ base64 āđāļ JSON (/v1/convert/source)#
# Encode āđāļāļĨāđāđāļāđāļ base64 āļāđāļāļ
BASE64_PDF=$(base64 -w0 document.pdf)
curl -X POST "http://localhost:5001/v1/convert/source" \
-H "Content-Type: application/json" \
-d "{
\"options\": {
\"to_formats\": [\"md\"],
\"do_picture_description\": true,
\"picture_description_preset\": \"granite_vision\",
\"picture_description_area_threshold\": 0,
\"image_export_mode\": \"embedded\"
},
\"file_sources\": [{
\"base64_string\": \"$BASE64_PDF\",
\"filename\": \"document.pdf\"
}]
}"
āļŦāļĄāļēāļĒāđāļŦāļāļļ: URL sources āđāļĄāđāļāđāļāļāļāļēāļĢ base64 encoding â Docling āļāļ°āļāļēāļ§āļāđāđāļŦāļĨāļāđāļāļĨāđāđāļāļāđāļāļĒāļāļĢāļ
3.4 āļāļēāļĢāļāļąāđāļāļāđāļē image_export_mode āđāļ API#
image_export_mode āđāļ options āļāļāļ REST API āļāļģāļŦāļāđāļēāļāļĩāđāđāļāļĩāļĒāļ§āļāļąāļ ImageRefMode āđāļ Python SDK
| āļāđāļē | āļāļĨāļĨāļąāļāļāđ |
|---|---|
"placeholder" | āđāļāļāļāļĩāđāļĢāļđāļāļāđāļ§āļĒ <!-- image --> |
"embedded" | āļĢāļđāļāļ āļēāļāđāļāđāļ base64 āđāļ Markdown (default) |
"referenced" | āļĢāļđāļāļ āļēāļāđāļāđāļ URL path āđāļĒāļāđāļāļĨāđ |
3.5 āļāļēāļĢāđāļāđ image_alt_mode āđāļ API#
ðŽ āļŠāļāļēāļāļ°:
image_alt_modeāļāļĒāļđāđāđāļāđāļāļāļŠāļēāļĢ knowledge base āļāļāļ Docling āđāļĨāļ° PR āļāļĩāđāđāļāļĩāđāļĒāļ§āļāđāļāļ â āļāļĢāļ§āļāļŠāļāļāļ§āđāļēāļĢāļāļāļĢāļąāļāđāļ docling-serve āđāļ§āļāļĢāđāļāļąāļāļāļĩāđāļāļļāļāđāļāđāļāļēāļ
āļāļēāļĄāđāļāļāļŠāļēāļĢ API āļāļāļ Docling , āļŠāļēāļĄāļēāļĢāļāļāļ§āļāļāļļāļĄ alt text āđāļāđāļāđāļēāļ image_alt_mode āđāļ options:
curl -X POST "http://localhost:5001/v1/convert/source" \
-H "Content-Type: application/json" \
-d '{
"options": {
"to_formats": ["md"],
"do_picture_description": true,
"picture_description_preset": "granite_vision",
"picture_description_area_threshold": 0,
"image_export_mode": "referenced",
"image_alt_mode": "description"
},
"sources": [
{ "kind": "http", "url": "https://example.com/document.pdf" }
]
}'
āļāđāļēāļāļĩāđāļĢāļāļāļĢāļąāļ :
image_alt_mode | Alt Text āļāļĩāđāđāļāđ |
|---|---|
"static" (default) |  āđāļŠāļĄāļ |
"caption" | āđāļāđ caption āļāļāļāļĢāļđāļ, fallback āđāļāđāļ "Image" |
"description" | āđāļāđ AI description, fallback āđāļāđāļ "Image" |
āļāļąāļ§āļāļĒāđāļēāļāļāļĢāđāļāļĄ Classification Filters#
curl -X POST "http://localhost:5001/v1/convert/source" \
-H "Content-Type: application/json" \
-d '{
"options": {
"to_formats": ["md"],
"do_picture_description": true,
"picture_description_preset": "granite_vision",
"picture_description_area_threshold": 0,
"image_export_mode": "referenced",
"image_alt_mode": "description",
"classification_allow": ["photograph", "bar_chart", "pie_chart", "line_chart"],
"classification_min_confidence": 0.7
},
"sources": [
{ "kind": "http", "url": "https://example.com/document.pdf" }
]
}'
āļāļāļīāļāļēāļĒāđāļāļāļēāļ°āļĢāļđāļāļāļĩāđāļāļąāļāļāļĢāļ°āđāļ āļāđāļāđāļ photograph āļŦāļĢāļ·āļ chart āđāļĨāļ° confidence âĨ 70%
3.6 āļĢāļđāļāđāļāļ Response#
{
"document": {
"md_content": "# āđāļāļ·āđāļāļŦāļēāđāļāļāļŠāļēāļĢ\n\n\n\n..."
},
"status": "success"
}
Markdown output āļāļ°āļāļĒāļđāđāđāļ response.document.md_content
4. āļāļĨāļĨāļąāļāļāđāļāļĩāđāđāļāđ#
4.1 āļĢāļđāļāđāļāļ Markdown āļāļēāļĄāđāļŦāļĄāļ image_mode / image_export_mode#
āđāļŦāļĄāļ PLACEHOLDER#
āļĢāļđāļāļ āļēāļāļāļđāļāđāļāļāļāļĩāđāļāđāļ§āļĒ comment â āđāļāđāļŠāļģāļŦāļĢāļąāļāļāļāļŠāļāļ layout āļŦāļĢāļ·āļāļāđāļāļāļāļēāļĢāđāļāļāļēāļ°āļāđāļāļāļ§āļēāļĄ:
# Annual Report 2024
The following chart shows our growth trajectory.
<!-- image -->
Table 1 below compares performance metrics...
āđāļŦāļĄāļ EMBEDDED#
āļĢāļđāļāļ āļēāļāļāļđāļ encode āđāļāđāļ base64 āļāļąāļāļāļĢāļāđāļāđāļāļĨāđ Markdown â āđāļāļĨāđāđāļāļĩāļĒāļ§āļāļāļāļēāđāļāđ:
# Annual Report 2024
The following chart shows our growth trajectory.

Table 1 below compares performance metrics...
āđāļŦāļĄāļ REFERENCED#
āļĢāļđāļāļ āļēāļāļāļąāļāļāļķāļāđāļāđāļāđāļāļĨāđāđāļĒāļ â āļāđāļēāļĒāļāđāļ version control āđāļĨāļ° web hosting:
# Annual Report 2024
The following chart shows our growth trajectory.

Table 1 below compares performance metrics...
āđāļāļĢāļāļŠāļĢāđāļēāļāđāļāļĨāđāļāļĩāđāđāļāđ:
output/
âââ document.md
âââ document_artifacts/
âââ pictures/
âââ picture_001.png
âââ picture_002.png
âââ picture_003.png
4.2 āļĢāļđāļāđāļāļ Markdown āļāļēāļĄāđāļŦāļĄāļ image_alt_mode#
(āđāļāđāļĢāđāļ§āļĄāļāļąāļ image_mode=REFERENCED āđāļāđāļāļāļąāļ§āļāļĒāđāļēāļ)
āđāļŦāļĄāļ static (default)#

āđāļĢāļĩāļĒāļāļāđāļēāļĒ backward compatible āđāļŦāļĄāļēāļ°āļāļąāļāļāļĢāļāļĩāļāļĩāđāđāļĄāđāļāđāļāļāļāļēāļĢ alt text āļāļīāđāļĻāļĐ
āđāļŦāļĄāļ description â AI āļŠāļĢāđāļēāļāļāļģāļāļāļīāļāļēāļĒ#

āđāļŦāļĄāļēāļ°āļŠāļģāļŦāļĢāļąāļ: accessibility, RAG pipeline, āđāļāļāļŠāļēāļĢāđāļāļāļāļīāļāļāļĩāđāļāđāļāļāļāļēāļĢ context
āđāļŦāļĄāļ caption â āđāļāđ caption āļāļēāļāđāļāļāļŠāļēāļĢ#

āđāļŦāļĄāļēāļ°āļŠāļģāļŦāļĢāļąāļ: āđāļāļāļŠāļēāļĢāļ§āļīāļāļēāļāļēāļĢ, āļĢāļēāļĒāļāļēāļāļāļĩāđāļĄāļĩ figure captions āļāļĢāļāļāđāļ§āļ
4.3 āļāļąāļ§āļāļĒāđāļēāļ Markdown āļŠāļĄāļāļđāļĢāļāđ#
# āļāļĨāļāļĢāļ°āļāļāļāļāļēāļĢāļāļĢāļ°āļāļģāļāļĩ 2024
## āļāļāļŠāļĢāļļāļāļāļđāđāļāļĢāļīāļŦāļēāļĢ
āļĢāļēāļĒāđāļāđāļĢāļ§āļĄāđāļāļāļĩ 2024 āļāļĒāļđāđāļāļĩāđ 5.4 āļĨāđāļēāļāļāļāļĨāļĨāļēāļĢāđ āđāļāļīāļāđāļ 23% āļāļēāļāļāļĩāļāđāļāļāļŦāļāđāļē

āļāļąāļāđāļŠāļāļāđāļāđāļāļāļ āļđāļĄāļī āļĢāļēāļĒāđāļāđāđāļāļīāļāđāļāļāđāļāđāļāļ·āđāļāļāļāļļāļāđāļāļĢāļĄāļēāļŠ āđāļāļĒāđāļāļāļēāļ°āđāļāļāđāļ§āļāļāļĩ 2022-2023
## āļāļĨāļēāļāļŦāļĨāļąāļ

āļāļĨāļēāļ Asia Pacific āļĒāļąāļāļāļāđāļāđāļāļāļĨāļēāļāļŦāļĨāļąāļāļāļĩāđāļŠāļģāļāļąāļāļāļĩāđāļŠāļļāļ āļāļīāļāđāļāđāļ 45% āļāļāļāļĢāļēāļĒāđāļāđāļĢāļ§āļĄ
Alt text āļāļĩāđ AI āļŠāļĢāđāļēāļāļāđāļ§āļĒāđāļŦāđāļāļđāđāđāļāđ Screen Reader āđāļĨāļ°āļĢāļ°āļāļ Gen AI āđāļāđāļēāđāļāđāļāļ·āđāļāļŦāļēāļĢāļđāļāļ āļēāļāđāļāđāđāļāļĒāđāļĄāđāļāđāļāļāļĄāļāļāđāļŦāđāļ
5. āđāļāļĨāđāļāļĨāļąāļāđāļĨāļ°āđāļāļ§āļāļēāļāļāļāļīāļāļąāļāļīāļāļĩāđāļāļĩ (Tips and Best Practices)#
5.1 āļāļēāļĢāđāļāļīāđāļĄāļāļ§āļēāļĄāļĨāļ°āđāļāļĩāļĒāļāļāļāļāļĢāļđāļāļ āļēāļ#
images_scale āļāļ§āļāļāļļāļĄ pixel density āļāļāļāļĢāļđāļāļ āļēāļāļāļĩāđāļāļķāļāļāļāļāļĄāļē
pipeline_options = PdfPipelineOptions(
generate_picture_images=True,
images_scale=2.0, # āđāļāļ°āļāļģ: 2.0 āļŠāļģāļŦāļĢāļąāļāļāļēāļāļāļąāđāļ§āđāļ
)
āļāļēāļĢāđāļĨāļ·āļāļāļāđāļē images_scale:
| Use Case | āļāđāļēāđāļāļ°āļāļģ | āđāļŦāļāļļāļāļĨ |
|---|---|---|
| Preview / āļāļđāđāļĢāđāļ§ | 1.0 | āđāļĢāđāļ§ āđāļāļĨāđāđāļĨāđāļ |
| āļāļēāļāļāļąāđāļ§āđāļ | 2.0 | āļŠāļĄāļāļļāļĨāļĢāļ°āļŦāļ§āđāļēāļāļāļļāļāļ āļēāļāđāļĨāļ°āļāļāļēāļ |
| Print / High-res | 3.0 | āļāļļāļāļ āļēāļāļŠāļđāļ āđāļāđāļāđāļēāļāļ§āđāļē |
| AI description | 2.0 | āđāļāļĩāļĒāļāļāļāļŠāļģāļŦāļĢāļąāļ VLM model |
â ïļ āļāđāļē
> 2.0āļāļēāļāļāļģāđāļŦāđāđāļāļīāļ image cropping bugs āđāļāļāļēāļāđāļ§āļāļĢāđāļāļąāļ āđāļāļ°āļāļģāđāļŦāđāļāļāļŠāļāļāļāđāļāļ production
5.2 āļāļēāļĢāļāļĢāļāļāļĢāļđāļāļ āļēāļāļāļĩāđāļāđāļāļāļāļēāļĢāļāļāļīāļāļēāļĒ#
āđāļāđ classification filters āđāļāļ·āđāļāļāļĢāļ°āļŦāļĒāļąāļ compute āđāļĨāļ° API calls :
āļāļąāļ§āļāļĒāđāļēāļ: āļāļāļīāļāļēāļĒāđāļāļāļēāļ° chart āđāļĨāļ° photograph
# Python SDK (āļāđāļēāļ custom_config - āļāđāļāļāļāļēāļĢ admin permission āđāļ docling-serve)
from docling.datamodel.pipeline_options import PictureDescriptionApiOptions
pipeline_options = PdfPipelineOptions(
do_picture_description=True,
picture_description_preset="granite_vision",
picture_description_area_threshold=0.02, # āļĢāļđāļāļāļĩāđāđāļŦāļāđāļāļ§āđāļē 2% āļāļāļāļŦāļāđāļē
)
āļāđāļēāļ REST API:
{
"options": {
"do_picture_description": true,
"picture_description_preset": "granite_vision",
"picture_description_area_threshold": 0.02,
"classification_allow": ["photograph", "bar_chart", "pie_chart", "line_chart", "scatter_plot"],
"classification_min_confidence": 0.7
}
}
Classification labels āļāļĩāđāļĢāļāļāļĢāļąāļ :
| āļŦāļĄāļ§āļ | Labels |
|---|---|
| āļĢāļđāļāļ āļēāļ | photograph, full_page_image |
| āđāļāļāļ āļđāļĄāļī | bar_chart, pie_chart, line_chart, scatter_plot, box_plot |
| āđāļāļāļāļąāļ | engineering_drawing, chemistry_structure |
| āđāļāļāļāļĩāđ | geographical_map, topographical_map |
| āļāļ·āđāļāđ | table, screenshot_from_computer, music, calendar |
5.3 āļāļēāļĢāđāļĨāļ·āļāļāđāļŦāļĄāļ Export āļāļĩāđāđāļŦāļĄāļēāļ°āļŠāļĄ#
| āđāļŦāļĄāļ | āđāļŦāļĄāļēāļ°āļāļąāļ | āđāļĄāđāđāļŦāļĄāļēāļ°āļāļąāļ |
|---|---|---|
PLACEHOLDER | āļāļđāđāļāļĢāļāļŠāļĢāđāļēāļāđāļāļāļŠāļēāļĢ, pipeline āļāļĩāđāđāļĄāđāļāđāļāļāļāļēāļĢāļĢāļđāļ | āļāļēāļ production āļāļĩāđāļāđāļāļāļāļēāļĢāļĢāļđāļ |
EMBEDDED | āļŠāđāļāđāļāļĨāđāđāļāļĩāļĒāļ§, email attachment | āđāļāļāļŠāļēāļĢāļāļāļēāļāđāļŦāļāđāļāļĩāđāļĄāļĩāļĢāļđāļāļĄāļēāļ |
REFERENCED | Git repository, website, CMS | āļāļĢāļāļĩāļāđāļāļāļāļēāļĢ portable single file |
# āđāļāļ°āļāļģāļŠāļģāļŦāļĢāļąāļāļāļēāļ production āļŠāđāļ§āļāđāļŦāļāđ
result.document.save_as_markdown(
output_dir / "document.md",
image_mode=ImageRefMode.REFERENCED
)
# āļŠāļģāļŦāļĢāļąāļ portable single file
markdown_text = result.document.export_to_markdown(
image_mode=ImageRefMode.EMBEDDED
)
5.4 āļāļēāļĢāļāļģāļāļēāļāļāļąāļ Custom VLM āļŦāļĢāļ·āļ OpenAI API#
āļŦāļēāļāļāđāļāļāļāļēāļĢāđāļāđ OpenAI GPT-4o āļŦāļĢāļ·āļ model āļāļ·āđāļāđ āļŠāļēāļĄāļēāļĢāļāđāļāđ picture_description_custom_config āđāļāđ (āļāđāļāļāļāļēāļĢ admin permission āđāļ docling-serve) :
# āļāđāļāļāđāļāļīāļāđāļāđāļāļēāļāļāđāļāļ:
export DOCLING_SERVE_ALLOW_CUSTOM_PICTURE_DESCRIPTION_CONFIG=true
export DOCLING_SERVE_ENABLE_REMOTE_SERVICES=true
{
"options": {
"to_formats": ["md"],
"do_picture_description": true,
"picture_description_custom_config": {
"engine_options": { "engine_type": "api" },
"model_spec": {
"name": "GPT-4o Vision",
"default_repo_id": "openai/gpt-4o",
"prompt": "Describe this image concisely in 1-2 sentences for use as alt text.",
"response_format": "text"
},
"api_overrides": {
"api": {
"url": "https://api.openai.com/v1/chat/completions",
"headers": { "Authorization": "Bearer YOUR_OPENAI_API_KEY" },
"params": { "model": "gpt-4o" }
}
}
},
"image_alt_mode": "description",
"image_export_mode": "referenced"
},
"sources": [{ "kind": "http", "url": "https://example.com/document.pdf" }]
}
5.5 āļāļĢāļ°āļŠāļīāļāļāļīāļ āļēāļāđāļĨāļ°āļāļēāļĢāđāļāđāļāļĢāļąāļāļĒāļēāļāļĢ#
GPU vs CPU#
| āļāļĢāļąāļāļĒāļēāļāļĢ | granite_vision (2B params) | smolvlm |
|---|---|---|
| GPU VRAM (āđāļāļ°āļāļģ) | ~4 GB | ~2 GB |
| CPU RAM | ~8 GB | ~4 GB |
| āđāļ§āļĨāļēāļāđāļāļĢāļđāļ (GPU) | ~1-3 āļ§āļīāļāļēāļāļĩ | ~0.5-1 āļ§āļīāļāļēāļāļĩ |
| āđāļ§āļĨāļēāļāđāļāļĢāļđāļ (CPU) | ~10-30 āļ§āļīāļāļēāļāļĩ | ~5-15 āļ§āļīāļāļēāļāļĩ |
āđāļāļ§āļāļēāļāļŠāļģāļŦāļĢāļąāļ Batch Processing#
from pathlib import Path
from docling.document_converter import DocumentConverter, PdfFormatOption
from docling.datamodel.pipeline_options import PdfPipelineOptions
from docling.datamodel.base_models import InputFormat
from docling_core.types.doc import ImageRefMode
pipeline_options = PdfPipelineOptions(
generate_picture_images=True,
images_scale=2.0,
do_picture_description=True,
picture_description_preset="granite_vision",
picture_description_area_threshold=0.05, # āļāđāļēāļĄāļĢāļđāļāđāļĨāđāļāđāļāļ·āđāļāļāļĢāļ°āļŦāļĒāļąāļāđāļ§āļĨāļē
)
converter = DocumentConverter(
format_options={InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options)}
)
pdf_files = list(Path("pdfs/").glob("*.pdf"))
output_dir = Path("output")
output_dir.mkdir(exist_ok=True)
# Batch convert
for pdf_path in pdf_files:
print(f"Processing: {pdf_path.name}")
result = converter.convert(str(pdf_path))
out_path = output_dir / pdf_path.stem
out_path.mkdir(exist_ok=True)
result.document.save_as_markdown(
out_path / f"{pdf_path.stem}.md",
image_mode=ImageRefMode.REFERENCED
)
print(f" â Saved to {out_path}")
Memory Tips āļŠāļģāļŦāļĢāļąāļāđāļāļāļŠāļēāļĢāļāļāļēāļāđāļŦāļāđ#
- āđāļāđ
page_rangeāđāļāļ·āđāļāđāļāļĨāļāļāļĩāļĨāļ°āļŠāđāļ§āļ - āļāļąāđāļ
picture_description_area_threshold=0.05āđāļāļ·āđāļāļāđāļēāļĄāļĢāļđāļāļāļāļēāļāđāļĨāđāļ - āļŦāļēāļāđāļĄāđāļāđāļāļāļāļēāļĢ page images āđāļŦāđāļāļąāđāļ
generate_page_images=False(default)
6. āđāļāđāđāļāļāļąāļāļŦāļēāļāļĩāđāļāļāļāđāļāļĒ (Troubleshooting)#
6.1 āļĢāļđāļāļ āļēāļāđāļĄāđāļāļĢāļēāļāļāđāļ Markdown (āđāļŦāđāļāđāļāđ <!-- image -->)#
āļŠāļēāđāļŦāļāļļ: generate_picture_images=False (default) āļŦāļĢāļ·āļ image_mode=ImageRefMode.PLACEHOLDER
āđāļāđāđāļ:
pipeline_options = PdfPipelineOptions(
generate_picture_images=True, # â
āļāđāļāļāļāļąāđāļāđāļāđāļ True
)
result.document.save_as_markdown(
"output.md",
image_mode=ImageRefMode.REFERENCED # â
āđāļĄāđāđāļāđ PLACEHOLDER
)
6.2 āļĢāļđāļāļ āļēāļāļāļđāļ crop āļāļīāļāļŦāļĢāļ·āļ bounding box āđāļĄāđāļāļđāļāļāđāļāļ#
āļŠāļēāđāļŦāļāļļ: Bug āļāļĩāđāļĢāļđāđāļāļąāļāđāļ Docling āđāļĄāļ·āđāļāļāļąāđāļ images_scale > 1.0
āđāļāđāđāļ:
# āļāļąāđāļ§āļāļĢāļēāļ§: āđāļāđ scale=1.0 āđāļĨāđāļ§ upscale āđāļāļāļāļĩāļŦāļĨāļąāļ
pipeline_options = PdfPipelineOptions(
generate_picture_images=True,
images_scale=1.0 # â
āđāļāđ 1.0 āļŦāļēāļāļāļ cropping bug
)
āļāļīāļāļāļēāļĄāļŠāļāļēāļāļ° bug āđāļāđāļāļĩāđ github.com/docling-project/docling/issues/2416
6.3 AI Description āđāļĄāđāļāļģāļāļēāļ (alt text āđāļāđāļāđāļāđ "Image")#
āļāļĢāļ§āļāļŠāļāļāļāļēāļĄāļĨāļģāļāļąāļ:
- āļāļĢāļ§āļāļŠāļāļāļ§āđāļēāđāļāļīāļ
do_picture_description=True:
pipeline_options = PdfPipelineOptions(
do_picture_description=True, # â
āļāđāļāļāđāļāđāļ True
picture_description_preset="granite_vision",
)
- āļāļĢāļ§āļāļŠāļāļ
picture_description_area_threshold:
# āļĢāļđāļāļāļēāļāđāļĨāđāļāļāļ§āđāļē threshold (default 0.05 = 5%)
pipeline_options = PdfPipelineOptions(
do_picture_description=True,
picture_description_area_threshold=0, # â
āļāļāļīāļāļēāļĒāļāļļāļāļĢāļđāļ
)
- āļāļĢāļ§āļāļŠāļāļāļ§āđāļēāđāļĄāđāļāļĨ download āļŠāļģāđāļĢāđāļ:
# āļāļđ log āļāļāļ°āļĢāļąāļ
python -c "
from docling.datamodel.pipeline_options import PdfPipelineOptions
opts = PdfPipelineOptions(do_picture_description=True, picture_description_preset='granite_vision')
print('Options created successfully')
"
6.4 āđāļĄāđāļāļĨ Download āļāđāļēāļŦāļĢāļ·āļāļĨāđāļĄāđāļŦāļĨāļ§#
Docling āļāļ° download model āļāļĢāļąāđāļāđāļĢāļāđāļāļĒāļāļąāļāđāļāļĄāļąāļāļīāļāļēāļ Hugging Face Hub
āđāļāđāđāļāļŠāļģāļŦāļĢāļąāļ environment āļāļĩāđāđāļĄāđāļĄāļĩ internet:
# 1. Download model āļāļāđāļāļĢāļ·āđāļāļāļāļĩāđāļĄāļĩ internet
huggingface-cli download ibm-granite/granite-vision-3.3-2b
# 2. āļĢāļ°āļāļļ path āđāļ environment variable
export HF_HOME=/path/to/local/models
export TRANSFORMERS_OFFLINE=1
āļāļĢāļ§āļāļŠāļāļ disk space:
| Model | āļāļāļēāļāļāļĢāļ°āļĄāļēāļ |
|---|---|
smolvlm | ~1.5 GB |
granite_vision | ~4 GB |
6.5 Error āđāļ docling-serve: 422 Unprocessable Entity#
āļŠāļēāđāļŦāļāļļāļāļĩāđāļāļāļāđāļāļĒ:
| āļŠāļēāđāļŦāļāļļ | āđāļāđāđāļ |
|---|---|
āđāļāđ picture_description_custom_config āđāļāļĒāđāļĄāđāđāļāđāđāļāļīāļāđāļ admin | āļāļąāđāļ env: DOCLING_SERVE_ALLOW_CUSTOM_PICTURE_DESCRIPTION_CONFIG=true |
picture_description_preset āļāļĩāđāļĢāļ°āļāļļāđāļĄāđāđāļāđāļĢāļąāļāļāļāļļāļāļēāļ | āļāļĢāļ§āļāļŠāļāļ DOCLING_SERVE_ALLOWED_VLM_PRESETS env var |
| JSON syntax āļāļīāļ | āļāļĢāļ§āļāļŠāļāļ JSON format āļāđāļ§āļĒ jq |
# āļāļĢāļ§āļāļŠāļāļ JSON āļāđāļāļāļŠāđāļ
echo '{"options": {...}}' | jq .
6.6 docling-serve āđāļĄāđāļāļāļāļŠāļāļāļ (Timeout)#
āļŠāļēāđāļŦāļāļļ: āđāļāļāļŠāļēāļĢāđāļŦāļāđ + AI description āđāļāđāđāļ§āļĨāļēāļāļēāļ
āđāļāđāđāļ:
# āđāļāļīāđāļĄ timeout āđāļ curl
curl --max-time 300 -X POST ...
# āļŦāļĢāļ·āļāđāļāđ async endpoint
POST /v1/convert/file/async
POST /v1/convert/source/async
6.7 ImportError āļŦāļĢāļ·āļ ModuleNotFoundError#
# āļāļīāļāļāļąāđāļāđāļŦāļĄāđāđāļāļ clean
pip uninstall docling docling-core docling-ibm-models -y
pip install docling
# āļāļĢāļ§āļāļŠāļāļ dependencies
pip show docling
6.8 āļŠāļĢāļļāļāļāļēāļĢāļēāļ Troubleshooting#
| āļāļēāļāļēāļĢ | āļŠāļēāđāļŦāļāļļāļāļĩāđāļāđāļēāļāļ°āđāļāđāļ | āđāļāđāđāļāļāđāļ§āļ |
|---|---|---|
<!-- image --> āđāļ output | generate_picture_images=False | āđāļāļīāđāļĄ generate_picture_images=True |
| āļĢāļđāļāļ āļēāļ crop āļāļīāļ | images_scale > 1.0 bug | āļĨāļ scale āđāļāđāļ 1.0 |
| Alt text āđāļāđāļ "Image" āļāļļāļāļĢāļđāļ | do_picture_description=False | āđāļāļīāļ do_picture_description=True |
| Model āđāļĄāđ load | Disk āđāļāđāļĄ / āđāļĄāđāļĄāļĩ internet | āļāļĢāļ§āļāļŠāļāļ disk āđāļĨāļ° HF cache |
| 422 error āđāļ API | Custom config āđāļĄāđāđāļāđāđāļāļīāļ | āļāļąāđāļ env var allow custom config |
| Timeout | āđāļāļāļŠāļēāļĢāđāļŦāļāđ + AI | āđāļāđ async endpoint āļŦāļĢāļ·āļ batch āđāļāđāļāļŠāđāļ§āļāđ |