puffinparse 0.1.6__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. {puffinparse-0.1.6 → puffinparse-0.2.0}/Cargo.lock +81 -11
  2. {puffinparse-0.1.6 → puffinparse-0.2.0}/Cargo.toml +2 -2
  3. {puffinparse-0.1.6 → puffinparse-0.2.0}/PKG-INFO +119 -48
  4. {puffinparse-0.1.6 → puffinparse-0.2.0}/README.md +113 -43
  5. puffinparse-0.2.0/THIRD_PARTY_LICENSES.txt +48987 -0
  6. puffinparse-0.2.0/THIRD_PARTY_NOTICES.md +412 -0
  7. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/Cargo.toml +2 -1
  8. puffinparse-0.2.0/crates/puffinparse-core/src/fetch.rs +580 -0
  9. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/lib.rs +1 -0
  10. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/model.rs +281 -46
  11. puffinparse-0.2.0/crates/puffinparse-core/src/pricing.json +102 -0
  12. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/pricing.rs +16 -1
  13. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/anthropic.rs +51 -6
  14. puffinparse-0.2.0/crates/puffinparse-core/src/providers/azure_openai.rs +471 -0
  15. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/datalab.rs +10 -1
  16. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/docling.rs +19 -15
  17. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/gemini.rs +75 -45
  18. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/google_documentai.rs +1 -18
  19. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/landingai.rs +18 -3
  20. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/llamaparse.rs +15 -6
  21. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/local.rs +4 -12
  22. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/mistral.rs +0 -1
  23. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/mod.rs +3 -1
  24. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/openai.rs +154 -44
  25. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/opendocrouter.rs +1 -1
  26. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/paddleocr.rs +23 -38
  27. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/reducto.rs +44 -2
  28. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/textract.rs +2 -11
  29. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/unstructured.rs +3 -11
  30. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/upstage.rs +2 -19
  31. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/vllm.rs +3 -3
  32. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/vlm.rs +8 -32
  33. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/types.rs +95 -2
  34. puffinparse-0.2.0/crates/puffinparse-core/tests/fixtures/README.md +18 -0
  35. puffinparse-0.2.0/crates/puffinparse-core/tests/fixtures/anthropic_parse_live.json +49 -0
  36. puffinparse-0.2.0/crates/puffinparse-core/tests/fixtures/azure_openai_responses_parse.json +65 -0
  37. puffinparse-0.2.0/crates/puffinparse-core/tests/fixtures/azure_openai_responses_parse_live.json +203 -0
  38. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/extend_extract_run.json +16 -16
  39. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/extend_parse_run.json +1 -1
  40. puffinparse-0.2.0/crates/puffinparse-core/tests/fixtures/gemini_parse_live.json +25 -0
  41. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/llamaparse_extract_job.json +5 -5
  42. puffinparse-0.2.0/crates/puffinparse-core/tests/fixtures/openai_responses_parse_live.json +144 -0
  43. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/reducto_extract.json +2 -2
  44. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/reducto_extract_plain.json +2 -2
  45. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/reducto_parse.json +2 -2
  46. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-python/Cargo.toml +1 -1
  47. {puffinparse-0.1.6 → puffinparse-0.2.0}/pyproject.toml +14 -10
  48. {puffinparse-0.1.6 → puffinparse-0.2.0}/python/puffinparse/main.py +2 -2
  49. puffinparse-0.1.6/crates/puffinparse-core/src/pricing.json +0 -82
  50. puffinparse-0.1.6/crates/puffinparse-core/tests/fixtures/README.md +0 -14
  51. {puffinparse-0.1.6 → puffinparse-0.2.0}/LICENSE +0 -0
  52. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/README.md +0 -0
  53. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/bench/tables.rs +0 -0
  54. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/bench.rs +0 -0
  55. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/compat/extend.rs +0 -0
  56. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/compat/llamaparse.rs +0 -0
  57. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/compat/mod.rs +0 -0
  58. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/compat/reducto.rs +0 -0
  59. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/compat/roundtrip.rs +0 -0
  60. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/error.rs +0 -0
  61. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/http.rs +0 -0
  62. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/jobs.rs +0 -0
  63. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/provider.rs +0 -0
  64. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/azure.rs +0 -0
  65. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/extend.rs +0 -0
  66. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/mathpix.rs +0 -0
  67. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/providers/tesseract.rs +0 -0
  68. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/router.rs +0 -0
  69. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/testutil.rs +0 -0
  70. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/src/util.rs +0 -0
  71. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/benchmark_datasets.rs +0 -0
  72. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/anthropic_messages_extract.json +0 -0
  73. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/anthropic_messages_parse.json +0 -0
  74. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/anthropic_messages_parse_auto_tool.json +0 -0
  75. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/azure_invoice.json +0 -0
  76. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/azure_layout.json +0 -0
  77. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/azure_read.json +0 -0
  78. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/datalab_convert.json +0 -0
  79. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/docling_headings.json +0 -0
  80. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/docling_multipage.json +0 -0
  81. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/extend_parse_run_url.json +0 -0
  82. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/extend_parse_run_url_output.json +0 -0
  83. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/gemini_extract_invoice.json +0 -0
  84. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/gemini_parse_multipage.json +0 -0
  85. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/google_documentai_form.json +0 -0
  86. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/google_documentai_layout.json +0 -0
  87. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/google_documentai_ocr.json +0 -0
  88. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/landingai_extract.json +0 -0
  89. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/landingai_parse.json +0 -0
  90. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/llamaparse_result_json.json +0 -0
  91. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/mathpix_pdf_lines.json +0 -0
  92. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/mathpix_text.json +0 -0
  93. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/mistral_annotation.json +0 -0
  94. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/mistral_ocr.json +0 -0
  95. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/mistral_ocr_blocks.json +0 -0
  96. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/openai_responses_extract.json +0 -0
  97. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/openai_responses_parse.json +0 -0
  98. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/opendocrouter_get_expanded.json +0 -0
  99. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/opendocrouter_parse_failed.json +0 -0
  100. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/opendocrouter_parse_layout.json +0 -0
  101. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/opendocrouter_parse_partial.json +0 -0
  102. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/paddleocr_layout_parsing.json +0 -0
  103. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/paddleocr_ocr.json +0 -0
  104. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/paddleocr_vl_layout_parsing.json +0 -0
  105. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/reducto_parse_url.json +0 -0
  106. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/reducto_parse_url_result.json +0 -0
  107. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/rules_text_sparse_note.json +0 -0
  108. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/tesseract_headings.tsv +0 -0
  109. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/textract_detect_text.json +0 -0
  110. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/textract_forms.json +0 -0
  111. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/textract_layout.json +0 -0
  112. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/textract_queries.json +0 -0
  113. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/unstructured_elements.json +0 -0
  114. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/upstage_document_parse.json +0 -0
  115. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/vllm_dots_mocr_chat.json +0 -0
  116. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/fixtures/vllm_infinity_parser2_chat.json +0 -0
  117. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/live.rs +0 -0
  118. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-core/tests/live_jobs.rs +0 -0
  119. {puffinparse-0.1.6 → puffinparse-0.2.0}/crates/puffinparse-python/src/lib.rs +0 -0
  120. {puffinparse-0.1.6 → puffinparse-0.2.0}/python/puffinparse/__init__.py +0 -0
  121. {puffinparse-0.1.6 → puffinparse-0.2.0}/python/puffinparse/_core.pyi +0 -0
  122. {puffinparse-0.1.6 → puffinparse-0.2.0}/python/puffinparse/exceptions.py +0 -0
  123. {puffinparse-0.1.6 → puffinparse-0.2.0}/python/puffinparse/jobs.py +0 -0
  124. {puffinparse-0.1.6 → puffinparse-0.2.0}/python/puffinparse/py.typed +0 -0
  125. {puffinparse-0.1.6 → puffinparse-0.2.0}/python/puffinparse/types.py +0 -0
@@ -124,6 +124,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
124
124
  checksum = "b281d307588d634de920874890732659e2e7672f72b5e10e81badc1a8a83621e"
125
125
  dependencies = [
126
126
  "aws-lc-sys",
127
+ "untrusted 0.7.1",
127
128
  "zeroize",
128
129
  ]
129
130
 
@@ -262,7 +263,7 @@ checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06"
262
263
  dependencies = [
263
264
  "cfg-if",
264
265
  "cpufeatures",
265
- "rand_core",
266
+ "rand_core 0.10.1",
266
267
  ]
267
268
 
268
269
  [[package]]
@@ -706,7 +707,7 @@ dependencies = [
706
707
  "js-sys",
707
708
  "libc",
708
709
  "r-efi",
709
- "rand_core",
710
+ "rand_core 0.10.1",
710
711
  "wasm-bindgen",
711
712
  ]
712
713
 
@@ -1083,6 +1084,22 @@ dependencies = [
1083
1084
  "wasm-bindgen",
1084
1085
  ]
1085
1086
 
1087
+ [[package]]
1088
+ name = "jsonwebtoken"
1089
+ version = "10.4.0"
1090
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1091
+ checksum = "eba32bfb4ffdeaca3e34431072faf01745c9b26d25504aa7a6cf5684334fc4fc"
1092
+ dependencies = [
1093
+ "aws-lc-rs",
1094
+ "base64 0.22.1",
1095
+ "getrandom 0.2.17",
1096
+ "js-sys",
1097
+ "serde",
1098
+ "serde_json",
1099
+ "signature",
1100
+ "zeroize",
1101
+ ]
1102
+
1086
1103
  [[package]]
1087
1104
  name = "lazy_static"
1088
1105
  version = "1.5.0"
@@ -1395,9 +1412,10 @@ dependencies = [
1395
1412
 
1396
1413
  [[package]]
1397
1414
  name = "puffinparse-cli"
1398
- version = "0.1.6"
1415
+ version = "0.2.0"
1399
1416
  dependencies = [
1400
1417
  "anyhow",
1418
+ "axum",
1401
1419
  "chrono",
1402
1420
  "clap",
1403
1421
  "comfy-table",
@@ -1405,17 +1423,19 @@ dependencies = [
1405
1423
  "indicatif",
1406
1424
  "puffinparse-core",
1407
1425
  "puffinparse-server",
1426
+ "reqwest",
1408
1427
  "serde",
1409
1428
  "serde_json",
1410
1429
  "sha2",
1411
1430
  "tokio",
1412
1431
  "tracing",
1413
1432
  "tracing-subscriber",
1433
+ "uuid",
1414
1434
  ]
1415
1435
 
1416
1436
  [[package]]
1417
1437
  name = "puffinparse-core"
1418
- version = "0.1.6"
1438
+ version = "0.2.0"
1419
1439
  dependencies = [
1420
1440
  "async-trait",
1421
1441
  "bytes",
@@ -1439,7 +1459,7 @@ dependencies = [
1439
1459
 
1440
1460
  [[package]]
1441
1461
  name = "puffinparse-node"
1442
- version = "0.1.6"
1462
+ version = "0.2.0"
1443
1463
  dependencies = [
1444
1464
  "bytes",
1445
1465
  "napi",
@@ -1453,7 +1473,7 @@ dependencies = [
1453
1473
 
1454
1474
  [[package]]
1455
1475
  name = "puffinparse-python"
1456
- version = "0.1.6"
1476
+ version = "0.2.0"
1457
1477
  dependencies = [
1458
1478
  "bytes",
1459
1479
  "puffinparse-core",
@@ -1468,15 +1488,25 @@ dependencies = [
1468
1488
 
1469
1489
  [[package]]
1470
1490
  name = "puffinparse-server"
1471
- version = "0.1.6"
1491
+ version = "0.2.0"
1472
1492
  dependencies = [
1493
+ "aws-lc-rs",
1473
1494
  "axum",
1495
+ "base64 0.22.1",
1474
1496
  "bytes",
1475
1497
  "chrono",
1498
+ "flate2",
1499
+ "futures",
1500
+ "hmac",
1476
1501
  "http-body-util",
1502
+ "hyper",
1503
+ "hyper-util",
1504
+ "jsonwebtoken",
1477
1505
  "puffinparse-core",
1506
+ "reqwest",
1478
1507
  "serde",
1479
1508
  "serde_json",
1509
+ "sha2",
1480
1510
  "tokio",
1481
1511
  "toml",
1482
1512
  "tower",
@@ -1646,7 +1676,16 @@ checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
1646
1676
  dependencies = [
1647
1677
  "chacha20",
1648
1678
  "getrandom 0.4.3",
1649
- "rand_core",
1679
+ "rand_core 0.10.1",
1680
+ ]
1681
+
1682
+ [[package]]
1683
+ name = "rand_core"
1684
+ version = "0.6.4"
1685
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1686
+ checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
1687
+ dependencies = [
1688
+ "getrandom 0.2.17",
1650
1689
  ]
1651
1690
 
1652
1691
  [[package]]
@@ -1661,7 +1700,7 @@ version = "0.10.2"
1661
1700
  source = "registry+https://github.com/rust-lang/crates.io-index"
1662
1701
  checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a"
1663
1702
  dependencies = [
1664
- "rand_core",
1703
+ "rand_core 0.10.1",
1665
1704
  ]
1666
1705
 
1667
1706
  [[package]]
@@ -1741,7 +1780,7 @@ dependencies = [
1741
1780
  "cfg-if",
1742
1781
  "getrandom 0.2.17",
1743
1782
  "libc",
1744
- "untrusted",
1783
+ "untrusted 0.9.0",
1745
1784
  "windows-sys 0.52.0",
1746
1785
  ]
1747
1786
 
@@ -1845,7 +1884,7 @@ dependencies = [
1845
1884
  "aws-lc-rs",
1846
1885
  "ring",
1847
1886
  "rustls-pki-types",
1848
- "untrusted",
1887
+ "untrusted 0.9.0",
1849
1888
  ]
1850
1889
 
1851
1890
  [[package]]
@@ -2024,6 +2063,15 @@ dependencies = [
2024
2063
  "libc",
2025
2064
  ]
2026
2065
 
2066
+ [[package]]
2067
+ name = "signature"
2068
+ version = "2.2.0"
2069
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2070
+ checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
2071
+ dependencies = [
2072
+ "rand_core 0.6.4",
2073
+ ]
2074
+
2027
2075
  [[package]]
2028
2076
  name = "simd-adler32"
2029
2077
  version = "0.3.10"
@@ -2295,8 +2343,10 @@ dependencies = [
2295
2343
  "pin-project-lite",
2296
2344
  "sync_wrapper",
2297
2345
  "tokio",
2346
+ "tokio-util",
2298
2347
  "tower-layer",
2299
2348
  "tower-service",
2349
+ "tracing",
2300
2350
  ]
2301
2351
 
2302
2352
  [[package]]
@@ -2447,6 +2497,12 @@ version = "0.5.2"
2447
2497
  source = "registry+https://github.com/rust-lang/crates.io-index"
2448
2498
  checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3"
2449
2499
 
2500
+ [[package]]
2501
+ name = "untrusted"
2502
+ version = "0.7.1"
2503
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2504
+ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
2505
+
2450
2506
  [[package]]
2451
2507
  name = "untrusted"
2452
2508
  version = "0.9.0"
@@ -2861,6 +2917,20 @@ name = "zeroize"
2861
2917
  version = "1.9.0"
2862
2918
  source = "registry+https://github.com/rust-lang/crates.io-index"
2863
2919
  checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e"
2920
+ dependencies = [
2921
+ "zeroize_derive",
2922
+ ]
2923
+
2924
+ [[package]]
2925
+ name = "zeroize_derive"
2926
+ version = "1.5.0"
2927
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2928
+ checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328"
2929
+ dependencies = [
2930
+ "proc-macro2",
2931
+ "quote",
2932
+ "syn 2.0.119",
2933
+ ]
2864
2934
 
2865
2935
  [[package]]
2866
2936
  name = "zerotrie"
@@ -3,7 +3,7 @@ resolver = "2"
3
3
  members = ["crates/puffinparse-core", "crates/puffinparse-python"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.1.6"
6
+ version = "0.2.0"
7
7
  edition = "2021"
8
8
  rust-version = "1.80"
9
9
  license = "MIT"
@@ -15,7 +15,7 @@ keywords = ["ocr", "document-parsing", "pdf", "api", "benchmark"]
15
15
  categories = ["api-bindings", "text-processing"]
16
16
 
17
17
  [workspace.dependencies]
18
- puffinparse-core = { path = "crates/puffinparse-core", version = "0.1.6" }
18
+ puffinparse-core = { path = "crates/puffinparse-core", version = "0.2.0" }
19
19
  reqwest = { version = "0.13", default-features = false, features = ["json", "multipart", "rustls", "stream", "gzip"] }
20
20
  tokio = { version = "1", features = ["rt-multi-thread", "macros", "fs", "time", "sync"] }
21
21
  serde = { version = "1", features = ["derive"] }
@@ -1,9 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: puffinparse
3
- Version: 0.1.6
3
+ Version: 0.2.0
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Intended Audience :: Developers
6
- Classifier: License :: OSI Approved :: MIT License
7
6
  Classifier: Programming Language :: Python :: 3
8
7
  Classifier: Programming Language :: Python :: 3 :: Only
9
8
  Classifier: Programming Language :: Rust
@@ -15,16 +14,18 @@ Requires-Dist: pytest>=7 ; extra == 'dev'
15
14
  Requires-Dist: pytest-asyncio>=0.23 ; extra == 'dev'
16
15
  Requires-Dist: ruff>=0.5 ; extra == 'dev'
17
16
  Requires-Dist: mypy>=1.8 ; extra == 'dev'
18
- Requires-Dist: maturin>=1.5 ; extra == 'dev'
17
+ Requires-Dist: maturin>=1.9.3 ; extra == 'dev'
19
18
  Provides-Extra: bench
20
19
  Provides-Extra: dev
21
20
  License-File: LICENSE
21
+ License-File: THIRD_PARTY_LICENSES.txt
22
+ License-File: THIRD_PARTY_NOTICES.md
22
23
  Summary: One API for every OCR / document-parsing provider (Reducto, Extend, LlamaParse, ...). Rust core, Python SDK, open benchmark.
23
24
  Keywords: ocr,document-parsing,pdf,reducto,extend,llamaparse,benchmark
24
25
  Home-Page: https://puffinparse.com
25
26
  Author: PuffinParse contributors
26
- License: MIT
27
- Requires-Python: >=3.9
27
+ License-Expression: MIT
28
+ Requires-Python: >=3.10
28
29
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
29
30
  Project-URL: Changelog, https://github.com/ajinkyashejul/puffinparse/blob/main/CHANGELOG.md
30
31
  Project-URL: Documentation, https://puffinparse.com/docs/
@@ -36,7 +37,7 @@ Project-URL: Repository, https://github.com/ajinkyashejul/puffinparse
36
37
 
37
38
  # PuffinParse
38
39
 
39
- [![PyPI](https://img.shields.io/pypi/v/puffinparse?color=E95C20)](https://pypi.org/project/puffinparse/) [![GitHub stars](https://img.shields.io/github/stars/ajinkyashejul/puffinparse?style=flat&color=E95C20)](https://github.com/ajinkyashejul/puffinparse/stargazers) [![CI](https://github.com/ajinkyashejul/puffinparse/actions/workflows/ci.yml/badge.svg)](https://github.com/ajinkyashejul/puffinparse/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ajinkyashejul/puffinparse/blob/main/LICENSE) [![Docs](https://img.shields.io/badge/docs-puffinparse.com-E95C20)](https://puffinparse.com/docs/) [![Benchmark](https://img.shields.io/badge/benchmark-results-E95C20)](https://puffinparse.com/benchmark-results/) [![Python 3.9+](https://img.shields.io/badge/python-3.9%2B-blue)](https://github.com/ajinkyashejul/puffinparse/blob/main/pyproject.toml)
40
+ [![PyPI](https://img.shields.io/pypi/v/puffinparse?color=E95C20)](https://pypi.org/project/puffinparse/) [![GitHub stars](https://img.shields.io/github/stars/ajinkyashejul/puffinparse?style=flat&color=E95C20)](https://github.com/ajinkyashejul/puffinparse/stargazers) [![CI](https://github.com/ajinkyashejul/puffinparse/actions/workflows/ci.yml/badge.svg)](https://github.com/ajinkyashejul/puffinparse/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ajinkyashejul/puffinparse/blob/main/LICENSE) [![Docs](https://img.shields.io/badge/docs-puffinparse.com-E95C20)](https://puffinparse.com/docs/) [![Benchmark](https://img.shields.io/badge/benchmark-results-E95C20)](https://puffinparse.com/benchmark-results/) [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue)](https://github.com/ajinkyashejul/puffinparse/blob/main/pyproject.toml)
40
41
 
41
42
  **One API for every document parser: parse, OCR and extract.** Rust core, Python and TypeScript SDKs, a CLI, a self-hosted gateway, and an open benchmark that ranks providers on accuracy, latency and cost.
42
43
 
@@ -61,13 +62,14 @@ Two things make switching real rather than aspirational. **Modes**: every call n
61
62
 
62
63
  | | |
63
64
  |---|---|
64
- | **Providers (v0.1)** | 20 providers · 79 models · 3 modes. **Live-verified** against the real APIs: [Reducto](https://reducto.ai), [Extend](https://extend.ai), [LlamaParse](https://cloud.llamaindex.ai). **Verified locally**: the self-hosted Tesseract and Docling. **Docs-only** (implemented from the provider's API documentation and tested against fixture payloads, not yet run live): Mistral, Azure, Textract, Gemini, OpenAI, Anthropic, Mathpix, Datalab, Unstructured, Upstage, Landing AI, Google Document AI, OpenDocRouter and the self-hosted PaddleOCR and vLLM presets ([help verify them](https://github.com/ajinkyashejul/puffinparse/issues/10)). [Full table](#model-names) |
65
+ | **Providers (v0.1)** | 21 providers · 99 models · 3 modes. **Live-verified** against the real APIs: [Reducto](https://reducto.ai), [Extend](https://extend.ai), [LlamaParse](https://cloud.llamaindex.ai), OpenAI, Azure OpenAI, Anthropic, Gemini. **Verified locally**: the self-hosted Tesseract and Docling. **Docs-only** (implemented from the provider's API documentation and tested against fixture payloads, not yet run live): Mistral, Azure, Textract, Mathpix, Datalab, Unstructured, Upstage, Landing AI, Google Document AI, OpenDocRouter and the self-hosted PaddleOCR and vLLM presets ([help verify them](https://github.com/ajinkyashejul/puffinparse/issues/10)). [Full table](#model-names) |
65
66
  | **Modes** | `parse` (markdown + blocks), `ocr` (plain text + boxes), `extract` (JSON from a schema) |
66
67
  | **Core** | Rust (`puffinparse-core`): `reqwest` + `tokio`, no vendor SDKs, `#![forbid(unsafe_code)]` |
67
- | **SDKs** | Python 3.9+ (sync + async, fully typed) and Node.js / TypeScript ([`js/`](https://github.com/ajinkyashejul/puffinparse/blob/main/js/README.md)), both on the same Rust core |
68
+ | **SDKs** | Python 3.10+ (sync + async, fully typed) and Node.js / TypeScript ([`js/`](https://github.com/ajinkyashejul/puffinparse/blob/main/js/README.md)), both on the same Rust core |
68
69
  | **Gateway** | `puffinparse serve`: one HTTP endpoint with aliases, fallbacks, virtual keys, budgets, rate limits, JSON logs and Prometheus metrics ([`docs/SERVER.md`](https://github.com/ajinkyashejul/puffinparse/blob/main/docs/SERVER.md)) |
69
70
  | **Long documents** | `submit` / `retrieve` jobs and provider webhooks instead of a blocking call ([below](#long-documents-jobs-and-webhooks)) |
70
71
  | **CLI** | `puffinparse parse`, `puffinparse ocr`, `puffinparse extract`, `puffinparse providers`, `puffinparse bench` |
72
+ | **MCP server** | `puffinparse mcp`: a local stdio MCP server for Claude Code, Cursor and Codex with `parse`, `ocr`, `extract`, `list_models` and `compare` tools, using your own provider keys, plus a guided workflow that finds the best model for a folder of your own documents ([setup](https://puffinparse.com/docs/agents/)) |
71
73
  | **Reliability** | Retries with jittered backoff, whole-call deadlines, `Router` with ordered fallbacks / round-robin |
72
74
  | **Compatibility** | `output_format` renders any provider's result in Reducto's, Extend's or LlamaParse's own JSON, so an existing integration keeps its parser ([`docs/COMPAT.md`](https://github.com/ajinkyashejul/puffinparse/blob/main/docs/COMPAT.md)) |
73
75
  | **Cost** | Embedded, overridable price table → `cost_usd` on every response |
@@ -77,7 +79,7 @@ Two things make switching real rather than aspirational. **Modes**: every call n
77
79
 
78
80
  ```bash
79
81
  pip install puffinparse # Python SDK (abi3 wheels: Linux glibc 2.28+, macOS, Windows)
80
- docker pull --platform linux/amd64 ghcr.io/ajinkyashejul/puffinparse # gateway image (amd64 only for now)
82
+ docker pull ghcr.io/ajinkyashejul/puffinparse # gateway image (linux/amd64; linux/arm64 too from the next release)
81
83
  ```
82
84
 
83
85
  The CLI (which also runs the gateway) is a single binary: download the archive for your platform
@@ -106,7 +108,7 @@ Every provider reads its own variable: [`.env.example`](https://github.com/ajink
106
108
  [model tables](#model-names) say which belongs to which provider, and `puffinparse providers` shows
107
109
  which ones are set in your shell.
108
110
 
109
- From source (Rust stable + Python 3.9+):
111
+ From source (Rust stable + Python 3.10+):
110
112
 
111
113
  ```bash
112
114
  git clone https://github.com/ajinkyashejul/puffinparse && cd puffinparse
@@ -268,21 +270,22 @@ page per provider.
268
270
 
269
271
  | Model | Modes | List price / page (parse · ocr · extract) | Notes |
270
272
  |---|---|---|---|
271
- | `reducto/standard` | parse `*`, ocr `*` | $0.015 · $0.015 · — | Reducto Parse with account-default model (legacy standard) |
273
+ | `reducto/standard` | parse `*`, ocr `*` | $0.015 · $0.015 · — | Reducto Parse, legacy model (settings.model=legacy) |
272
274
  | `reducto/r-1` | parse, ocr | $0.01 · $0.01 · — | Reducto Parse with settings.model=r-1 (newest model, cheaper) |
273
- | `reducto/agentic` | parse, ocr | $0.03 · $0.03 · — | Reducto Parse with agentic text+table enhancement (highest accuracy, 2x cost) |
274
- | `reducto/extract` | extract `*` | — · — · $0.035 | Reducto Extract: POST /extract with a JSON schema, citations on request |
275
+ | `reducto/r-1-mini` | parse, ocr | $0.001 · $0.001 · — | Reducto Parse with settings.model=r-1-mini (cheapest, $1/1k pages) |
276
+ | `reducto/agentic` | parse, ocr | $0.03 · $0.03 · — | Reducto Parse, legacy model with agentic text+table enhancement (2x cost) |
277
+ | `reducto/extract` | extract `*` | — · — · $0.035 | Reducto Extract: POST /extract with a JSON schema (legacy parse), citations on request |
275
278
  | `reducto/deep_extract` | extract | — · — · $0.055 | Reducto Deep Extract (settings.deep_extract = true) for long or complex documents |
276
279
 
277
280
  **Extend** · `EXTEND_API_KEY` · live-verified — Parse engines that trade accuracy for cost per page, and two extraction processors.
278
281
 
279
282
  | Model | Modes | List price / page (parse · ocr · extract) | Notes |
280
283
  |---|---|---|---|
281
- | `extend/parse_performance` | parse `*`, ocr `*` | $0.025 · $0.025 · — | Extend engine=parse_performance (highest accuracy) |
282
- | `extend/parse_light` | parse, ocr | $0.00625 · $0.00625 · — | Extend engine=parse_light (fast, cheap, digital-native docs) |
283
- | `extend/parse_auto` | parse, ocr | $0.025 · $0.025 · — | Extend engine=parse_auto (picks light or performance per page) |
284
- | `extend/extraction_performance` | extract `*` | — · — · $0.0625 | Extend Extract, baseProcessor=extraction_performance (runs parse_performance) |
285
- | `extend/extraction_light` | extract | — · — · $0.015 | Extend Extract, baseProcessor=extraction_light (runs parse_light) |
284
+ | `extend/parse_performance` | parse `*`, ocr `*` | $0.02 · $0.02 · — | Extend engine=parse_performance (highest accuracy) |
285
+ | `extend/parse_light` | parse, ocr | $0.005 · $0.005 · — | Extend engine=parse_light (fast, cheap, digital-native docs) |
286
+ | `extend/parse_auto` | parse, ocr | $0.02 · $0.02 · — | Extend engine=parse_auto (picks light or performance per page) |
287
+ | `extend/extraction_performance` | extract `*` | — · — · $0.05 | Extend Extract, baseProcessor=extraction_performance (runs parse_performance) |
288
+ | `extend/extraction_light` | extract | — · — · $0.012 | Extend Extract, baseProcessor=extraction_light (runs parse_light) |
286
289
 
287
290
  **LlamaParse (LlamaCloud)** · `LLAMA_API_KEY` · live-verified — Credit-priced tiers from plain text extraction to agentic parsing; extract from `cost_effective` up.
288
291
 
@@ -291,15 +294,15 @@ page per provider.
291
294
  | `llamaparse/fast` | parse, ocr | $0.00125 · $0.00125 · — | LlamaParse tier=fast (text extraction, no OCR of images) |
292
295
  | `llamaparse/cost_effective` | parse `*`, ocr `*`, extract `*` | $0.00375 · $0.00375 · $0.01 | LlamaParse tier=cost_effective |
293
296
  | `llamaparse/agentic` | parse, ocr, extract | $0.0125 · $0.0125 · $0.03125 | LlamaParse tier=agentic |
294
- | `llamaparse/agentic_plus` | parse, ocr, extract | $0.05625 · $0.05625 · $0.11875 | LlamaParse tier=agentic_plus (highest accuracy) |
297
+ | `llamaparse/agentic_plus` | parse, ocr, extract | $0.03125 · $0.03125 · $0.075 | LlamaParse tier=agentic_plus (highest accuracy) |
298
+ | `llamaparse/turbo` | extract | — · — · $0.04375 | LlamaExtract tier=turbo (extract only; no separate parse charge) |
295
299
 
296
300
  **Mistral Document AI** · `MISTRAL_API_KEY` · docs-only — One OCR model with pinned versions; annotations give it an extract mode.
297
301
 
298
302
  | Model | Modes | List price / page (parse · ocr · extract) | Notes |
299
303
  |---|---|---|---|
300
- | `mistral/ocr-latest` | parse `*`, ocr `*`, extract `*` | $0.004 · $0.004 · $0.005 | Mistral OCR, latest alias (mistral-ocr-latest; currently OCR 4.1) |
304
+ | `mistral/ocr-latest` | parse `*`, ocr `*`, extract `*` | $0.004 · $0.004 · $0.005 | Mistral OCR, latest alias (mistral-ocr-latest; currently OCR 4.1, as is mistral-ocr-4) |
301
305
  | `mistral/ocr-4-1` | parse, ocr, extract | $0.004 · $0.004 · $0.005 | Mistral OCR 4.1 pinned (mistral-ocr-4-1; blocks + block confidence scores) |
302
- | `mistral/ocr-4-0` | parse, ocr, extract | $0.004 · $0.004 · $0.005 | Mistral OCR 4.0 pinned (mistral-ocr-4-0; paragraph blocks, no block confidence) |
303
306
  | `mistral/ocr-2512` | parse, ocr, extract | $0.002 · $0.002 · $0.003 | Mistral OCR 3 pinned (mistral-ocr-2512; cheaper, no paragraph blocks) |
304
307
 
305
308
  **Azure AI Document Intelligence** · `AZURE_DOCUMENT_INTELLIGENCE_KEY` (+ `AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT`) · docs-only — Prebuilt Document Intelligence models: `read` for OCR, `layout` for structure, fixed schemas for extraction.
@@ -323,38 +326,53 @@ page per provider.
323
326
  | `textract/queries` | extract `*` | — · — · $0.015 | Textract AnalyzeDocument QUERIES: one natural-language query per schema field |
324
327
  | `textract/forms` | extract | — · — · $0.05 | Textract AnalyzeDocument FORMS: key-value pairs matched to schema fields |
325
328
 
326
- **Google Gemini** · `GEMINI_API_KEY` · docs-only — Vision-LLM transcription. Prices are per-page **estimates** (~1500 in + ~800 out tokens); `cost_usd` uses them until the response reports real usage.
329
+ **Google Gemini** · `GEMINI_API_KEY` · docs-only — Vision-LLM transcription. Prices are per-page **estimates** (~1500 in + ~800 out tokens, thinking not included); `cost_usd` uses them until the response reports real usage.
327
330
 
328
331
  | Model | Modes | List price / page (parse · ocr · extract) | Notes |
329
332
  |---|---|---|---|
330
- | `gemini/2.5-flash` | parse `*`, ocr `*`, extract `*` | $0.00245 · $0.00245 · $0.0012 | Gemini 2.5 Flash: vision-LLM transcription, the price/quality default |
331
- | `gemini/2.5-pro` | parse, ocr, extract | $0.009875 · $0.009875 · $0.004875 | Gemini 2.5 Pro: highest accuracy, ~4x the cost of Flash |
332
- | `gemini/2.5-flash-lite` | parse, ocr, extract | $0.00047 · $0.00047 · $0.00027 | Gemini 2.5 Flash-Lite: cheapest and fastest, clean documents |
333
- | `gemini/3.5-flash` | parse, ocr, extract | $0.00945 · $0.00945 · $0.00495 | Gemini 3.5 Flash: frontier Flash generation (GA 2026-05-19) |
334
- | `gemini/3.5-flash-lite` | parse, ocr, extract | $0.00245 · $0.00245 · $0.0012 | Gemini 3.5 Flash-Lite: low-latency 3.x tier (GA 2026-07-21) |
335
- | `gemini/3.8-flash` | parse, ocr, extract | $0.004125 · $0.004125 · $0.00225 | Gemini 3.8 Flash: newest Flash model (GA 2026-09-02, introductory pricing) |
333
+ | `gemini/4-hydrogen` | parse `*`, ocr `*`, extract `*` | $0.00825 · $0.00825 · $0.0045 | Gemini 4 Hydrogen: vision-LLM transcription, the default (default thinking level high, billed as output) |
334
+ | `gemini/4-hydrogen-low` | parse, ocr, extract | $0.00825 · $0.00825 · $0.0045 | Gemini 4 Hydrogen with thinkingConfig.thinkingLevel=low (cheaper, faster transcription) |
335
+ | `gemini/4-neon` | parse, ocr, extract | $0.0165 · $0.0165 · $0.009 | Gemini 4 Neon: premium tier, the most expensive Gemini |
336
+ | `gemini/3.8-flash` | parse, ocr, extract | $0.004125 · $0.004125 · $0.00225 | Gemini 3.8 Flash (introductory pricing; doubles to $1.50/$7.50 per 1M on 2027-01-01) |
336
337
  | `gemini/3.8-flash-low` | parse, ocr, extract | $0.004125 · $0.004125 · $0.00225 | Gemini 3.8 Flash with thinkingConfig.thinkingLevel=low (cheaper, faster transcription) |
338
+ | `gemini/3.6-flash` | parse, ocr, extract | $0.004125 · $0.004125 · $0.00225 | Gemini 3.6 Flash (introductory pricing; doubles to $1.50/$7.50 per 1M on 2027-01-01) |
339
+ | `gemini/3.5-flash-lite` | parse, ocr, extract | $0.00245 · $0.00245 · $0.0012 | Gemini 3.5 Flash-Lite: low-latency 3.x tier (GA 2026-07-21) |
337
340
  | `gemini/3-flash-preview` | parse, ocr, extract | $0.00315 · $0.00315 · $0.00165 | Gemini 3 Flash preview (gemini-3-flash-preview; PDF and image input) |
341
+ | `gemini/2.5-flash` | parse, ocr, extract | $0.00245 · $0.00245 · $0.0012 | Gemini 2.5 Flash, deprecated: Google routes it to gemini-3.5-flash-lite since 2026-12-01 |
342
+ | `gemini/2.5-pro` | parse, ocr, extract | $0.004125 · $0.004125 · $0.00225 | Gemini 2.5 Pro, deprecated: Google routes it to gemini-3.8-flash |
343
+ | `gemini/3.5-flash` | parse, ocr, extract | $0.004125 · $0.004125 · $0.00225 | Gemini 3.5 Flash, deprecated 2026-10-08: Google routes it to gemini-3.6-flash |
344
+ | `gemini/2.5-flash-lite` | parse, ocr, extract | $0.00047 · $0.00047 · $0.00027 | Gemini 2.5 Flash-Lite: cheapest; not available to new API users |
338
345
 
339
346
  **OpenAI** · `OPENAI_API_KEY` · docs-only — Vision transcription through the Responses API. Per-page prices are estimates, as for Gemini.
340
347
 
341
348
  | Model | Modes | List price / page (parse · ocr · extract) | Notes |
342
349
  |---|---|---|---|
343
- | `openai/gpt-5.6-luna` | parse `*`, ocr `*`, extract `*` | $0.00114 · $0.00114 · $0.00114 | OpenAI Responses API, gpt-5.6-luna (cheapest current vision model) |
350
+ | `openai/gpt-6-luna` | parse `*`, ocr `*`, extract `*` | $0.0005 · $0.0005 · $0.0005 | OpenAI Responses API, gpt-6-luna (cheapest GPT-6, image and PDF input) |
351
+ | `openai/gpt-6.1-terra` | parse, ocr, extract | $0.005 · $0.005 · $0.005 | OpenAI Responses API, gpt-6.1-terra (fast, efficient) |
352
+ | `openai/gpt-6.2-sol` | parse, ocr, extract | $0.01 · $0.01 · $0.01 | OpenAI Responses API, gpt-6.2-sol (everyday flagship) |
353
+ | `openai/gpt-6.2-astra` | parse, ocr, extract | $0.04 · $0.04 · $0.04 | OpenAI Responses API, gpt-6.2-astra (most capable GPT) |
354
+ | `openai/gpt-6-astra` | parse, ocr, extract | $0.05 · $0.05 · $0.05 | OpenAI Responses API, gpt-6-astra (previous GPT-6 flagship, most expensive) |
355
+ | `openai/gpt-5.6-luna` | parse, ocr, extract | $0.00114 · $0.00114 · $0.00114 | OpenAI Responses API, gpt-5.6-luna (GPT-5.6 small tier) |
344
356
  | `openai/gpt-5.6-terra` | parse, ocr, extract | $0.0114 · $0.0114 · $0.0114 | OpenAI Responses API, gpt-5.6-terra (balanced capability/price) |
345
- | `openai/gpt-5.6-sol` | parse, ocr, extract | $0.02 · $0.02 · $0.02 | OpenAI Responses API, gpt-5.6-sol (flagship GPT-5.6) |
346
- | `openai/gpt-6-astra` | parse, ocr, extract | $0.05 · $0.05 · $0.05 | OpenAI Responses API, gpt-6-astra (most capable, most expensive) |
347
- | `openai/gpt-6-luna` | parse, ocr, extract | $0.0005 · $0.0005 · $0.0005 | OpenAI Responses API, gpt-6-luna (cheapest GPT-6, image and PDF input) |
357
+ | `openai/gpt-5.6-sol` | parse, ocr, extract | $0.0285 · $0.0285 · $0.0285 | OpenAI Responses API, gpt-5.6-sol (flagship GPT-5.6) |
358
+
359
+ **Azure OpenAI** · `AZURE_OPENAI_API_KEY` + `AZURE_OPENAI_ENDPOINT` · live-verified — The OpenAI provider's Responses API call against your own Azure OpenAI resource (`/openai/v1/responses`). The model part is **your deployment name**, case kept: `azure_openai/<deployment-name>`. A deployment name does not reveal its model, so set `AZURE_OPENAI_MODEL` (or `provider_options.base_model`) to the OpenAI model it runs to get OpenAI's per-token list price; otherwise the cost is unknown. [Details](https://github.com/ajinkyashejul/puffinparse/blob/main/docs/providers/azure-openai.md).
360
+
361
+ | Model | Modes | List price / page (parse · ocr · extract) | Notes |
362
+ |---|---|---|---|
363
+ | `azure_openai/<deployment-name>` | parse `*`, ocr `*`, extract `*` | priced as `AZURE_OPENAI_MODEL`, else unknown | Your deployment, any name of 1–64 characters from `A-Z a-z 0-9 . _ -`; PDF input depends on the deployment |
348
364
 
349
365
  **Anthropic (Claude)** · `ANTHROPIC_API_KEY` · docs-only — Vision transcription through the Messages API. Per-page prices are estimates.
350
366
 
351
367
  | Model | Modes | List price / page (parse · ocr · extract) | Notes |
352
368
  |---|---|---|---|
353
- | `anthropic/claude-sonnet-5` | parse `*`, ocr `*`, extract `*` | $0.01 · $0.01 · $0.01 | Claude Messages API, claude-sonnet-5 (balanced vision transcription) |
369
+ | `anthropic/claude-sonnet-5-5` | parse `*`, ocr `*`, extract `*` | $0.01 · $0.01 · $0.01 | Claude Messages API, claude-sonnet-5-5 (balanced vision transcription; tool_choice auto) |
370
+ | `anthropic/claude-sonnet-5` | parse, ocr, extract | $0.01 · $0.01 · $0.01 | Claude Messages API, claude-sonnet-5 (previous Sonnet, same price as Sonnet 5.5) |
354
371
  | `anthropic/claude-haiku-4-5` | parse, ocr, extract | $0.005 · $0.005 · $0.005 | Claude Messages API, claude-haiku-4-5 (cheapest, 200K context) |
355
- | `anthropic/claude-opus-5` | parse, ocr, extract | $0.025 · $0.025 · $0.025 | Claude Messages API, claude-opus-5 (highest accuracy) |
372
+ | `anthropic/claude-opus-5` | parse, ocr, extract | $0.025 · $0.025 · $0.025 | Claude Messages API, claude-opus-5 |
356
373
  | `anthropic/claude-opus-5-5` | parse, ocr, extract | $0.02 · $0.02 · $0.02 | Claude Messages API, claude-opus-5-5 (current Opus; tool_choice auto, no forced tool) |
357
374
  | `anthropic/claude-haiku-5-5` | parse, ocr, extract | $0.0005 · $0.0005 · $0.0005 | Claude Messages API, claude-haiku-5-5 (cheapest Claude, 1M context) |
375
+ | `anthropic/claude-fable-5-2` | parse, ocr, extract | $0.04 · $0.04 · $0.04 | Claude Messages API, claude-fable-5-2 (most capable Claude; tool_choice auto; requires 30-day retention) |
358
376
 
359
377
  **Mathpix** · `MATHPIX_APP_KEY` (+ `MATHPIX_APP_ID`) · docs-only — Maths-first OCR: Mathpix Markdown with LaTeX, line and word polygons.
360
378
 
@@ -367,24 +385,25 @@ page per provider.
367
385
 
368
386
  | Model | Modes | List price / page (parse · ocr · extract) | Notes |
369
387
  |---|---|---|---|
370
- | `datalab/fast` | parse, ocr | $0.004 · $0.004 · — | Datalab Convert mode=fast (lowest latency, digital-native documents) |
371
- | `datalab/balanced` | parse `*`, ocr `*` | $0.004 · $0.004 · — | Datalab Convert mode=balanced (Datalab's recommended default) |
372
- | `datalab/accurate` | parse, ocr | $0.01 · $0.01 · — | Datalab Convert mode=accurate (scans, dense layouts, complex tables) |
388
+ | `datalab/lite` | parse, ocr | $0.000375 · $0.000375 · — | Datalab Convert mode=lite (text layer only, no images or LLM; cheapest) |
389
+ | `datalab/fast` | parse, ocr | $0.001 · $0.001 · — | Datalab Convert mode=fast (lowest latency, digital-native documents) |
390
+ | `datalab/balanced` | parse `*`, ocr `*` | $0.003 · $0.003 · — | Datalab Convert mode=balanced (Datalab's recommended default) |
391
+ | `datalab/accurate` | parse, ocr | $0.0075 · $0.0075 · — | Datalab Convert mode=accurate (scans, dense layouts, complex tables) |
373
392
 
374
- **Unstructured** · `UNSTRUCTURED_API_KEY` · docs-only — The partitioner behind many RAG pipelines; flat per-page price across strategies.
393
+ **Unstructured** · `UNSTRUCTURED_API_KEY` · docs-only — The partitioner behind many RAG pipelines; priced per strategy (`auto` is an estimate).
375
394
 
376
395
  | Model | Modes | List price / page (parse · ocr · extract) | Notes |
377
396
  |---|---|---|---|
378
- | `unstructured/hi_res` | parse `*`, ocr `*` | $0.015 · $0.015 · — | Unstructured strategy=hi_res (layout model + OCR; coordinates, table HTML, confidence) |
379
- | `unstructured/fast` | parse, ocr | $0.015 · $0.015 · — | Unstructured strategy=fast (text-layer extraction, no OCR, rejects images) |
397
+ | `unstructured/hi_res` | parse `*`, ocr `*` | $0.02 · $0.02 · — | Unstructured strategy=hi_res (layout model + OCR; coordinates, table HTML, confidence) |
398
+ | `unstructured/fast` | parse, ocr | $0.002 · $0.002 · — | Unstructured strategy=fast (text-layer extraction, no OCR, rejects images) |
380
399
  | `unstructured/auto` | parse, ocr | $0.015 · $0.015 · — | Unstructured strategy=auto (routes each page to fast / hi_res / VLM) |
381
400
 
382
401
  **Upstage Document Parse** · `UPSTAGE_API_KEY` · docs-only — Korean/English layout parsing to HTML or markdown.
383
402
 
384
403
  | Model | Modes | List price / page (parse · ocr · extract) | Notes |
385
404
  |---|---|---|---|
386
- | `upstage/document-parse` | parse `*`, ocr `*` | $0.01 · $0.01 · — | Upstage Document Parse (layout to HTML/Markdown; 100 pages sync, 1000 async) |
387
- | `upstage/document-parse-nightly` | parse, ocr | $0.01 · $0.01 · — | Upstage Document Parse nightly build (newest layout model, may change without notice) |
405
+ | `upstage/document-parse` | parse `*`, ocr `*` | $0.01 · $0.01 · — | Upstage Document Parse (layout to HTML/Markdown; 100 pages sync, 2000 async) |
406
+ | `upstage/document-parse-nightly` | parse, ocr | $0.01 · $0.01 · — | Upstage Document Parse nightly build (unverified: not on Upstage's model pages; may change without notice) |
388
407
 
389
408
  **Landing AI (Agentic Document Extraction)** · `LANDINGAI_API_KEY` · docs-only — Agentic Document Extraction (DPT-2): parse, then extract against your schema.
390
409
 
@@ -416,8 +435,15 @@ page per provider.
416
435
  | `opendocrouter/xingchen-agi/teleocr` | parse, ocr | $0.002702 · $0.002702 · — | TeleOCR (open model hosted by the router) |
417
436
  | `opendocrouter/rednote-hilab/dots.mocr` | parse, ocr | $0.00397 · $0.00397 · — | dots.mocr (open model hosted by the router) |
418
437
  | `opendocrouter/paddlepaddle/paddleocr-vl-1.6` | parse, ocr | $0.002111 · $0.002111 · — | PaddleOCR-VL-1.6 (open model hosted by the router) |
438
+ | `opendocrouter/google/gemini-4-argon` | parse, ocr | $0.019263 · $0.019263 · — | Gemini 4 Argon |
439
+ | `opendocrouter/meta/muse-spark-1.3-minimal` | parse, ocr | $0.009557 · $0.009557 · — | Muse Spark 1.3 (minimal reasoning) |
440
+ | `opendocrouter/meta/muse-wonder-1.0-minimal` | parse, ocr | $0.039405 · $0.039405 · — | Muse Wonder 1.0 (minimal reasoning) |
441
+ | `opendocrouter/mistral/mistral-ocr-4-1` | parse, ocr | $0.003998 · $0.003998 · — | Mistral OCR 4.1 |
442
+ | `opendocrouter/mistral/mistral-ocr-4-1-annotations` | parse, ocr | $0.004997 · $0.004997 · — | Mistral OCR 4.1 with annotations |
443
+ | `opendocrouter/llamaindex/ocria-1` | parse, ocr | $0.013037 · $0.013037 · — | OCRia-1 (LlamaIndex) |
444
+ | `opendocrouter/lightonai/lightonocr-3-1b` | parse, ocr | $0.003192 · $0.003192 · — | LightOnOCR-3-1B (open model hosted by the router; cold starts) |
445
+ | `opendocrouter/nvidia/nemotron-3.5-parse` | parse, ocr | $0.000733 · $0.000733 · — | Nemotron 3.5 Parse (open model hosted by the router; cold starts) |
419
446
 
420
- **Self-hosted engines** · no key · $0/page — out-of-process: a local binary or a server you run. Tesseract and Docling are verified locally; PaddleOCR is docs-only.
421
447
  **Self-hosted engines** · no key · $0/page — out-of-process: a local binary or a server you run. Tesseract and Docling are verified locally; PaddleOCR and vLLM are docs-only.
422
448
 
423
449
  | Model | Modes | List price / page (parse · ocr · extract) | Notes |
@@ -427,7 +453,7 @@ page per provider.
427
453
  | `paddleocr/default` | ocr `*` (native), parse `*` (PP-StructureV3) | $0 · $0 · — | your PaddleOCR serving (`PADDLEOCR_BASE_URL`); docs-only |
428
454
  | `paddleocr/vl` | parse, ocr | $0 · $0 · — | your PaddleOCR-VL pipeline serving (`PADDLEOCR_VL_BASE_URL`; PaddleOCR-VL-1.6 by default): layout + 0.9B VLM; docs-only |
429
455
  | `vllm/infinity-parser2-flash` | parse `*`, ocr `*` | $0 · $0 · — | `infly/Infinity-Parser2-Flash` on your `vllm serve` (`VLLM_BASE_URL`): page images, layout blocks with boxes; docs-only |
430
- | `vllm/dots.mocr` | parse, ocr | $0 · $0 · — | `rednote-hilab/dots.mocr` on your `vllm serve` (`VLLM_BASE_URL`): page images, layout blocks with boxes; docs-only |
456
+ | `vllm/dots.mocr` | parse, ocr | $0 · $0 · — | `dots-studio/dots.mocr` on your `vllm serve` (`VLLM_BASE_URL`): page images, layout blocks with boxes; docs-only |
431
457
 
432
458
  ### Keep your Reducto / Extend / LlamaParse code
433
459
 
@@ -521,6 +547,46 @@ puffinparse extract invoice.pdf -s schema.json --output-format extend # Extend
521
547
  puffinparse providers --json | jq '.output_formats' # the vendor shapes this build renders
522
548
  ```
523
549
 
550
+ ### MCP server for coding agents
551
+
552
+ `puffinparse mcp` runs a local [Model Context Protocol](https://modelcontextprotocol.io) server on
553
+ stdio, so an agent can parse, OCR, extract and compare models on a document directly:
554
+
555
+ ```bash
556
+ claude mcp add puffinparse -- puffinparse mcp # Claude Code
557
+ claude mcp add puffinparse -- uvx puffinparse mcp # same, nothing to install (0.1.7+)
558
+ puffinparse mcp --models reducto,llamaparse --root ~/docs # optional allow-list and file root
559
+ ```
560
+
561
+ Keys come from the server's environment and are never returned; a document goes only to the
562
+ provider of the model the agent calls. Cursor and Codex setup: [agents page](https://puffinparse.com/docs/agents/).
563
+
564
+ ### Find the best model for your own documents
565
+
566
+ With the MCP server added to your agent, ask:
567
+
568
+ > Use puffinparse to find the best model for our documents in ~/docs
569
+
570
+ It looks at the folder, picks a few models from the benchmark, asks you once to approve the
571
+ estimated cost, runs them with your keys, checks the documents where they disagree and recommends
572
+ one. Mention anything that matters ("we need zero data retention", "about 50,000 pages a month")
573
+ and it takes it into account. Every result can be checked next to its page in the local viewer.
574
+
575
+ <details><summary>The same steps without an agent</summary>
576
+
577
+ ```bash
578
+ puffinparse eval scan ~/docs
579
+ puffinparse eval recommend --monthly-pages 20000 --needs tables,scans --zdr
580
+ puffinparse eval run ~/docs -m reducto,llamaparse/cost_effective,tesseract --max-cost 5
581
+ puffinparse eval analyze ~/docs/.puffinparse/runs/<run> --write-report
582
+ puffinparse eval view ~/docs/.puffinparse/runs/<run> # the benchmark viewer, on your run
583
+ puffinparse eval anonymize ~/docs --out ~/docs-anon # optional: fake values in place of personal data, plus an answer key
584
+ ```
585
+
586
+ </details>
587
+
588
+ Details: [CLI](https://puffinparse.com/docs/cli/#puffinparse-eval) and [agents page](https://puffinparse.com/docs/agents/#find-the-best-model-for-your-documents).
589
+
524
590
  ### Gateway server
525
591
 
526
592
  Run PuffinParse as one HTTP endpoint so applications never hold provider keys:
@@ -535,7 +601,9 @@ curl -H "Authorization: Bearer $TEAM_KEY" -F file=@invoice.pdf -F model=invoices
535
601
  ordered or round-robin fallback), provider keys as `env:` references, and virtual keys with model
536
602
  allow-lists, monthly USD budgets and per-minute limits. `/v1/models`, `/v1/usage`, `/health` and
537
603
  Prometheus `/metrics` are built in; request logs are JSON lines that never contain document content
538
- or secrets. Reference: [`docs/SERVER.md`](https://github.com/ajinkyashejul/puffinparse/blob/main/docs/SERVER.md), sample:
604
+ or secrets. Defaults are hardened for untrusted callers (no unauthenticated start off localhost,
605
+ no in-gateway URL downloads unless enabled and then public addresses only, concurrency and
606
+ request-time limits; see the Hardening section of `docs/SERVER.md`). Reference: [`docs/SERVER.md`](https://github.com/ajinkyashejul/puffinparse/blob/main/docs/SERVER.md), sample:
539
607
  [`examples/server/puffinparse.toml`](https://github.com/ajinkyashejul/puffinparse/blob/main/examples/server/puffinparse.toml).
540
608
 
541
609
  ### Rust
@@ -671,12 +739,15 @@ PuffinParse stands on other people's work:
671
739
  [maturin](https://github.com/PyO3/maturin), [napi-rs](https://napi.rs) and the other crates in
672
740
  [THIRD_PARTY_NOTICES.md](https://github.com/ajinkyashejul/puffinparse/blob/main/THIRD_PARTY_NOTICES.md).
673
741
  The site uses GitHub's [Octicons](https://github.com/primer/octicons) GitHub mark (MIT), and the
674
- results viewer uses [pdf.js](https://github.com/mozilla/pdf.js) (Apache-2.0).
742
+ results viewer uses [pdf.js](https://github.com/mozilla/pdf.js) (Apache-2.0); the playground
743
+ signs in with [supabase-js](https://github.com/supabase/supabase-js) (MIT) when it is configured.
675
744
 
676
745
  ## License
677
746
 
678
747
  MIT. See [LICENSE](https://github.com/ajinkyashejul/puffinparse/blob/main/LICENSE). The third-party
679
748
  crates compiled into the binaries are listed in
680
- [THIRD_PARTY_NOTICES.md](https://github.com/ajinkyashejul/puffinparse/blob/main/THIRD_PARTY_NOTICES.md),
681
- and the benchmark data keeps its own licence, stated per dataset.
749
+ [THIRD_PARTY_NOTICES.md](https://github.com/ajinkyashejul/puffinparse/blob/main/THIRD_PARTY_NOTICES.md);
750
+ every release artifact (CLI archives, wheels and sdist, npm packages, and the Docker image under
751
+ `/usr/share/doc/puffinparse/`) ships `LICENSE`, that file and `THIRD_PARTY_LICENSES.txt` with each
752
+ crate's full licence text. The benchmark data keeps its own licence, stated per dataset.
682
753