Python Examples
Complete Python integration examples
Installation
pip install requests
Basic Usage
import requests
import os
def generate_pdf():
api_key = os.environ.get('SPEEDSTEIN_API_KEY')
response = requests.post(
'https://api.speedstein.com/v1/pdf/generate',
headers={'Authorization': f'Bearer {api_key}'},
json={
'html': '<html><body><h1>Hello PDF!</h1></body></html>',
'options': {'format': 'A4'}
}
)
data = response.json()
print(f"PDF generated: {data['download_url']}")
generate_pdf()