Quickstart Guide
Generate your first PDF in 5 minutes
1
2
Generate an API Key
Navigate to the API Keys page in your dashboard and create a new key.
API Key Format
sk_free_A1b2C3d4E5f6G7h8I9j0K1l2M3n4O5p6Important
Save your API key securely. It won't be shown again!3
Make Your First API Call
Use cURL or your favorite HTTP client to generate a PDF:
cURL
curl -X POST https://api.speedstein.com/v1/pdf/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"html": "<html><body><h1>My First PDF</h1><p>Generated with Speedstein!</p></body></html>",
"format": "A4",
"margin": "1cm"
}' \
--output my-first.pdfNode.js
const fetch = require('node-fetch');
const fs = require('fs');
async function generatePDF() {
const response = await fetch('https://api.speedstein.com/v1/pdf/generate', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
html: '<html><body><h1>My First PDF</h1></body></html>',
format: 'A4',
margin: '1cm'
})
});
const buffer = await response.buffer();
fs.writeFileSync('my-first.pdf', buffer);
console.log('PDF generated successfully!');
}
generatePDF();Python
import requests
response = requests.post(
'https://api.speedstein.com/v1/pdf/generate',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'html': '<html><body><h1>My First PDF</h1></body></html>',
'format': 'A4',
'margin': '1cm'
}
)
with open('my-first.pdf', 'wb') as f:
f.write(response.content)
print('PDF generated successfully!')4
Verify the Response
You should receive a successful response with metadata about your PDF:
Response (200 OK)
{
"id": "pdf_1a2b3c4d5e6f",
"url": "https://storage.speedstein.com/pdfs/1a2b3c4d5e6f.pdf",
"size": 45234,
"pages": 1,
"generation_time_ms": 1847,
"created_at": "2025-10-28T12:34:56Z",
"expires_at": "2025-11-04T12:34:56Z"
}Success!
Your PDF was generated in under 2 seconds. Download it from the url field.
Next Steps
Explore Advanced Features
Learn about custom headers, footers, page numbers, and watermarks
Try Batch Generation
Generate multiple PDFs in parallel with our batch API
View Code Examples
Complete examples in Node.js, Python, PHP, Ruby, and more
Check Rate Limits
Understand rate limits and quotas for your subscription tier