Quick Start
Generate your first PDF in under 5 minutes
This guide walks you through generating your first PDF with DoCreate in under 5 minutes.
Step 1: Create an Account
Sign up for a DoCreate account at docreate.io. You can get started with the free tier, which includes a generous number of PDF generations per month.
Step 2: Create a Project
After signing in, navigate to your team dashboard and create a new project. Give it a descriptive name such as "My First Project" or the name of the application you are building.
Step 3: Generate an API Key
Inside your project, go to the API Keys section and click Create API Key. Copy the generated key immediately -- it will only be displayed once. Store it securely, for example in an environment variable:
export DOCREATE_API_KEY="your-api-key-here"
Step 4: Generate Your First PDF
Run the following cURL command in your terminal to generate a simple PDF:
curl -X POST https://api.docreate.io/api/pdf/external \
-H "Authorization: Bearer $DOCREATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"html": "<h1>Hello, DoCreate!</h1><p>This is my first generated PDF.</p>",
"css": "h1 { color: #1a1a2e; } p { color: #555; font-size: 14px; }"
}' \
--output my-first-pdf.pdf
If everything is set up correctly, you will find a file called my-first-pdf.pdf in your current directory. Open it to see your generated document.
What Just Happened?
- You sent a
POSTrequest to the DoCreate API endpoint. - The
Authorizationheader carried your API key as a Bearer token. - The request body contained the HTML content and CSS styling for the document.
- DoCreate rendered the HTML/CSS into a PDF and returned it as a binary response.
- The
--outputflag saved the binary response to a file.
Next Steps
- Authentication -- Learn more about API key management and security.
- Your First PDF -- Explore the full request body structure, including headers, footers, and dynamic data.