Generate high-quality handwritten text image.
This endpoint generates a full-quality print-ready output.
Output formats
output_format: "png" (default): Returns JSON with a base64-encoded PNG (transparent background).output_format: "pdf": Returns a binary application/pdf response (white background only).Key Features:
font_size: "auto"MediaBox/TrimBox/BleedBox/CropBox) for print workflowspdf.preset="lob" or pdf.standard="pdfx1a")PDF options (pdf object, only when output_format="pdf"):
preset: generic (default), lob (PDF/X-1a), click2mail (portal-friendly; disables marks/slug, sets postcard bleed defaults)standard: pdf (default) or pdfx1a (CMYK PDF/X-1a:2001 via Ghostscript)icc_profile: auto (default), gracol_2013, gracol_2006, pso_coated_v3, iso_coated_v2 (PDF/X-1a only)profile: document (default), press, auto (standard PDF only; PDF/X-1a uses preset/standard rules)region: auto (default), us, eubleed_mm: override bleed in mm (optional)crop_box: media (default), bleed, trim (standard PDF only)Generation Types:
standard (default): For cards, letters, and general textaddress: For envelope addresses with specific constraints (see below)Address Generation Constraints:
When using generation_type: "address", the following limitations apply:
\n)font_size: "auto" is not supported; you must specify a font size between 12-400 pixelsText Formatting:
\n for line breaks\n\n for paragraph spacingBearer authentication header of the form Bearer <token>, where <token> is your auth token.
Request model for generating handwritten text.
Text to generate. Use \n for line breaks, \n\n for paragraphs.
1 - 10000Font identifier (1-90).
1 <= x <= 90Font size in pixels (12-400) or 'auto' for automatic sizing
Maximum font size for auto-fit mode in pixels (default: 200px). Only applies when font_size='auto'. Use to prevent oversized fonts on short text.
20 <= x <= 400Generation type. Options: 'standard' (default) for cards/letters/general text, 'address' for envelope addresses (max 5 lines, 250 chars, manual font sizing required - 'auto' not supported)
standard, address Page size for output. Common sizes with dimensions at 300 DPI:
See documentation for full list of sizes.
a3, a4, a5, a6, A3, A4, A5, A6, letter, legal, half_letter, postcard_us, card_5x7, card_a2, square_5x5, card_96x135, dl, envelope_10, envelope_monarch Page orientation
portrait, landscape Output format. 'png' returns the current JSON response with base64 image. 'pdf' returns a binary application/pdf response.
png, pdf PDF-specific options (only used when output_format='pdf').
Output resolution in dots per inch. 300 DPI for standard printing, 600 DPI for high-quality printing. Note: All pixel values (margins, font sizes, spacing) are relative to 300 DPI and will be automatically scaled for other DPI values to maintain physical dimensions.
300, 600 Line height as multiplier of font size
0.5 <= x <= 4Spacing between paragraphs in pixels at 300 DPI (None = auto)
0 <= x <= 500Left margin in pixels at 300 DPI (240px = ~20mm)
0 <= x <= 5000Right margin in pixels at 300 DPI (240px = ~20mm)
0 <= x <= 5000Top margin in pixels at 300 DPI (240px = ~20mm)
0 <= x <= 5000Bottom margin in pixels at 300 DPI (240px = ~20mm)
0 <= x <= 5000Extra pixels between words at 300 DPI
0 <= x <= 3000Enable word rotation effect
Maximum rotation angle for words (default 5.0 when rotation enabled)
0 <= x <= 10Enable natural handwriting variation
Intensity of elastic deformation (default 15 when variation enabled). Typical useful range is 10–40; higher values create stronger bending and should be paired with sigma ≥ 3.
0 <= x <= 100Smoothness of deformation (default 5 when variation enabled). Values below 3 can look grainy; for high intensity (alpha), increase sigma to keep strokes smooth.
0 <= x <= 10Enable random line indentation
Range for random indentation in pixels at 300 DPI (default 20 when indentation enabled)
0 <= x <= 100Enable ink flow (fade text) effect
Intensity of ink flow effect (default 1.0 when ink flow enabled, max 3.0)
0 <= x <= 3Text alignment
left, center Enable kerning (automatic letter spacing adjustments based on character pairs). When enabled, letters like 'AV' or 'To' are positioned closer for natural appearance. Disable for uniform spacing between all letters.
RGB color for text
3 elementsOutput generated successfully
Response model for generated handwritten text.
Unique request identifier
Base64 encoded PNG image
Image width in pixels
Image height in pixels
Processing time in milliseconds
Number of characters processed
Actual font size used (populated when font_size='auto', None for manual sizing)