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

# Craftkit

> Design document templates in a visual editor, then render PDFs from a REST API — asynchronously, at scale.

Craftkit turns a designed template plus a JSON payload into a rendered PDF. You author
templates in the dashboard (or let your customers author them through the embed), define
typed variables, then call the REST API to render documents. Renders run asynchronously on a
queue, the PDF lands on object storage, and you retrieve it by polling or webhook.

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Render your first PDF in five minutes — authenticate, render, poll, download.
  </Card>

  <Card title="Server-to-server integration" icon="server" href="/guides/headless-integration">
    The complete playbook for a backend, no-human-at-render-time integration.
  </Card>

  <Card title="Concepts" icon="diagram-project" href="/concepts">
    Templates, versions, variables, manifests, and the render pipelines.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/render-template">
    Every endpoint, request shape, and response field.
  </Card>
</CardGroup>

## How it works

<Steps>
  <Step title="Author a template">
    Design a template in the dashboard and insert typed variables (`{{customer.name}}`,
    loops over arrays, images). Publishing snapshots an immutable **version** with an
    auto-extracted **variable manifest**.
  </Step>

  <Step title="Render with the API">
    `POST /v1/templates/:slug/render` with a `data` object. Craftkit validates the data
    against the template's manifest and enqueues a render job, returning `202` with a poll URL.
  </Step>

  <Step title="Retrieve the result">
    Poll `GET /v1/renders/:id` until `status` is `succeeded`, or receive a dashboard-configured
    webhook. Download the PDF from `downloadUrl`, or mint a durable share link.
  </Step>
</Steps>

## Surfaces

| Surface           | What it is                                                                               |
| ----------------- | ---------------------------------------------------------------------------------------- |
| **REST API**      | Server-to-server rendering with a project API key (`ck_live_…`). This site focuses here. |
| **Builder embed** | Drop the template designer into your own SaaS so your customers author templates.        |
| **Form embed**    | A drop-in form for end-users to fill a template's variables and produce a document.      |

<Note>
  Every API request authenticates with a project API key as `Authorization: Bearer ck_live_…`.
  Keys are environment-specific — a key minted on localhost will not work against
  `https://api.craftkit.dev`. See [Authentication](/guides/authentication).
</Note>
