Authentication
How to authenticate with the PodPDF API using API keys.
Overview
PodPDF uses API key authentication. All API requests require a valid API key in the request header.
X-API-Key: your_api_key_here
Quick Start
- Get Your API Key - Sign up and copy your API key from the dashboard
- Use Your Key - Include it in all API requests
How It Works
Every request to the PodPDF API must include your API key in the X-API-Key header:
curl -X POST https://api.podpdf.com/quickjob \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"input_type": "html",
"html": "<h1>Hello World</h1>"
}' \
--output document.pdf
Getting Your API Key
API keys are only available through the dashboard. You cannot generate API keys via the API itself.
Step 1: Sign Up
- Go to https://podpdf.com/signup
- Create your account
- Verify your email
Step 2: Get Your API Key from Dashboard
- Sign in to https://podpdf.com/dashboard
- Navigate to the API Keys section
- Copy your API key (it will be shown only once)
API keys are only displayed once when created. Save it securely immediately. If you lose it, you'll need to generate a new one.
Your API key is like a password. Never share it publicly or commit it to version control.
Using Your API Key
Include your API key in the X-API-Key header for all requests:
cURL Example
curl -X POST https://api.podpdf.com/quickjob \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"input_type":"html","html":"<h1>Test</h1>"}' \
--output test.pdf
JavaScript Example
const fetch = require('node-fetch');
async function generatePDF() {
const response = await fetch('https://api.podpdf.com/quickjob', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
input_type: 'html',
html: '<h1>Hello World</h1>'
})
});
const buffer = await response.buffer();
// Save or process the PDF
}
Python Example
import requests
def generate_pdf():
response = requests.post(
'https://api.podpdf.com/quickjob',
headers={
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
},
json={
'input_type': 'html',
'html': '<h1>Hello World</h1>'
}
)
if response.status_code == 200:
with open('output.pdf', 'wb') as f:
f.write(response.content)
Security Best Practices
✅ DO:
- Store securely - Use environment variables or secret management
- Use HTTPS - Always make requests over HTTPS
- Rotate regularly - Generate new keys periodically
- Monitor usage - Check your dashboard for unusual activity
- Use different keys - Separate keys for development and production
❌ DON'T:
- Commit to git - Never commit API keys to source control
- Share publicly - Don't post keys in forums or documentation
- Hardcode - Don't hardcode keys in your application
- Use in client-side code - Never expose keys in frontend JavaScript
Managing API Keys
All API key management (viewing, creating, revoking) must be done through the dashboard. There are no API endpoints for key management.
Viewing Your Keys
Access your API keys from the dashboard:
- Sign in to https://podpdf.com/dashboard
- Go to Settings → API Keys
- View all your active keys
Creating New Keys
You can create multiple API keys for different environments (e.g., development, production):
- Sign in to the dashboard
- Go to Settings → API Keys
- Click Create New Key
- Give it a descriptive name (e.g., "Production" or "Development")
- Copy and save the key securely
API keys are only shown once when created. If you lose it, you'll need to generate a new one from the dashboard.
Revoking Keys
If a key is compromised or no longer needed:
- Sign in to the dashboard
- Go to Settings → API Keys
- Find the key you want to revoke
- Click Revoke or Delete
- Generate a new key from the dashboard if needed
Environment Variables
Recommended Setup
Store your API key in environment variables:
Linux/Mac (.bashrc or .zshrc):
export PODPDF_API_KEY="your_api_key_here"
Windows (Command Prompt):
set PODPDF_API_KEY=your_api_key_here
Node.js (.env file):
PODPDF_API_KEY=your_api_key_here
Then use in your code:
const apiKey = process.env.PODPDF_API_KEY;
fetch('https://api.podpdf.com/quickjob', {
headers: {
'X-API-Key': apiKey,
'Content-Type': 'application/json'
}
});
Common Errors
401 Unauthorized
API key is missing or invalid.
Solution:
- Check that you're including the
X-API-Keyheader - Verify your API key is correct
- Generate a new key if needed
403 Forbidden
Account issue or quota exceeded.
Solution:
- Check your account status in the dashboard
- Verify you haven't exceeded your plan limits
- Upgrade if you've hit the free tier quota
429 Too Many Requests
Rate limit exceeded.
Solution:
- Free tier: 20 requests per minute
- Wait before retrying
- Consider upgrading for higher limits
Testing Your API Key
Quick test to verify your API key works:
curl -X POST https://api.podpdf.com/quickjob \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"input_type": "html",
"html": "<h1>Test</h1><p>If you can read this, your API key works!</p>"
}' \
--output test.pdf
If successful, you'll get a test.pdf file.
Rate Limits
API key authentication is subject to rate limits:
| Plan | Rate Limit | Quota |
|---|---|---|
| Free | 20 requests/minute | 100 PDFs total |
| Paid | Unlimited | Unlimited PDFs |
View plans and pricing in your dashboard
Need Help?
Lost your API key?
Generate a new one from the dashboard: Settings → API Keys → Create New Key
API key not working?
- Verify you're using the correct key
- Check that it hasn't been revoked
- Make sure you're using the
X-API-Keyheader