# AI use cases for OXR (SoMarkAI/OXR)

Repo: [SoMarkAI/OXR](https://github.com/SoMarkAI/OXR) | Use cases: 4 | Page: https://dedupedai.com/use-cases/somarkai-oxr/

OXR is an open-source document parsing model from the SoMark team that turns PDFs and document images into Markdown or JSON with layout coordinates.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Try OXR on one document without an API key: https://dedupedai.com/use-cases/somarkai-oxr/try-oxr-on-one-document-free/
- Convert PDFs to Markdown and JSON from the command line: https://dedupedai.com/use-cases/somarkai-oxr/convert-pdfs-to-markdown-and-json-via-cli/
- Host a private OXR parsing API on your own GPU: https://dedupedai.com/use-cases/somarkai-oxr/host-oxr-parsing-api-with-docker/
- Replace OXR's layout model with your own for a niche document type: https://dedupedai.com/use-cases/somarkai-oxr/swap-in-custom-layout-analysis-model/

## How to try OXR on one document without an API key with OXR

Repo: [SoMarkAI/OXR](https://github.com/SoMarkAI/OXR) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Upload one PDF or image to the free online demo and download the Markdown result.

**Who it is for:** A researcher or analyst who wants to check parsing quality on a real document before committing to any setup.

**The problem:** Reading the accuracy claims is not enough. You need to see how OXR handles your own tables, formulas, or scans.

**The outcome:** You see the parsed Markdown, the layout structure, and a downloadable Markdown file for your document.

### Steps

1. Open the Online Demo at https://free-oxr.somark.ai in a browser.
2. Upload your PDF or image file.
3. Review the parsed Markdown output and check tables and formulas against the original. (inferred, check the README)
4. Download the Markdown result if it looks correct.

### Prompt to paste into your agent

```text
Using the OXR repo at https://github.com/SoMarkAI/OXR, parse <path-to-document.pdf> through the free online demo at https://free-oxr.somark.ai and save the Markdown output. Verify that the tables and formulas in the output match the original document.
```

### Caveat

The README says the free API is not recommended for production, has no guaranteed stability, and may be taken offline when the team can no longer afford it.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/somarkai-oxr/try-oxr-on-one-document-free/

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

Repo: [SoMarkAI/OXR](https://github.com/SoMarkAI/OXR) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

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

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

**The problem:** Raw PDF text loses tables, formulas, and reading order, which makes downstream processing unreliable.

**The outcome:** Each PDF produces a Markdown file and a JSON file with layout coordinates in an output folder.

### 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 to paste into your agent

```text
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.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/somarkai-oxr/convert-pdfs-to-markdown-and-json-via-cli/

## How to host a private OXR parsing API on your own GPU with OXR

Repo: [SoMarkAI/OXR](https://github.com/SoMarkAI/OXR) | Difficulty: Advanced | Time: 90 minutes | Basis: From the README

Run the OXR parsing service in Docker so your documents stay on your own hardware.

**Who it is for:** An engineering team with an NVIDIA GPU server that needs document parsing behind its own network.

**The problem:** Sending internal documents to a public demo API is not acceptable, and the free API is not for production.

**The outcome:** A local parsing API on port 8000 with a demo page and API docs, usable by your internal tools.

### Steps

1. `git clone https://github.com/SoMarkAI/OXR.git`
2. `hf download SoMarkAI/OXR-1.0 --local-dir ./models/OXR-1.0`
3. `docker build -f docker/Dockerfile.allinone -t oxr-1.0 .`
4. `docker run --rm --gpus all --ipc=host -p 127.0.0.1:8000:8000 -v "$PWD/models/OXR-1.0:/models/oxr-model:ro" oxr-1.0` (inferred, check the README)
5. Open http://localhost:8000/docs once the startup logs show the services are ready, then send a file to /v1/parse/sync.

### Prompt to paste into your agent

```text
Using the OXR repo at https://github.com/SoMarkAI/OXR, download the OXR-1.0 weights, build the allinone Docker image, and start it on port 8000. Verify that http://localhost:8000/docs loads, then parse <path-to-document.pdf> via POST to /v1/parse/sync and save the returned Markdown.
```

### Caveat

The README lists 24GB of GPU memory as the minimum for low-concurrency testing and recommends 48GB or more for long documents, and the first startup may take longer than usual.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/somarkai-oxr/host-oxr-parsing-api-with-docker/

## How to replace OXR's layout model with your own for a niche document type with OXR

Repo: [SoMarkAI/OXR](https://github.com/SoMarkAI/OXR) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Point the OXR parsing API at a custom layout analysis service while keeping OXR for recognition.

**Who it is for:** A document parsing provider or domain team whose forms, reports, or exam papers need different region rules than the built-in layout model.

**The problem:** Layout analysis rules differ by business use case, and a generic layout model may group or bound regions wrongly for your documents.

**The outcome:** OXR runs recognition and reading order on regions produced by your own layout model.

### Steps

1. Download the OXR model weights with `hf download SoMarkAI/OXR-1.0 --local-dir ./models/OXR-1.0`.
2. Run your custom layout analysis model as an HTTP service, with its API compatible with the built-in one. The README does not document this interface. (inferred, check the README)
3. Start the OXR model service, using the vLLM steps in the README or the Docker image.
4. Copy `config.example.yaml` to `config.yaml` and set the url field under `layout_analyze_model` to your custom service address.
5. `oxr serve --config config.yaml --host 127.0.0.1 --port 8000 --workers 1` (inferred, check the README)

### Prompt to paste into your agent

```text
Using the OXR repo at https://github.com/SoMarkAI/OXR, set the layout_analyze_model url in config.yaml to <custom-layout-service-url> and start the parsing API. Parse <path-to-sample-document.pdf> and verify that the layout bounding boxes in the JSON output come from the custom layout service.
```

### Caveat

The README says any Layout Analysis model can work with OXR but does not document the interface a custom layout service must expose, so this needs to be checked against the code.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/somarkai-oxr/swap-in-custom-layout-analysis-model/
