> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tipar.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Tipar is the JSON-template PDF API. Send a JSON template plus your data, get a PDF back — invoices, receipts, contracts, certificates, reports.

Tipar turns a **JSON template** plus your **data** into a PDF. One HTTPS call, one round trip — the response *is* the PDF.

```bash theme={"dark"}
curl https://api.tipar.dev/generate \
  -H "Authorization: Bearer tipar_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "template": { "page": { "content": { "type": "text", "value": "Hello, {{name}}!" } } }, "data": { "name": "world" } }' \
  --output hello.pdf
```

The template describes the page — text, tables, images, headers, footers. The data fills it in. Both travel in the same request, so there is nothing to upload ahead of time and no template to register.

## Why templates as JSON

Your templates are plain files. They live in your repository, next to the code that uses them:

<CardGroup cols={2}>
  <Card title="Version-controlled" icon="git-alt">
    `git diff` shows exactly what changed about your invoice. `git revert` undoes it. No separate template store to keep in sync with your code.
  </Card>

  <Card title="No HTML, no browser" icon="file-code">
    Tipar renders with [QuestPDF](https://www.questpdf.com/), not a headless Chromium. You describe a document, not a web page — so there are no CSS surprises and no print stylesheet to fight.
  </Card>

  <Card title="Copy-pasteable" icon="copy">
    A template is just JSON. Move it between projects, generate it from your own code, review it in a pull request like anything else.
  </Card>

  <Card title="Predictable" icon="ruler-combined">
    The template maps directly to layout primitives (`column`, `row`, `text`, `table`). What you write is what gets laid out.
  </Card>
</CardGroup>

## How it works

<Steps>
  <Step title="Write a template">
    Plain JSON describing the page. Keep it in your repo. See [Templates](/templates/overview).
  </Step>

  <Step title="POST your data">
    Send `template` + `data` to [`POST /generate`](/api-reference/generate) with your API key. Anything that speaks HTTPS — a Stripe webhook, a database row, a cron job — can produce a document.
  </Step>

  <Step title="Ship the PDF">
    The response is `application/pdf`. Store it, email it, or stream it straight back to your user. No polling, no callbacks.
  </Step>
</Steps>

## Is Tipar a fit?

<Tip>
  **Good fit.** You generate structured documents from structured data — invoices from billing rows, receipts from payments, certificates from course completions, reports from metrics. You'd rather not own the PDF-rendering machinery (fonts, fallbacks, edge cases, scaling) because PDFs are plumbing, not your product.
</Tip>

<Warning>
  **Not a fit (yet).** You already have HTML or React invoices you're happy with. Tipar does **not** render HTML — porting an existing HTML template to JSON is real work, and if your current setup works, the switch probably isn't worth it. Tipar is for documents you're building fresh, or rebuilding deliberately.
</Warning>

## Where to go next

<CardGroup cols={2}>
  <Card title="Quickstart" icon="bolt" href="/quickstart">
    Your first PDF in a few minutes.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Create and use an API key.
  </Card>

  <Card title="Templates" icon="layer-group" href="/templates/overview">
    Learn the template language.
  </Card>

  <Card title="Template schema" icon="book" href="/api-reference/template-schema">
    The complete node-by-node reference.
  </Card>
</CardGroup>

<Note>
  Want to try it without a key? The [public playground](https://tipar.dev) renders a watermarked PDF straight from the browser — no signup. Under the hood it's the same renderer as the API.
</Note>
