Deepscribble API
Handwriting API
Send text and the lines it belongs on. Get back realistic handwriting as SVG, placed exactly where you asked.
{
"text": "Dear Sam,\nThank you for the flowers. They made my whole week!",
"regions": [
{
"x": 40,
"y": 84,
"width": 520,
"height": 44
},
{
"x": 40,
"y": 148,
"width": 520,
"height": 44
},
{
"x": 40,
"y": 212,
"width": 520,
"height": 44
}
]
}svgQuickstart
- Get a key. Create one in the developer console. New accounts start with ₹2 of credit.
- Write your first lines. Each region is one line: where it starts, how wide it runs, and how tall the writing is. Text flows from region to region in order.
Request
curl https://www.deepscribble.com/api/v1/handwriting \
-H "Authorization: Bearer $DEEPSCRIBBLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Dear Sam,\nThank you for the flowers. They made my whole week!",
"regions": [
{
"x": 40,
"y": 84,
"width": 520,
"height": 44
},
{
"x": 40,
"y": 148,
"width": 520,
"height": 44
},
{
"x": 40,
"y": 212,
"width": 520,
"height": 44
}
]
}'Response
{
"id": "req_67f48ae3e0b9453ab634e486f6ca485e",
"object": "handwriting",
"created": 1796481762,
"style": "9d914b41-0358-49eb-9e2c-bfdb06163b60",
"width": 560,
"height": 214,
"lines": [
{
"region": 0,
"text": "Dear Sam,",
"bbox": [47.663, 56.069, 112.795, 32.584]
},
{
"region": 1,
"text": "Thank you for the flowers. They made my",
"bbox": [47.494, 116.854, 463.002, 48.963]
},
{
"region": 2,
"text": "whole week!",
"bbox": [47.494, 184.54, 124.119, 28.817]
}
],
"regions_used": 3,
"remaining_text": "",
"done": true,
"substitutions": [],
"usage": { "characters": 59, "cost": "0.118", "currency": "INR" },
"balance": { "amount": "1.882", "currency": "INR" },
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 560 214\" width=\"560\" height=\"214\">…</svg>"
}- Place the result. The
svguses the same coordinates as your regions, so it lays straight over your page. Text that didn't fit comes back asremaining_text; send it with your next regions.
The basics
- Coordinates are yours. Send pixels, points or millimetres and get the same units back.
- Choose from 80 handwriting styles, any ink colour, and glitter, foil or holo finishes.
- You pay per character written, from a prepaid balance.
Write in your own name and share generated pages as generated. Our Terms cover the details.
NextWrite handwriting