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.
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.
Smoothness of deformation (default 5 when variation enabled). Values below 3 can look grainy; for high intensity (alpha), increase sigma to keep strokes smooth.
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.
Actual font size used (populated when font_size='auto', None for manual sizing)
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"HandTextAI","colors":{"primary":"#20557b"},"logo":{"light":"https://mintcdn.com/handtextai/Z-RsM08FgOQ6klme/logo.svg?fit=max\u0026auto=format\u0026n=Z-RsM08FgOQ6klme\u0026q=85\u0026s=92fe0458151b3071b33188751c73675e","dark":"https://mintcdn.com/handtextai/879KlhgYBbpFmho3/logo-dark.svg?fit=max\u0026auto=format\u0026n=879KlhgYBbpFmho3\u0026q=85\u0026s=c4940907b652ee1fd4dd2edbcdc37923"},"favicon":"/favicon.svg","navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"handtextai","hasAudioNarration":false,"actualSubdomain":"handtextai","customDomains":["docs.handtextai.com"],"gitSource":{"type":"github","owner":"dortesy","repo":"handtextai-api","deployBranch":"batch","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21af19afa954dfcfc3071d","collectionId":"629fa5db-fecb-4c47-9850-a7b895dcfa54","schemaVersion":"v2"},"entitlements":{},"buildId":"6a21af19afa954dfcfc3071d:success","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"default","tag":"Docs","count":18},{"language":"default","tag":"Guides","count":9},{"language":"default","tag":"Reference","count":6},{"language":"default","tag":"API Reference","count":4},{"language":"default","tag":"Endpoints","count":4},{"language":"default","tag":"Getting Started","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#navbar [data-selector=nav-logo] img{height:34px;width:auto}.dark #navbar [data-selector=nav-logo] img[src=\"/logo.svg\"]{filter:brightness(0) invert(1)}"}],"page":{"pagePath":"api-reference/endpoints/generate-handwritten-text","slug":"/api-reference/endpoints/generate-handwritten-text","pageMetadata":{"title":"Generate Handwritten Text","description":"Generate high-quality handwritten text image.\n\nThis endpoint generates a full-quality print-ready output.\n\n**Output formats**\n- `output_format: \"png\"` (default): Returns JSON with a base64-encoded PNG (transparent background).\n- `output_format: \"pdf\"`: Returns a binary `application/pdf` response (white background only).\n\n**Key Features:**\n- Automatic font sizing with `font_size: \"auto\"`\n- Multiple page sizes (see documentation for pixel dimensions)\n- Natural handwriting effects\n- Transparent background for PNG overlay\n- PDF prepress boxes (`MediaBox`/`TrimBox`/`BleedBox`/`CropBox`) for print workflows\n- PDF/X-1a output for strict preflight systems (use `pdf.preset=\"lob\"` or `pdf.standard=\"pdfx1a\"`)\n\n**PDF options (`pdf` object, only when `output_format=\"pdf\"`):**\n- `preset`: `generic` (default), `lob` (PDF/X-1a), `click2mail` (portal-friendly; disables marks/slug, sets postcard bleed defaults)\n- `standard`: `pdf` (default) or `pdfx1a` (CMYK PDF/X-1a:2001 via Ghostscript)\n- `icc_profile`: `auto` (default), `gracol_2013`, `gracol_2006`, `pso_coated_v3`, `iso_coated_v2` (PDF/X-1a only)\n- `profile`: `document` (default), `press`, `auto` (standard PDF only; PDF/X-1a uses preset/standard rules)\n- `region`: `auto` (default), `us`, `eu`\n- `bleed_mm`: override bleed in mm (optional)\n- `crop_box`: `media` (default), `bleed`, `trim` (standard PDF only)\n\n**Generation Types:**\n- `standard` (default): For cards, letters, and general text\n- `address`: For envelope addresses with specific constraints (see below)\n\n**Address Generation Constraints:**\nWhen using `generation_type: \"address\"`, the following limitations apply:\n- **Maximum 5 lines** - Text cannot exceed 5 lines (separated by `\\n`)\n- **Maximum 250 characters** - Total character limit including line breaks\n- **Manual font sizing required** - `font_size: \"auto\"` is not supported; you must specify a font size between 12-400 pixels\n\n**Text Formatting:**\n- Use `\\n` for line breaks\n- Use `\\n\\n` for paragraph spacing","deprecated":null,"version":null,"openapi":"https://api.handtextai.com/openapi.json post /api/v1/generate","href":"/api-reference/endpoints/generate-handwritten-text","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Generate high-quality handwritten text image.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"This endpoint generates a full-quality print-ready output.\"\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Output formats\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"output_format: \\\"png\\\"\"\n }), \" (default): Returns JSON with a base64-encoded PNG (transparent background).\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"output_format: \\\"pdf\\\"\"\n }), \": Returns a binary \", _jsx(_components.code, {\n children: \"application/pdf\"\n }), \" response (white background only).\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Key Features:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"Automatic font sizing with \", _jsx(_components.code, {\n children: \"font_size: \\\"auto\\\"\"\n })]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Multiple page sizes (see documentation for pixel dimensions)\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"Natural handwriting effects\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"Transparent background for PNG overlay\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"PDF prepress boxes (\", _jsx(_components.code, {\n children: \"MediaBox\"\n }), \"/\", _jsx(_components.code, {\n children: \"TrimBox\"\n }), \"/\", _jsx(_components.code, {\n children: \"BleedBox\"\n }), \"/\", _jsx(_components.code, {\n children: \"CropBox\"\n }), \") for print workflows\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"PDF/X-1a output for strict preflight systems (use \", _jsx(_components.code, {\n children: \"pdf.preset=\\\"lob\\\"\"\n }), \" or \", _jsx(_components.code, {\n children: \"pdf.standard=\\\"pdfx1a\\\"\"\n }), \")\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsxs(_components.strong, {\n children: [\"PDF options (\", _jsx(_components.code, {\n children: \"pdf\"\n }), \" object, only when \", _jsx(_components.code, {\n children: \"output_format=\\\"pdf\\\"\"\n }), \"):\"]\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"preset\"\n }), \": \", _jsx(_components.code, {\n children: \"generic\"\n }), \" (default), \", _jsx(_components.code, {\n children: \"lob\"\n }), \" (PDF/X-1a), \", _jsx(_components.code, {\n children: \"click2mail\"\n }), \" (portal-friendly; disables marks/slug, sets postcard bleed defaults)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"standard\"\n }), \": \", _jsx(_components.code, {\n children: \"pdf\"\n }), \" (default) or \", _jsx(_components.code, {\n children: \"pdfx1a\"\n }), \" (CMYK PDF/X-1a:2001 via Ghostscript)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"icc_profile\"\n }), \": \", _jsx(_components.code, {\n children: \"auto\"\n }), \" (default), \", _jsx(_components.code, {\n children: \"gracol_2013\"\n }), \", \", _jsx(_components.code, {\n children: \"gracol_2006\"\n }), \", \", _jsx(_components.code, {\n children: \"pso_coated_v3\"\n }), \", \", _jsx(_components.code, {\n children: \"iso_coated_v2\"\n }), \" (PDF/X-1a only)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"profile\"\n }), \": \", _jsx(_components.code, {\n children: \"document\"\n }), \" (default), \", _jsx(_components.code, {\n children: \"press\"\n }), \", \", _jsx(_components.code, {\n children: \"auto\"\n }), \" (standard PDF only; PDF/X-1a uses preset/standard rules)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"region\"\n }), \": \", _jsx(_components.code, {\n children: \"auto\"\n }), \" (default), \", _jsx(_components.code, {\n children: \"us\"\n }), \", \", _jsx(_components.code, {\n children: \"eu\"\n })]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"bleed_mm\"\n }), \": override bleed in mm (optional)\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"crop_box\"\n }), \": \", _jsx(_components.code, {\n children: \"media\"\n }), \" (default), \", _jsx(_components.code, {\n children: \"bleed\"\n }), \", \", _jsx(_components.code, {\n children: \"trim\"\n }), \" (standard PDF only)\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Generation Types:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"standard\"\n }), \" (default): For cards, letters, and general text\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"address\"\n }), \": For envelope addresses with specific constraints (see below)\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Address Generation Constraints:\"\n }), \"\\nWhen using \", _jsx(_components.code, {\n children: \"generation_type: \\\"address\\\"\"\n }), \", the following limitations apply:\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Maximum 5 lines\"\n }), \" - Text cannot exceed 5 lines (separated by \", _jsx(_components.code, {\n children: \"\\\\n\"\n }), \")\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Maximum 250 characters\"\n }), \" - Total character limit including line breaks\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Manual font sizing required\"\n }), \" - \", _jsx(_components.code, {\n children: \"font_size: \\\"auto\\\"\"\n }), \" is not supported; you must specify a font size between 12-400 pixels\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Text Formatting:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"Use \", _jsx(_components.code, {\n children: \"\\\\n\"\n }), \" for line breaks\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Use \", _jsx(_components.code, {\n children: \"\\\\n\\\\n\"\n }), \" for paragraph spacing\"]\n }), \"\\n\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Generate Handwritten Text","description":"Generate high-quality handwritten text image.\n\nThis endpoint generates a full-quality print-ready output.\n\n**Output formats**\n- `output_format: \"png\"` (default): Returns JSON with a base64-encoded PNG (transparent background).\n- `output_format: \"pdf\"`: Returns a binary `application/pdf` response (white background only).\n\n**Key Features:**\n- Automatic font sizing with `font_size: \"auto\"`\n- Multiple page sizes (see documentation for pixel dimensions)\n- Natural handwriting effects\n- Transparent background for PNG overlay\n- PDF prepress boxes (`MediaBox`/`TrimBox`/`BleedBox`/`CropBox`) for print workflows\n- PDF/X-1a output for strict preflight systems (use `pdf.preset=\"lob\"` or `pdf.standard=\"pdfx1a\"`)\n\n**PDF options (`pdf` object, only when `output_format=\"pdf\"`):**\n- `preset`: `generic` (default), `lob` (PDF/X-1a), `click2mail` (portal-friendly; disables marks/slug, sets postcard bleed defaults)\n- `standard`: `pdf` (default) or `pdfx1a` (CMYK PDF/X-1a:2001 via Ghostscript)\n- `icc_profile`: `auto` (default), `gracol_2013`, `gracol_2006`, `pso_coated_v3`, `iso_coated_v2` (PDF/X-1a only)\n- `profile`: `document` (default), `press`, `auto` (standard PDF only; PDF/X-1a uses preset/standard rules)\n- `region`: `auto` (default), `us`, `eu`\n- `bleed_mm`: override bleed in mm (optional)\n- `crop_box`: `media` (default), `bleed`, `trim` (standard PDF only)\n\n**Generation Types:**\n- `standard` (default): For cards, letters, and general text\n- `address`: For envelope addresses with specific constraints (see below)\n\n**Address Generation Constraints:**\nWhen using `generation_type: \"address\"`, the following limitations apply:\n- **Maximum 5 lines** - Text cannot exceed 5 lines (separated by `\\n`)\n- **Maximum 250 characters** - Total character limit including line breaks\n- **Manual font sizing required** - `font_size: \"auto\"` is not supported; you must specify a font size between 12-400 pixels\n\n**Text Formatting:**\n- Use `\\n` for line breaks\n- Use `\\n\\n` for paragraph spacing","deprecated":null,"version":null,"openapi":"https://api.handtextai.com/openapi.json post /api/v1/generate","href":"/api-reference/endpoints/generate-handwritten-text","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Endpoints"],"summary":"Generate Handwritten Text","description":"Generate high-quality handwritten text image.\n\nThis endpoint generates a full-quality print-ready output.\n\n**Output formats**\n- `output_format: \"png\"` (default): Returns JSON with a base64-encoded PNG (transparent background).\n- `output_format: \"pdf\"`: Returns a binary `application/pdf` response (white background only).\n\n**Key Features:**\n- Automatic font sizing with `font_size: \"auto\"`\n- Multiple page sizes (see documentation for pixel dimensions)\n- Natural handwriting effects\n- Transparent background for PNG overlay\n- PDF prepress boxes (`MediaBox`/`TrimBox`/`BleedBox`/`CropBox`) for print workflows\n- PDF/X-1a output for strict preflight systems (use `pdf.preset=\"lob\"` or `pdf.standard=\"pdfx1a\"`)\n\n**PDF options (`pdf` object, only when `output_format=\"pdf\"`):**\n- `preset`: `generic` (default), `lob` (PDF/X-1a), `click2mail` (portal-friendly; disables marks/slug, sets postcard bleed defaults)\n- `standard`: `pdf` (default) or `pdfx1a` (CMYK PDF/X-1a:2001 via Ghostscript)\n- `icc_profile`: `auto` (default), `gracol_2013`, `gracol_2006`, `pso_coated_v3`, `iso_coated_v2` (PDF/X-1a only)\n- `profile`: `document` (default), `press`, `auto` (standard PDF only; PDF/X-1a uses preset/standard rules)\n- `region`: `auto` (default), `us`, `eu`\n- `bleed_mm`: override bleed in mm (optional)\n- `crop_box`: `media` (default), `bleed`, `trim` (standard PDF only)\n\n**Generation Types:**\n- `standard` (default): For cards, letters, and general text\n- `address`: For envelope addresses with specific constraints (see below)\n\n**Address Generation Constraints:**\nWhen using `generation_type: \"address\"`, the following limitations apply:\n- **Maximum 5 lines** - Text cannot exceed 5 lines (separated by `\\n`)\n- **Maximum 250 characters** - Total character limit including line breaks\n- **Manual font sizing required** - `font_size: \"auto\"` is not supported; you must specify a font size between 12-400 pixels\n\n**Text Formatting:**\n- Use `\\n` for line breaks\n- Use `\\n\\n` for paragraph spacing","operationId":"generate_endpoint_api_v1_generate_post","requestBody":"4fbdd7a4-e313-4fb5-8839-27b8bfd97ec0","responses":{"200":"52a93a0a-93bd-482b-a566-c825353a8523","400":"410d76e6-7bd1-4016-abbf-a6f88f0b43cc","401":"92cf06c8-85d2-485b-8f8c-7b9b8641187a","422":"6dc9eebe-37b4-4236-8665-6cbcbd52f9d5","429":"ba15ec91-6ac3-4e57-9e5d-cd3411d14ba6","500":"bef02392-44d6-494e-b8ae-61316642d0c8"},"security":["b0efef5e-7dc6-4d45-8377-f8e0d89d578b"],"method":"post","type":"path","servers":["8ebebd62-862a-4d03-b629-098c0d3334ae"],"path":"/api/v1/generate","baseUrlOptions":["https://api.handtextai.com"],"title":"Generate Handwritten Text","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"properties":{"text":{"type":"string","maxLength":10000,"minLength":1,"title":"Text","description":"Text to generate. Use \\n for line breaks, \\n\\n for paragraphs.","isRequired":true,"uniqueKey":"text","typeLabel":"string"},"font_id":{"type":"integer","maximum":90,"minimum":1,"title":"Font Id","description":"Font identifier (1-90).","default":1,"uniqueKey":"font_id","typeLabel":"integer"},"font_size":{"oneOf":[{"type":"integer","title":"Font Size","description":"Font size in pixels (12-400) or 'auto' for automatic sizing","default":"auto","uniqueKey":"font_size.oneOf.0","typeLabel":"integer"},{"type":"string","title":"Font Size","description":"Font size in pixels (12-400) or 'auto' for automatic sizing","default":"auto","const":"auto","uniqueKey":"font_size.oneOf.1","typeLabel":"string"}],"uniqueKey":"font_size","typeLabel":"integer | string"},"max_auto_font_size":{"oneOf":[{"type":"integer","title":"Max Auto Font Size","description":"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.","maximum":400,"minimum":20,"uniqueKey":"max_auto_font_size.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Max Auto Font Size","description":"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.","uniqueKey":"max_auto_font_size.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_auto_font_size","typeLabel":"integer | null"},"generation_type":{"type":"string","enum":["standard","address"],"title":"Generation Type","description":"Generation 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)","default":"standard","uniqueKey":"generation_type","typeLabel":"enum\u003cstring>"},"page_size":{"type":"string","enum":["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"],"title":"Page Size","description":"Page size for output. Common sizes with dimensions at 300 DPI:\n- a4: 2480×3508px (210×297mm) - Standard letter (Europe)\n- a6: 1240×1748px (105×148mm) - Postcards (Europe)\n- letter: 2550×3300px (216×279mm) - Standard letter (US)\n- postcard_us: 1200×1800px (102×152mm) - US Postcards\n- card_96x135: 1134×1594px (96×135mm) - Gift cards (3.8×5.3\")\n- envelope_10: 1238×2850px (4.125×9.5\") - US Business Envelope #10\n- envelope_monarch: 1163×2250px (3.875×7.5\") - Monarch Envelope\n\nSee documentation for full list of sizes.","default":"a4","uniqueKey":"page_size","typeLabel":"enum\u003cstring>"},"orientation":{"type":"string","enum":["portrait","landscape"],"title":"Orientation","description":"Page orientation","default":"portrait","uniqueKey":"orientation","typeLabel":"enum\u003cstring>"},"output_format":{"type":"string","enum":["png","pdf"],"title":"Output Format","description":"Output format. 'png' returns the current JSON response with base64 image. 'pdf' returns a binary application/pdf response.","default":"png","uniqueKey":"output_format","typeLabel":"enum\u003cstring>"},"pdf":{"oneOf":[{"type":"object","title":"PdfOptions","description":"PDF-specific options (only used when output_format='pdf').","properties":{"preset":{"type":"string","enum":["generic","lob","click2mail"],"title":"Preset","description":"Convenience preset for common print/mail providers. 'generic' uses standard PDF output. 'lob' targets Lob preflight compatibility (PDF/X-1a, no crop marks). 'click2mail' targets Click2Mail upload compatibility (no crop marks; bleed defaults may differ).","default":"generic","uniqueKey":"pdf.oneOf.0.preset","typeLabel":"enum\u003cstring>"},"standard":{"type":"string","enum":["pdf","pdfx1a"],"title":"Standard","description":"PDF standard. 'pdf' produces a standard PDF (RGB, white background). 'pdfx1a' produces a PDF/X-1a:2001 compliant CMYK PDF (no transparency), intended for strict preflight systems.","default":"pdf","uniqueKey":"pdf.oneOf.0.standard","typeLabel":"enum\u003cstring>"},"icc_profile":{"type":"string","enum":["auto","gracol_2013","gracol_2006","pso_coated_v3","iso_coated_v2"],"title":"Icc Profile","description":"Output intent / CMYK ICC profile for PDF/X-1a. 'auto' chooses a sensible default by region ('us' -> GRACoL 2013, 'eu' -> PSO Coated v3).","default":"auto","uniqueKey":"pdf.oneOf.0.icc_profile","typeLabel":"enum\u003cstring>"},"profile":{"type":"string","enum":["auto","document","press"],"title":"Profile","description":"PDF layout profile. 'document' uses the selected page size as-is (no bleed, no crop marks). 'press' adds bleed and crop marks with correct PDF page boxes (for print shops that accept marks). 'auto' is a convenience option that may choose 'press' for trimmed products.","default":"document","uniqueKey":"pdf.oneOf.0.profile","typeLabel":"enum\u003cstring>"},"region":{"type":"string","enum":["auto","us","eu"],"title":"Region","description":"Region used for press defaults (bleed and crop mark conventions). 'auto' chooses based on page_size (e.g., ISO sizes -> eu, US sizes -> us).","default":"auto","uniqueKey":"pdf.oneOf.0.region","typeLabel":"enum\u003cstring>"},"bleed_mm":{"oneOf":[{"type":"number","title":"Bleed Mm","description":"Bleed in millimeters (e.g., 3.0mm EU or 3.175mm US). If omitted, defaults are applied based on preset/page type and region.","maximum":20,"minimum":0,"uniqueKey":"pdf.oneOf.0.bleed_mm.oneOf.0","typeLabel":"number"},{"type":"null","title":"Bleed Mm","description":"Bleed in millimeters (e.g., 3.0mm EU or 3.175mm US). If omitted, defaults are applied based on preset/page type and region.","uniqueKey":"pdf.oneOf.0.bleed_mm.oneOf.1","typeLabel":"null"}],"uniqueKey":"pdf.oneOf.0.bleed_mm","typeLabel":"number | null"},"crop_box":{"type":"string","enum":["media","bleed","trim"],"title":"Crop Box","description":"Which PDF box to set as CropBox. 'media' keeps crop marks visible in PDF viewers; 'bleed' crops to BleedBox; 'trim' crops to TrimBox.","default":"media","uniqueKey":"pdf.oneOf.0.crop_box","typeLabel":"enum\u003cstring>"}},"uniqueKey":"pdf.oneOf.0","typeLabel":"PdfOptions · object"},{"type":"null","description":"PDF-specific options (only used when output_format='pdf').","uniqueKey":"pdf.oneOf.1","typeLabel":"null"}],"uniqueKey":"pdf","typeLabel":"PdfOptions · object | null"},"dpi":{"type":"integer","enum":[300,600],"title":"Dpi","description":"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.","default":300,"uniqueKey":"dpi","typeLabel":"enum\u003cinteger>"},"line_height_multiplier":{"type":"number","maximum":4,"minimum":0.5,"title":"Line Height Multiplier","description":"Line height as multiplier of font size","default":2,"uniqueKey":"line_height_multiplier","typeLabel":"number"},"line_break_spacing":{"oneOf":[{"type":"integer","title":"Line Break Spacing","description":"Spacing between paragraphs in pixels at 300 DPI (None = auto)","maximum":500,"minimum":0,"uniqueKey":"line_break_spacing.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Line Break Spacing","description":"Spacing between paragraphs in pixels at 300 DPI (None = auto)","uniqueKey":"line_break_spacing.oneOf.1","typeLabel":"null"}],"uniqueKey":"line_break_spacing","typeLabel":"integer | null"},"margin_left":{"type":"integer","maximum":5000,"minimum":0,"title":"Margin Left","description":"Left margin in pixels at 300 DPI (240px = ~20mm)","default":240,"uniqueKey":"margin_left","typeLabel":"integer"},"margin_right":{"type":"integer","maximum":5000,"minimum":0,"title":"Margin Right","description":"Right margin in pixels at 300 DPI (240px = ~20mm)","default":240,"uniqueKey":"margin_right","typeLabel":"integer"},"margin_top":{"type":"integer","maximum":5000,"minimum":0,"title":"Margin Top","description":"Top margin in pixels at 300 DPI (240px = ~20mm)","default":240,"uniqueKey":"margin_top","typeLabel":"integer"},"margin_bottom":{"type":"integer","maximum":5000,"minimum":0,"title":"Margin Bottom","description":"Bottom margin in pixels at 300 DPI (240px = ~20mm)","default":240,"uniqueKey":"margin_bottom","typeLabel":"integer"},"word_spacing":{"type":"integer","maximum":3000,"minimum":0,"title":"Word Spacing","description":"Extra pixels between words at 300 DPI","default":0,"uniqueKey":"word_spacing","typeLabel":"integer"},"enable_word_rotation":{"type":"boolean","title":"Enable Word Rotation","description":"Enable word rotation effect","default":false,"uniqueKey":"enable_word_rotation","typeLabel":"boolean"},"word_rotation_range":{"type":"number","maximum":10,"minimum":0,"title":"Word Rotation Range","description":"Maximum rotation angle for words (default 5.0 when rotation enabled)","default":5,"uniqueKey":"word_rotation_range","typeLabel":"number"},"enable_natural_variation":{"type":"boolean","title":"Enable Natural Variation","description":"Enable natural handwriting variation","default":false,"uniqueKey":"enable_natural_variation","typeLabel":"boolean"},"natural_variation_alpha":{"type":"integer","maximum":100,"minimum":0,"title":"Natural Variation Alpha","description":"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.","default":15,"uniqueKey":"natural_variation_alpha","typeLabel":"integer"},"natural_variation_sigma":{"type":"integer","maximum":10,"minimum":0,"title":"Natural Variation Sigma","description":"Smoothness of deformation (default 5 when variation enabled). Values below 3 can look grainy; for high intensity (alpha), increase sigma to keep strokes smooth.","default":5,"uniqueKey":"natural_variation_sigma","typeLabel":"integer"},"enable_random_indentation":{"type":"boolean","title":"Enable Random Indentation","description":"Enable random line indentation","default":false,"uniqueKey":"enable_random_indentation","typeLabel":"boolean"},"indentation_range":{"type":"integer","maximum":100,"minimum":0,"title":"Indentation Range","description":"Range for random indentation in pixels at 300 DPI (default 20 when indentation enabled)","default":20,"uniqueKey":"indentation_range","typeLabel":"integer"},"enable_ink_flow":{"type":"boolean","title":"Enable Ink Flow","description":"Enable ink flow (fade text) effect","default":false,"uniqueKey":"enable_ink_flow","typeLabel":"boolean"},"ink_flow_intensity":{"type":"number","maximum":3,"minimum":0,"title":"Ink Flow Intensity","description":"Intensity of ink flow effect (default 1.0 when ink flow enabled, max 3.0)","default":1,"uniqueKey":"ink_flow_intensity","typeLabel":"number"},"text_alignment":{"type":"string","enum":["left","center"],"title":"Text Alignment","description":"Text alignment","default":"left","uniqueKey":"text_alignment","typeLabel":"enum\u003cstring>"},"kerning":{"type":"boolean","title":"Kerning","description":"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.","default":true,"uniqueKey":"kerning","typeLabel":"boolean"},"text_color":{"oneOf":[{"type":"array","items":{"type":"integer","uniqueKey":"text_color.oneOf.0.items.[INDEX]","typeLabel":"integer"},"title":"Text Color","description":"RGB color for text","maxItems":3,"minItems":3,"uniqueKey":"text_color.oneOf.0","typeLabel":"integer[]"},{"type":"null","title":"Text Color","description":"RGB color for text","uniqueKey":"text_color.oneOf.1","typeLabel":"null"}],"uniqueKey":"text_color","typeLabel":"integer[] | null"}},"type":"object","required":["text"],"title":"GenerateRequest","description":"Request model for generating handwritten text.","uniqueKey":"","typeLabel":"GenerateRequest · object"},"examples":{"Example":{"title":"Example","value":{"text":"\u003cstring>","font_id":1,"font_size":"auto","max_auto_font_size":210,"generation_type":"standard","page_size":"a4","orientation":"portrait","output_format":"png","pdf":{"preset":"generic","standard":"pdf","icc_profile":"auto","profile":"document","region":"auto","bleed_mm":10,"crop_box":"media"},"dpi":300,"line_height_multiplier":2,"line_break_spacing":250,"margin_left":240,"margin_right":240,"margin_top":240,"margin_bottom":240,"word_spacing":0,"enable_word_rotation":false,"word_rotation_range":5,"enable_natural_variation":false,"natural_variation_alpha":15,"natural_variation_sigma":5,"enable_random_indentation":false,"indentation_range":20,"enable_ink_flow":false,"ink_flow_intensity":1,"text_alignment":"left","kerning":true,"text_color":[123]}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"52a93a0a-93bd-482b-a566-c825353a8523":{"description":"Output generated successfully","content":{"application/json":{"schema":{"properties":{"request_id":{"type":"string","title":"Request Id","description":"Unique request identifier","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"image_base64":{"type":"string","title":"Image Base64","description":"Base64 encoded PNG image","isRequired":true,"uniqueKey":"image_base64","typeLabel":"string"},"width":{"type":"integer","title":"Width","description":"Image width in pixels","isRequired":true,"uniqueKey":"width","typeLabel":"integer"},"height":{"type":"integer","title":"Height","description":"Image height in pixels","isRequired":true,"uniqueKey":"height","typeLabel":"integer"},"processing_time_ms":{"type":"number","title":"Processing Time Ms","description":"Processing time in milliseconds","isRequired":true,"uniqueKey":"processing_time_ms","typeLabel":"number"},"characters_processed":{"type":"integer","title":"Characters Processed","description":"Number of characters processed","isRequired":true,"uniqueKey":"characters_processed","typeLabel":"integer"},"calculated_font_size":{"oneOf":[{"type":"integer","title":"Calculated Font Size","description":"Actual font size used (populated when font_size='auto', None for manual sizing)","uniqueKey":"calculated_font_size.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Calculated Font Size","description":"Actual font size used (populated when font_size='auto', None for manual sizing)","uniqueKey":"calculated_font_size.oneOf.1","typeLabel":"null"}],"uniqueKey":"calculated_font_size","typeLabel":"integer | null"}},"type":"object","required":["request_id","image_base64","width","height","processing_time_ms","characters_processed"],"title":"GenerateResponse","description":"Response model for generated handwritten text.","uniqueKey":"","typeLabel":"GenerateResponse · object"},"example":{"request_id":"550e8400-e29b-41d4-a716-446655440000","image_base64":"iVBORw0KGgoAAAANS...","width":2100,"height":2970,"processing_time_ms":523.7,"characters_processed":150},"examples":{"Example":{"title":"Example","value":{"request_id":"550e8400-e29b-41d4-a716-446655440000","image_base64":"iVBORw0KGgoAAAANS...","width":2100,"height":2970,"processing_time_ms":523.7,"characters_processed":150}}},"exampleType":"examples"},"application/pdf":{"schema":{"type":"string","format":"binary","uniqueKey":"","typeLabel":"file"},"examples":{"Example":{"title":"Example","value":"\u003cstring>"}},"exampleType":"generated"}},"exampleType":"examples"},"410d76e6-7bd1-4016-abbf-a6f88f0b43cc":{"description":"Invalid request parameters","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"92cf06c8-85d2-485b-8f8c-7b9b8641187a":{"description":"Invalid or missing API key","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"6dc9eebe-37b4-4236-8665-6cbcbd52f9d5":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"oneOf":[{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"type":"array","title":"Location","isRequired":true,"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"type":{"type":"string","title":"Error Type","isRequired":true,"uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","uniqueKey":"detail.items.[INDEX]","typeLabel":"ValidationError · object"},"type":"array","title":"Detail","uniqueKey":"detail","typeLabel":"ValidationError · object[]"}},"type":"object","title":"HTTPValidationError","uniqueKey":"","typeLabel":"HTTPValidationError · object"},"examples":{"Example":{"title":"Example","value":{"detail":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"ba15ec91-6ac3-4e57-9e5d-cd3411d14ba6":{"description":"Rate limit exceeded","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"bef02392-44d6-494e-b8ae-61316642d0c8":{"description":"Generation error","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"b0efef5e-7dc6-4d45-8377-f8e0d89d578b":{"HTTPBearer":{"type":"http","scheme":"bearer","scopes":[]}}},"servers":{"8ebebd62-862a-4d03-b629-098c0d3334ae":{"url":"https://api.handtextai.com","description":"Production API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"HTTPBearer","name":"Authorization"}],"title":"HTTPBearer"}]},"originalFileLocation":"https://api.handtextai.com/openapi.json"},"subdomain":"handtextai","siteName":"HandTextAI","title":"Generate Handwritten Text - HandTextAI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T17:57:42.895Z","originalFileLocation":"api-reference/endpoints/generate-handwritten-text.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Generate high-quality handwritten text image. This endpoint generates a full-quality print-ready output. Output formats - output_format: \u0026quot;png\u0026quot; (default): Returns JSON with a base64-encoded PNG (transparent background). - output_format: \u0026quot;pdf\u0026quot;: Returns a binary application/pdf response (white background only). Key Features: - Automatic font sizing with font_size: \u0026quot;auto\u0026quot; - Multiple page sizes (see documentation for pixel dimensions) - Natural handwriting effects - Transparent background for PNG overlay - PDF prepress boxes (MediaBox/TrimBox/BleedBox/CropBox) for print workflows - PDF/X-1a output for strict preflight systems (use pdf.preset=\u0026quot;lob\u0026quot; or pdf.standard=\u0026quot;pdfx1a\u0026quot;) PDF options (pdf object, only when output_format=\u0026quot;pdf\u0026quot;): - 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, eu - bleed_mm: override bleed in mm (optional) - crop_box: media (default), bleed, trim (standard PDF only) Generation Types: - standard (default): For cards, letters, and general text - address: For envelope addresses with specific constraints (see below) Address Generation Constraints: When using generation_type: \u0026quot;address\u0026quot;, the following limitations apply: - Maximum 5 lines - Text cannot exceed 5 lines (separated by \\n) - Maximum 250 characters - Total character limit including line breaks - Manual font sizing required - font_size: \u0026quot;auto\u0026quot; is not supported; you must specify a font size between 12-400 pixels Text Formatting: - Use \\n for line breaks - Use \\n\\n for paragraph spacing\">\u003cmeta data-mint-head name=\"application-name\" content=\"HandTextAI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/handtextai/RIpVHHUQP3xpgcmM/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/handtextai/RIpVHHUQP3xpgcmM/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/handtextai/RIpVHHUQP3xpgcmM/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/handtextai/RIpVHHUQP3xpgcmM/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/handtextai/RIpVHHUQP3xpgcmM/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/handtextai/RIpVHHUQP3xpgcmM/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/handtextai/RIpVHHUQP3xpgcmM/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/handtextai/RIpVHHUQP3xpgcmM/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/handtextai/RIpVHHUQP3xpgcmM/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generate Handwritten Text - HandTextAI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate high-quality handwritten text image. This endpoint generates a full-quality print-ready output. Output formats - output_format: \u0026quot;png\u0026quot; (default): Returns JSON with a base64-encoded PNG (transparent background). - output_format: \u0026quot;pdf\u0026quot;: Returns a binary application/pdf response (white background only). Key Features: - Automatic font sizing with font_size: \u0026quot;auto\u0026quot; - Multiple page sizes (see documentation for pixel dimensions) - Natural handwriting effects - Transparent background for PNG overlay - PDF prepress boxes (MediaBox/TrimBox/BleedBox/CropBox) for print workflows - PDF/X-1a output for strict preflight systems (use pdf.preset=\u0026quot;lob\u0026quot; or pdf.standard=\u0026quot;pdfx1a\u0026quot;) PDF options (pdf object, only when output_format=\u0026quot;pdf\u0026quot;): - 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, eu - bleed_mm: override bleed in mm (optional) - crop_box: media (default), bleed, trim (standard PDF only) Generation Types: - standard (default): For cards, letters, and general text - address: For envelope addresses with specific constraints (see below) Address Generation Constraints: When using generation_type: \u0026quot;address\u0026quot;, the following limitations apply: - Maximum 5 lines - Text cannot exceed 5 lines (separated by \\n) - Maximum 250 characters - Total character limit including line breaks - Manual font sizing required - font_size: \u0026quot;auto\u0026quot; is not supported; you must specify a font size between 12-400 pixels Text Formatting: - Use \\n for line breaks - Use \\n\\n for paragraph spacing\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"HandTextAI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.handtextai.com/api-reference/endpoints/generate-handwritten-text\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://handtextai.mintlify.app/_mintlify/api/og/v2?division=Endpoints\u0026amp;title=Generate+Handwritten+Text\u0026amp;description=Generate+high-quality+handwritten+text+image.%0A%0AThis+endpoint+generates+a+full-quality+print-ready+output.%0A%0A**Output+formats**%0A-+%60output_format%3A+%22png%22%60+%28default%29\u0026amp;theme=26d14cb1979a825f09d252cf\u0026amp;signature=fbb3bcf29ce2c79d73728d0f02605a2ba56254264dda960e3d7e7536b2cddc5d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Generate Handwritten Text - HandTextAI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate high-quality handwritten text image. This endpoint generates a full-quality print-ready output. Output formats - output_format: \u0026quot;png\u0026quot; (default): Returns JSON with a base64-encoded PNG (transparent background). - output_format: \u0026quot;pdf\u0026quot;: Returns a binary application/pdf response (white background only). Key Features: - Automatic font sizing with font_size: \u0026quot;auto\u0026quot; - Multiple page sizes (see documentation for pixel dimensions) - Natural handwriting effects - Transparent background for PNG overlay - PDF prepress boxes (MediaBox/TrimBox/BleedBox/CropBox) for print workflows - PDF/X-1a output for strict preflight systems (use pdf.preset=\u0026quot;lob\u0026quot; or pdf.standard=\u0026quot;pdfx1a\u0026quot;) PDF options (pdf object, only when output_format=\u0026quot;pdf\u0026quot;): - 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, eu - bleed_mm: override bleed in mm (optional) - crop_box: media (default), bleed, trim (standard PDF only) Generation Types: - standard (default): For cards, letters, and general text - address: For envelope addresses with specific constraints (see below) Address Generation Constraints: When using generation_type: \u0026quot;address\u0026quot;, the following limitations apply: - Maximum 5 lines - Text cannot exceed 5 lines (separated by \\n) - Maximum 250 characters - Total character limit including line breaks - Manual font sizing required - font_size: \u0026quot;auto\u0026quot; is not supported; you must specify a font size between 12-400 pixels Text Formatting: - Use \\n for line breaks - Use \\n\\n for paragraph spacing\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://handtextai.mintlify.app/_mintlify/api/og/v2?division=Endpoints\u0026amp;title=Generate+Handwritten+Text\u0026amp;description=Generate+high-quality+handwritten+text+image.%0A%0AThis+endpoint+generates+a+full-quality+print-ready+output.%0A%0A**Output+formats**%0A-+%60output_format%3A+%22png%22%60+%28default%29\u0026amp;theme=26d14cb1979a825f09d252cf\u0026amp;signature=fbb3bcf29ce2c79d73728d0f02605a2ba56254264dda960e3d7e7536b2cddc5d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/handtextai/RIpVHHUQP3xpgcmM/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"HandTextAI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#20557b\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.handtextai.com/api-reference/endpoints/generate-handwritten-text\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoints/generate-handwritten-text.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.handtextai.com/#organization\",\"name\":\"HandTextAI\",\"url\":\"https://docs.handtextai.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/handtextai/Z-RsM08FgOQ6klme/logo.svg?fit=max\u0026auto=format\u0026n=Z-RsM08FgOQ6klme\u0026q=85\u0026s=92fe0458151b3071b33188751c73675e\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.handtextai.com#website\",\"name\":\"HandTextAI\",\"url\":\"https://docs.handtextai.com\",\"publisher\":{\"@id\":\"https://docs.handtextai.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.handtextai.com/api-reference/endpoints/generate-handwritten-text#webpage\",\"url\":\"https://docs.handtextai.com/api-reference/endpoints/generate-handwritten-text\",\"name\":\"Generate Handwritten Text\",\"description\":\"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: - Automatic font sizing with font_size: \\\"auto\\\" - Multiple page sizes (see documentation for pixel dimensions) - Natural handwriting effects - Transparent background for PNG overlay - PDF prepress boxes (MediaBox/TrimBox/BleedBox/CropBox) for print workflows - PDF/X-1a output for strict preflight systems (use pdf.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, eu - bleed_mm: override bleed in mm (optional) - crop_box: media (default), bleed, trim (standard PDF only) Generation Types: - standard (default): For cards, letters, and general text - address: For envelope addresses with specific constraints (see below) Address Generation Constraints: When using generation_type: \\\"address\\\", the following limitations apply: - Maximum 5 lines - Text cannot exceed 5 lines (separated by \\\\n) - Maximum 250 characters - Total character limit including line breaks - Manual font sizing required - font_size: \\\"auto\\\" is not supported; you must specify a font size between 12-400 pixels Text Formatting: - Use \\\\n for line breaks - Use \\\\n\\\\n for paragraph spacing\",\"dateModified\":\"2026-01-07T17:57:42.895Z\",\"isPartOf\":{\"@id\":\"https://docs.handtextai.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.handtextai.com/api-reference/endpoints/generate-handwritten-text#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.handtextai.com/api-reference/endpoints/generate-handwritten-text#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"HandTextAI\",\"item\":\"https://docs.handtextai.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generate Handwritten Text\",\"item\":\"https://docs.handtextai.com/api-reference/endpoints/generate-handwritten-text\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.handtextai.com/api-reference/endpoints/generate-handwritten-text#apireference\",\"headline\":\"Generate Handwritten Text\",\"name\":\"Generate Handwritten Text\",\"description\":\"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: - Automatic font sizing with font_size: \\\"auto\\\" - Multiple page sizes (see documentation for pixel dimensions) - Natural handwriting effects - Transparent background for PNG overlay - PDF prepress boxes (MediaBox/TrimBox/BleedBox/CropBox) for print workflows - PDF/X-1a output for strict preflight systems (use pdf.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, eu - bleed_mm: override bleed in mm (optional) - crop_box: media (default), bleed, trim (standard PDF only) Generation Types: - standard (default): For cards, letters, and general text - address: For envelope addresses with specific constraints (see below) Address Generation Constraints: When using generation_type: \\\"address\\\", the following limitations apply: - Maximum 5 lines - Text cannot exceed 5 lines (separated by \\\\n) - Maximum 250 characters - Total character limit including line breaks - Manual font sizing required - font_size: \\\"auto\\\" is not supported; you must specify a font size between 12-400 pixels Text Formatting: - Use \\\\n for line breaks - Use \\\\n\\\\n for paragraph spacing\",\"url\":\"https://docs.handtextai.com/api-reference/endpoints/generate-handwritten-text\",\"mainEntityOfPage\":{\"@id\":\"https://docs.handtextai.com/api-reference/endpoints/generate-handwritten-text#webpage\"},\"dateModified\":\"2026-01-07T17:57:42.895Z\",\"publisher\":{\"@id\":\"https://docs.handtextai.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.handtextai.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"HandTextAI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"HandTextAI","nav":{"global":null,"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"Endpoints","pages":[{"title":"Generate Handwritten Text","deprecated":null,"version":null,"openapi":"https://api.handtextai.com/openapi.json post /api/v1/generate","href":"/api-reference/endpoints/generate-handwritten-text"},{"title":"Generate Watermarked Preview","description":"Generate a watermarked preview at 1200px width.\n\n**Note:** Preview always returns PNG. `output_format` must be `\"png\"` (use `/generate` for PDF).\n\n**Perfect for:**\n- Testing parameters before final generation\n- Previewing text layout and font appearance\n- Validating automatic font sizing\n\nThe preview is free, includes a watermark, and is scaled to 1200px width\nwhile maintaining aspect ratio.\n\n**Generation Types:**\n- `standard` (default): For cards, letters, and general text\n- `address`: For envelope addresses with specific constraints (see below)\n\n**Address Generation Constraints:**\nWhen using `generation_type: \"address\"`, the following limitations apply:\n- **Maximum 5 lines** - Text cannot exceed 5 lines (separated by `\\n`)\n- **Maximum 250 characters** - Total character limit including line breaks\n- **Manual font sizing required** - `font_size: \"auto\"` is not supported; you must specify a font size between 12-400 pixels\n\n**Text Formatting:**\n- Use `\\n` for line breaks\n- Use `\\n\\n` for paragraph spacing","deprecated":null,"version":null,"openapi":"https://api.handtextai.com/openapi.json post /api/v1/preview","href":"/api-reference/endpoints/generate-watermarked-preview"},{"title":"List Available Fonts","deprecated":null,"version":null,"openapi":"https://api.handtextai.com/openapi.json get /api/v1/fonts","href":"/api-reference/endpoints/list-available-fonts"},{"title":"API Health Check","deprecated":null,"version":null,"openapi":"https://api.handtextai.com/openapi.json get /api/v1/status","href":"/api-reference/endpoints/api-health-check"}]}]}]},"title":"Generate Handwritten Text - HandTextAI","buildId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","deploymentId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DmVyH30O.js","utils-BHQqGGOd.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-CD-E4BIt.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bp5Lq9Ds.js","snippetPresets-C4xAVCFP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CgXVLxUC.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BF8I5oUf.js","shallow-Byd0lWnC.js","getApiPlaygroundDisplay-BGOZG1OK.js","CodeSnippet-CpvQL0CY.js","CodeSnippets-B8wkBKXa.js","Page-CBCH2P7b.js","getPastedJson-Ry3scI3Y.js","icon-D7a9HcdD.js","MethodPill-CJ8pmHhz.js","DuplicateIcon-rh1HJF0t.js","createIcon-DvGznqYs.js","DynamicMarkdown-Cc6AuSHS.js","SectionHeading-B4A0S-ep.js","axios-vUo_bRtp.js","Markdown-Cc16CX65.js","clsx-Cs6nMGht.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-zbf22OZA.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-C_fs-y5n.js"]}