DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to convert PDFs to Markdown and JSON from the command line with OXR

Use the SoMark CLI with the free OXR endpoint to batch-convert documents to Markdown and JSON.

Short answer: pip install somark; then somark --base-url https://free-oxr.somark.ai/api/v1 --api-key dummy parse document.pdf --formats md,json --out ./parsed-output/; Repeat the parse command for each file you need to convert. All steps.

Who it is forA developer building a document ingestion step who needs Markdown and JSON with layout data from PDFs.

The problemRaw PDF text loses tables, formulas, and reading order, which makes downstream processing unreliable.

The outcomeEach PDF produces a Markdown file and a JSON file with layout coordinates in an output folder.

What you need first

  • A PDF or document image to parse
  • Python 3.12 or Node.js for the SoMark CLI, or Docker for a local service
  • For local hosting: Linux, an NVIDIA GPU with BF16 support, and 24GB or more of GPU memory

Steps

  1. pip install somark
  2. somark --base-url https://free-oxr.somark.ai/api/v1 --api-key dummy parse document.pdf --formats md,json --out ./parsed-output/ (inferred, check the README)
  3. Repeat the parse command for each file you need to convert. (inferred, check the README)
  4. Open the files in ./parsed-output/ and check the Markdown and JSON content.

Prompt for your agent

Using the OXR repo at https://github.com/SoMarkAI/OXR, install the somark CLI and parse <path-to-document.pdf> with the base URL https://free-oxr.somark.ai/api/v1, outputting md and json to ./parsed-output/. Verify that both output files exist and that the JSON includes layout coordinates.

Caveat. The README says the free API uses a queue, so processing speed may vary, and it is not recommended for production.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for SoMarkAI/OXR and "Convert PDFs to Markdown and JSON from the command line"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer