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

# DocKiln documentation

> Turn JSON, HTML or a public web page into a downloadable document. Start with one request, then move repeated layouts into versioned templates.

> [card] [Generate your first PDF](https://docs.dockiln.io/quickstart.md)
>
> Create a key, submit HTML and download the finished file.

> [card] [Build a reusable template](https://docs.dockiln.io/templates.md)
>
> Map JSON fields and publish reusable layouts.

## The document request

With a [workspace API key](https://docs.dockiln.io/authentication.md) and your instance URL in the environment, send HTML to the documents endpoint.

```bash theme={null}
curl --fail-with-body -sS "$DOCKILN_URL/v1/documents" \
  -H "Authorization: Bearer $DOCKILN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Order confirmed</h1><p>Order DK-1042</p>"}'
```

A successful submission returns **202 Accepted** with a job ID. Use that ID to [check the result and download the PDF](https://docs.dockiln.io/quickstart.md#download-the-result). To try the built-in layouts before creating a workspace, use the [sample playground](https://dockiln.io/playground).

## Choose an input

| Input | When to use it |
| - | - |
| Published template + JSON | Invoices, receipts or reports that share a layout and need predictable pagination. |
| HTML with inline CSS | A custom print layout or a raster image of self-contained markup. |
| Public URL | A static snapshot of a public HTML page. Embed the styles and images the output needs. |

[Rendering options](https://docs.dockiln.io/generation.md) cover paper sizes, page numbers, screenshots and readiness controls.

## API reference

Browse [the API by task](https://docs.dockiln.io/api.md), from template publication and document generation to account settings, bucket delivery and usage. Each operation has its own request schema and playground.

## Misc guides

Use the [delivery and PDF guides](https://docs.dockiln.io/misc/overview.md) for provider setup, webhook verification, page layout and post-processing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.