Renduo
Guides

First PDF in 5 minutes

The shortest path from nothing to a generated PDF — an API key, a React component, and one curl.

This guide gets you to a real, generated PDF in about five minutes. You need Node.js and npm installed. No prior Renduo knowledge required.

1. Get an API key

  1. Sign in to the dashboard with Google or GitHub. Your first login creates an organization and a production environment for you.
  2. Go to Keys and create a key with the generate and templates:write scopes (you'll both register a template and generate a PDF).
  3. Copy it immediately — it's shown once, in the form rnd_live_… / rnd_test_….
export RENDUO_API_KEY=rnd_live_your_key_here

2. Write a component

A template is a React component that reads its props from window.__RENDUO_PROPS__. Create Invoice.tsx:

const props = JSON.parse(window.__RENDUO_PROPS__)

export default function Invoice() {
  return (
    <div style={{ fontFamily: 'sans-serif', padding: 40 }}>
      <h1 style={{ fontSize: 28, marginBottom: 24 }}>{props.title}</h1>
      <p style={{ fontSize: 14, color: '#555' }}>Customer: {props.customer}</p>
      <table style={{ width: '100%', borderCollapse: 'collapse' }}>
        <tr>
          <th style={{ textAlign: 'left', padding: 8 }}>Description</th>
          <th style={{ textAlign: 'right', padding: 8 }}>Total</th>
        </tr>
        {(props.items ?? []).map((item, i) => (
          <tr key={i}>
            <td style={{ padding: 8 }}>{item.description}</td>
            <td style={{ textAlign: 'right', padding: 8 }}>{item.amount}</td>
          </tr>
        ))}
      </table>
      <p style={{ marginTop: 24, fontSize: 16, fontWeight: 600 }}>
        Total: {props.total}
      </p>
    </div>
  )
}

3. Install and push

npm install -g @renduo/cli
renduo push Invoice.tsx --slug invoice

You'll see the new templateId and version in the output. Save the templateId — you need it to generate. (Alternatively, register with a single POST /v1/templates curl — see the quickstart.)

4. Generate a PDF

TEMPLATE_ID="<the-id-from-step-3>"

curl -X POST https://api.renduo.dev/v1/generate \
  -H "Authorization: Bearer $RENDUO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "templateId": "'"$TEMPLATE_ID"'",
    "mode": "sync",
    "payload": {
      "title": "Invoice 2026-001",
      "customer": "Acme Corp",
      "items": [
        { "description": "Starter Plan", "amount": 19000 },
        { "description": "Tax (19%)", "amount": 3610 }
      ],
      "total": 22610
    }
  }' | python3 -c "
import sys, json, base64
data = json.load(sys.stdin)
open('output.pdf', 'wb').write(base64.b64decode(data['pdf']))
print(f'Saved output.pdf ({data[\"durationMs\"]}ms)')
"

Or with the CLI:

renduo generate "$TEMPLATE_ID" \
  --props '{"title":"Invoice 2026-001","customer":"Acme Corp","items":[{"description":"Starter Plan","amount":19000},{"description":"Tax (19%)","amount":3610}],"total":22610}' \
  --output invoice.pdf

You're done

You registered a real component-first template and generated a PDF end to end. Next steps:

On this page