Recipients
PNG API
Render Scribeless handwriting text as a PNG.
Render handwritten text as a PNG image.
POST https://platform.scribeless.co/api/generate/png
This endpoint requires API-key authentication, the generate API enabled for your account, and an active Scribeless subscription. Preview and final renders are tracked as subscription usage.
Headers
Content-Type: application/json
X-API-Key: YOUR_API_KEY
Query parameters
| Parameter | Required | Description |
|---|---|---|
preview | No | Use true to generate a preview render. Defaults to false. |
Request body
| Field | Type | Description |
|---|---|---|
content | string | Required. Handwritten content. May include simple HTML such as paragraphs and line breaks. |
width | string | Optional. Output width with unit, for example 152mm. Defaults to 100mm. |
height | string | Optional. Output height with unit, for example 102mm. Defaults to 100mm. |
fontFamily | string | Optional. Handwriting style. Defaults to Stafford. |
fontSize | string | Optional. Font size with unit, for example 15pt. When autoResize is enabled, this is the maximum font size. |
color | string | Optional. black, blue, or darkBlue. |
padding | string | Optional. Padding with unit. Defaults to 1mm. |
textAlign | string | Optional. left, center, or right. |
verticalAlign | string | Optional. top, center, or bottom. |
backgroundColor | string | Optional. CSS background color. Defaults to transparent. |
autoResize | boolean | Optional. Defaults to false. When true, the renderer reduces the font size so the handwriting fits within the fixed width and height. |
width and height must be explicit dimensions such as 152mm, 6in, 500px, or 15pt; they do not accept auto. Use autoResize when you need variable-length content to fit a fixed output size.
Handwriting styles
Use one of these case-sensitive fontFamily values:
| Style |
|---|
Arthur |
Carpenter |
Foster |
George |
Grogan |
Knowles |
Nightingale |
Robinson |
Singh |
Stafford |
If you omit fontFamily, Scribeless uses Stafford.
Example request
curl --request POST 'https://platform.scribeless.co/api/generate/png?preview=true' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: YOUR_API_KEY' \
--data '{
"content": "<p>Hello from Scribeless</p>",
"width": "152mm",
"height": "102mm",
"fontFamily": "Stafford",
"fontSize": "15pt",
"color": "darkBlue",
"textAlign": "left",
"verticalAlign": "top",
"backgroundColor": "transparent",
"autoResize": true
}' \
--output handwriting.png
Response
The response is an image/png binary.
Content-Type: image/png
Notes
- Use
preview=truewhile validating size, colour, style, and line breaks. - Enable
autoResizefor variable-length content, such as AI-generated notes, that must fit a fixed image size. - Store the returned PNG if you need to reuse it. Do not re-render the same text unnecessarily.
- For campaign recipient creation, use
POST /api/recipientsinstead. This endpoint only renders a handwriting image.
Errors
| Status | Meaning |
|---|---|
400 | Invalid request body, including invalid dimensions or unsupported enum values. |
401 | Missing, malformed, revoked, or invalid API key. |
500 | No active subscription was found or rendering failed. Contact support if this persists. |