GenerateRequest parameters used by both /generate and /preview.
If you prefer a complete field-by-field schema, see the API Reference tab (generated from OpenAPI).
Text input
textsupports:\\nfor a new line\\n\\nfor a paragraph break
- The API normalizes whitespace per line (multiple spaces are collapsed), then trims the final text.
Sizing & layout
Page size, orientation, and DPI
page_size:a4,letter,postcard_us,envelope_10, etc. (see Page Sizes & DPI)orientation:portraitorlandscapedpi:300or600
DPI scaling rule (critical)
All pixel parameters are defined at a 300 DPI baseline. If you setdpi: 600, the service scales margins/font size/spacing so the physical output stays the same.
Font sizing
font_size:"auto"(default) auto-fits the text to the available content area- an integer
12–400(manual size)
max_auto_font_size: caps the font size used by auto-fit (useful for short text on large pages)
Margins (pixels @ 300 DPI)
margin_left,margin_right,margin_top,margin_bottom- Defaults are
240pxwhich is roughly 20mm at 300 DPI.
Line layout
line_height_multiplier(default2.0): bigger numbers increase line spacingline_break_spacing(optional): extra spacing between paragraphs;nulllets the server choose
Word spacing
word_spacingadds extra pixels between words (useful for “looser” handwriting).
Visual effects
All effects are optional and off by default (except kerning).Effects like word rotation, natural variation, and random indentation are intentionally non-deterministic. Combined with different font metrics (each font has different letter spacing and line geometry), some font/effect combinations can occasionally render closer to the margins than expected or clip near edges on a single page. Always validate your exact
font_id + settings using /preview before production.Kerning
kerning(defaulttrue) adjusts letter pairs (e.g., “AV”, “To”) for more natural spacing.
Rotation
enable_word_rotationenables subtle word rotationword_rotation_rangecontrols max rotation angle (degrees)
Natural handwriting variation
enable_natural_variationapplies smooth, elastic-like distortionnatural_variation_alphacontrols intensity (typical:10–40)natural_variation_sigmacontrols smoothness (typical:3–8)
Random indentation
enable_random_indentationadds random horizontal indentation to linesindentation_rangecontrols the max indentation
Ink flow
enable_ink_flowadds ink fading/flow artifactsink_flow_intensitycontrols strength (0–3)
Color and alignment
text_alignment:leftorcentertext_color:[R, G, B](e.g.,[0, 0, 0]for black)