# Pandoc recipe

URL: https://briq.cloud/cookbook/pandoc

> A document converter with LaTeX, for a skill that has to produce a file, not just a plan for one.

Tags: document, testing

## Run it

MCP:

```ts
briq_run({
  recipe: "pandoc",
  params: {
    "size": "small",
    "diskGb": 1
  },
  wait: true
})
```

REST:

```bash
curl -X POST https://api.briq.cloud/v1/briqs \
  -H "Authorization: Bearer $BRIQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "recipe": "pandoc",
    "params": {
      "size": "small",
      "diskGb": 1
    },
    "wait": true
  }'
# → { "briqs": [{ "id": "bq_…", … }], "outputs": { "PANDOC_HOST": "…" }, … }

# ... when done, for each briq id
curl -X DELETE https://api.briq.cloud/v1/briqs/<id> \
  -H "Authorization: Bearer $BRIQ_API_KEY"
```

## Parameters

| Name | Type | Options | Default | What it does |
| --- | --- | --- | --- | --- |
| `size` | enum | small, medium, large | "small" | — |
| `diskGb` | number | — | 1 | Volume size, in GB |

## Outputs

Returned by `briq_run` once the stack is healthy. Hosts resolve inside your team network; secrets are generated per run.

| Output | Value |
| --- | --- |
| `PANDOC_HOST` | `pandoc.<stack>.internal` |
| `WORKDIR` | `/work` |

## What it runs

| Briq | Image | Ports | Size | Volume |
| --- | --- | --- | --- | --- |
| pandoc | `pandoc/latex:latest` | — | small | 1 GB at /work |

## When to use it

* The agent must produce a PDF, a DOCX or a deck and has nothing to convert with.
* You want LaTeX-quality typesetting, not a browser's print-to-PDF.
* Many conversions in one session, without a cold start each time.

## Tips

* **Files in and out**: `briq_files_put` to `/work/input.md`, `briq_exec` with
  `pandoc /work/input.md -o /work/output.pdf`, then `briq_files_get` `/work/output.pdf`.
* **Unicode or custom fonts**: add `--pdf-engine=xelatex`.
* **No ports**: everything goes through `briq_exec` and the file tools.
* **Large inputs**: `/work` is a volume that starts small; pass `diskGb` for more. Set it when the
  briq is created, and it counts toward your [plan's disk](https://briq.cloud/docs/cost#plans).
