# Introduction

Render markdown to a typeset PDF over one HTTP call, or from an agent through MCP.

Page: https://legivel.com/docs

## What legivel does

You send Markdown and get a typeset PDF with paragraph-wide line breaking and font shaping. Automatic hyphenation is enabled by default when you specify a supported document language. See [language settings](https://legivel.com/docs/markdown#hyphenation).

One call does the whole job: `POST /v1/render` with the markdown as the body answers with the finished PDF bytes, without a watermark on any plan. The key is read from the `LEGIVEL_API_KEY` environment variable.

Every PDF you receive counts as one document against your plan's documents per period; a refused or failed render counts nothing. The usage fields call the same count `credits`: one document costs one credit. On a paid plan the API can also seal the document with your certificate; a seal is a certificate-based digital signature written into the finished file. See [Seal PDFs](https://legivel.com/docs/sealing).

```bash
curl -X POST https://api.legivel.com/v1/render \
  -H "Authorization: Bearer $LEGIVEL_API_KEY" \
  -H "Content-Type: text/markdown" \
  --data-binary @doc.md \
  -o doc.pdf
```

## Two ways in

| Surface | Where | What you get |
| --- | --- | --- |
| REST API | `https://api.legivel.com` | `POST /v1/render` and `GET /v1/usage`. |
| MCP | `https://api.legivel.com/mcp` | Two tools, `render_pdf` and `get_usage`, backed by the same handlers, auth, limits and quota as the REST API. |

Both surfaces authenticate with the same Bearer token and draw from the same documents per period.

## Where to go next

- [Get your API key](https://legivel.com/docs/api-key): create a key on the account page.
- [Quickstart](https://legivel.com/docs/quickstart): render your first PDF from cURL, JavaScript or Python.
- [Render a PDF](https://legivel.com/docs/api/render): the full reference for `POST /v1/render`.
- [MCP server](https://legivel.com/docs/mcp): connect Claude Code, Claude Desktop or another MCP client.
- [What renders](https://legivel.com/docs/markdown): what the markdown dialect supports.
- [Download OpenAPI](https://api.legivel.com/v1/openapi.json): the machine-readable description of every endpoint, at `https://api.legivel.com/v1/openapi.json`.
