Resume PDF generation API
Generate a resume PDF from a template and a candidate's JSON data in a single call. Docweave binds work history, education, and skills into an HTML resume template and returns a ready-to-send PDF — no headless browser to run yourself.
Generate a resume PDF via the API
POST your template and data to /api/v1/pdf:
curl https://docweave.dev/api/v1/pdf \
-H "Authorization: Bearer dw_live_your_key" \
-H "Content-Type: application/json" \
-H "Accept: application/pdf" \
--output resume-jordan-alvarez.pdf \
-d '{
"source": {
"type": "template",
"template": "<h1>{{ full_name }}</h1><p>{{ headline }}</p><p>{{ email }} · {{ phone }}</p>",
"data": {
"full_name": "Jordan Alvarez",
"headline": "Senior Backend Engineer",
"email": "jordan.alvarez@example.com",
"phone": "+1 (555) 019-2244"
}
},
"options": { "format": "Letter" },
"idempotencyKey": "resume-jordan-alvarez-v3"
}'…or from an AI agent
Add the Docweave MCP server and your agent gets a generate_pdf tool — the same orchestration, no HTTP boilerplate:
// From an AI agent over MCP — no HTTP plumbing:
generate_pdf({
source: {
type: "template",
template: "<h1>{{ full_name }}</h1><p>{{ headline }}</p><p>{{ email }} · {{ phone }}</p>",
data: { full_name: "Jordan Alvarez", headline: "Senior Backend Engineer", email: "jordan.alvarez@example.com", phone: "+1 (555) 019-2244" }
},
outputPath: "/tmp/resume-jordan-alvarez.pdf"
})Template example
Any HTML works as a template. Use {{ placeholders }} for the values you pass in data:
<article style="font-family: sans-serif;">
<header>
<h1>{{ full_name }}</h1>
<p>{{ headline }}</p>
<p>{{ email }} · {{ phone }} · {{ location }} · {{ links }}</p>
</header>
<section>
<h2>Summary</h2>
<p>{{ summary }}</p>
</section>
<section>
<h2>Experience</h2>
{{{ experience_items }}}
</section>
<section>
<h2>Education</h2>
{{{ education_items }}}
</section>
<section>
<h2>Skills</h2>
<p>{{ skills }}</p>
</section>
</article>FAQ
How do I generate a resume PDF from the API?
Send a POST to /api/v1/pdf with a source of type "template": pass your resume HTML template and a data object with the candidate's name, headline, contact details, experience, education, and skills. Docweave binds the JSON into the {{ placeholders }} and returns the resume PDF.
Can I reuse the same resume template for different candidates?
Yes. Send the template inline on each request, or store a template and reference it, then pass only the per-candidate JSON. The layout, fonts, and section order stay identical while the name, experience, and skills change per call.
How do I avoid generating a duplicate resume PDF?
Include an idempotencyKey (for example a candidate id plus a version number, like resume-jordan-alvarez-v3). A repeat request with the same key returns the stored result instead of re-rendering or re-billing, so retries are always safe.
How is resume PDF generation priced?
Pricing is per document, not per page. A one-page resume and a two-page resume with a longer work history count the same, so a candidate with more experience never costs extra.
Ready to generate resume PDFs in production?
Get an API key