# T23 API server recipe (FastAPI), tests with curl date: 2026-11-16 fastapi 0.163.1 markitdown 0.1.9 uvicorn 0.54.0 $ curl -s localhost:8099/health {"ok":true} $ curl -s -w ' [%{http_code} in %{time_total}s]' -F file=@/home/user/MarkItDown/public/samples/report.docx localhost:8099/convert {"filename":"report.docx","characters":838,"markdown":"Pilot Report: Field Station Alpha\n\n# 1. Summary\n\nThis report covers **three sites** during *spring 2026* with underlined ~~and struck text.~~\n\n## 1.1 Key findings\n\n* Rainfall rose 12% year o $ curl -s -w ' [%{http_code} in %{time_total}s]' -F file=@/home/user/MarkItDown/public/samples/pdf-text.pdf localhost:8099/convert {"filename":"pdf-text.pdf","characters":926,"markdown":"Pilot Report: Field Station Alpha\n\n1. Summary\nRainfall across the three stations rose steadily through the spring. Sensors reported every ten\nminutes and the readings were averaged per day. Rainfall a $ curl -s -w ' [%{http_code}]' -F file=@/home/user/MarkItDown/public/samples/unsupported.gif localhost:8099/convert {"detail":"File type .gif is not allowed"} [415] $ curl -s -w ' [%{http_code}]' -F file=@/home/user/MarkItDown/lab/corpus/synthetic/report.rtf localhost:8099/convert {"detail":"File type .rtf is not allowed"} [415] $ curl -s -w ' [%{http_code}]' -F file=@/home/user/MarkItDown/public/samples/pdf-encrypted.pdf localhost:8099/convert {"detail":"Could not convert this file (FileConversionException)"} [422] $ curl -s -w ' [%{http_code}]' -F 'file=@/home/user/MarkItDown/lab/corpus/synthetic/pdf-200-pages.pdf' localhost:8099/convert {"filename":"pdf-200-pages.pdf","characters":375091,"markdown":"Section 1\nRainfall across the three stations rose steadily through the spring. Sensors reported every ten\nminutes and the readings were averaged per day. Rainfall across the three stations rose $ curl -s -w ' [%{http_code}]' -F file=@/tmp/big.pdf localhost:8099/convert {"detail":"File is larger than 10485760 bytes"} [413] $ curl -s -w ' [%{http_code}]' -F file=@/home/user/MarkItDown/public/samples/pdf-scanned.pdf localhost:8099/convert {"filename":"pdf-scanned.pdf","characters":0,"markdown":""} [200]