{"openapi":"3.1.0","info":{"title":"InkHand API","version":"1.0.0","description":"Real handwriting from text. Our model draws every letter as pen strokes, in 1,743 hands, so no two letters are the same.\n\n## Quick start\n\n1. [Create a test key](https://inkhand.app/dashboard/api-keys). It's free; output is watermarked.\n2. Write your first page, a PDF on ruled paper:\n\n```bash\ncurl https://api.inkhand.app/v1/documents \\\n  -H \"Authorization: Bearer ink_test_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"Hello from InkHand\", \"paper\": \"college\"}' \\\n  -o hello.pdf\n```\n\n3. Switch to a live key when you're ready.\n\n## Two ways to write\n\n| Endpoint | You get | Billed |\n|---|---|---|\n| `POST /v1/documents` | Finished pages: PDF, PNG or SVG on paper, like the editor | Per page returned |\n| `POST /v1/handwriting` | One SVG strip or raw pen strokes, for plotters and custom layouts | Per 150 words |\n\n## llms.txt\n\nUsing an AI assistant? Point it at [`https://api.inkhand.app/llms.txt`](https://api.inkhand.app/llms.txt): this whole reference as one\nMarkdown file.\n\n## Keys\n\n| Key | Output | Billing |\n|---|---|---|\n| `ink_test_...` | Watermarked | Free, 50 pages a month |\n| `ink_live_...` | Clean | Your plan's pages, then top-ups |\n\nSend it as `Authorization: Bearer <key>`. Keep keys on your server, never in browser or app code.\n\n## Pages\n\n- Documents: 1 page = 1 page returned.\n- Handwriting: 1 page = up to 150 words. 151–300 words = 2 pages.\n- Failed requests are free.\n- Plan pages are used first, then [top-up pages](https://inkhand.app/dashboard/billing), which never expire.\n- `GET /v1/usage` shows what's left.\n\n## Limits\n\n| Key | Requests/min | At once | Words/request | Pages/month |\n|---|---|---|---|---|\n| API plan | 120 | 4 | 5,000 | 2,000 |\n| Pay as you go | 60 | 2 | 5,000 | top-up balance |\n| Test | 10 | 1 | 300 | 50 |\n\nOver the limit: `429` with `Retry-After`. Out of pages: `402`. Every response has `RateLimit` headers.\n\n## Retries\n\nSend an `Idempotency-Key` (e.g. a UUID) with each `POST`. Retrying with the same key within 24 hours returns\nthe first response and isn't billed again.\n\n## Errors\n\n[Problem details](https://www.rfc-editor.org/rfc/rfc9457) with a stable `code` and a `request_id`. Quote the\n`request_id` when you [contact us](https://inkhand.app/contact).\n\n## Versioning\n\n`/v1` only grows: new fields and endpoints. Breaking changes get `/v2` and at least 6 months' notice.","contact":{"name":"InkHand","url":"https://inkhand.app"},"x-scalar-links":[{"name":"llms.txt","url":"https://api.inkhand.app/llms.txt"},{"name":"OpenAPI spec","url":"https://api.inkhand.app/openapi.json"}]},"servers":[{"url":"https://api.inkhand.app"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Documents","description":"Finished pages on paper, as PDF, PNG or SVG: the same as the /write editor."},{"name":"Handwriting","description":"Turn text into an SVG or raw pen strokes."},{"name":"Hands","description":"The handwriting styles you can write in."},{"name":"Account","description":"Pages used and left, and your limits."}],"paths":{"/v1/documents":{"post":{"tags":["Documents"],"operationId":"createDocument","summary":"Write a document","description":"Writes the text on paper and returns finished pages, exactly as the editor makes them: the same papers, page sizes, margins and pen settings.\n\nReturns the file itself (`application/pdf`, `image/png`, `image/svg+xml`, or `application/zip` for several PNG/SVG pages). Send `Accept: application/json` to get it base64-encoded in JSON instead.\n\n**Billed per page returned** (not per word). Test keys add a watermark.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key for safe retries (kept 24 hours).","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequest"}}}},"responses":{"200":{"description":"The document.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"X-Pages":{"description":"Pages in the document.","schema":{"type":"integer"}},"X-Pages-Billed":{"description":"Pages returned and billed.","schema":{"type":"integer"}}},"content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/svg+xml":{"schema":{"type":"string"}},"application/zip":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"Invalid JSON or fields, or `pages` names no page (`invalid_request`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, malformed, revoked or expired API key (`missing_api_key`, `invalid_api_key`, `api_key_revoked`, `api_key_expired`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough pages for this document (`quota_exceeded`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown hand (`unknown_hand`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A request with this `Idempotency-Key` is still running (`idempotency_in_progress`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Too many words for one request (`payload_too_large`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`Idempotency-Key` reused with a different request (`idempotency_mismatch`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate or concurrency limit reached (`rate_limited`, `concurrency_limited`). Wait `Retry-After` seconds.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected error (`internal_error`). Safe to retry with the same `Idempotency-Key`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Busy or temporarily unavailable (`renderer_busy`, `renderer_unavailable`). Retry after `Retry-After` seconds.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/handwriting":{"post":{"tags":["Handwriting"],"operationId":"createHandwriting","summary":"Write text by hand","description":"Writes the text in the chosen hand and returns an SVG or raw pen strokes. Send `Accept: image/svg+xml` with `format: \"svg\"` to get the SVG file itself instead of JSON.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key for safe retries (kept 24 hours).","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandwritingRequest"}}}},"responses":{"200":{"description":"The handwriting.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"Idempotent-Replayed":{"description":"`true` when this is a stored response to an earlier request with the same key.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Handwriting"}},"image/svg+xml":{"schema":{"type":"string"}}}},"400":{"description":"Invalid JSON or fields (`invalid_request`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing, malformed, revoked or expired API key (`missing_api_key`, `invalid_api_key`, `api_key_revoked`, `api_key_expired`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough pages: the monthly allowance and top-up pages don't cover this request (`quota_exceeded`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown hand (`unknown_hand`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A request with this `Idempotency-Key` is still running (`idempotency_in_progress`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Too many words for one request (`payload_too_large`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`Idempotency-Key` reused with a different request (`idempotency_mismatch`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate or concurrency limit reached (`rate_limited`, `concurrency_limited`). Wait `Retry-After` seconds.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected error (`internal_error`). Safe to retry with the same `Idempotency-Key`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Busy or temporarily unavailable (`renderer_busy`, `renderer_unavailable`). Retry after `Retry-After` seconds.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/hands":{"get":{"tags":["Hands"],"operationId":"listHands","summary":"List hands","description":"The curated hands, with names, styles and a preview image. Add `?all=true` to also list every other renderer id (unnamed, no preview).","parameters":[{"name":"all","in":"query","required":false,"description":"`true` to include all 1,743 renderer ids.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"The hands you can write in.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandList"}}}},"401":{"description":"Missing, malformed, revoked or expired API key (`missing_api_key`, `invalid_api_key`, `api_key_revoked`, `api_key_expired`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate or concurrency limit reached (`rate_limited`, `concurrency_limited`). Wait `Retry-After` seconds.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected error (`internal_error`). Safe to retry with the same `Idempotency-Key`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/usage":{"get":{"tags":["Account"],"operationId":"getUsage","summary":"Usage this period","description":"Pages used and left for the key's mode (live or test), and the limits that apply.","responses":{"200":{"description":"Usage and limits.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"401":{"description":"Missing, malformed, revoked or expired API key (`missing_api_key`, `invalid_api_key`, `api_key_revoked`, `api_key_expired`).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate or concurrency limit reached (`rate_limited`, `concurrency_limited`). Wait `Retry-After` seconds.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected error (`internal_error`). Safe to retry with the same `Idempotency-Key`.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API key: `ink_live_...` or `ink_test_...`."}},"headers":{"RequestId":{"description":"Unique id of this request; quote it to support.","schema":{"type":"string"}},"RateLimitPolicy":{"description":"The limits that apply, e.g. `\"minute\";q=120;w=60`.","schema":{"type":"string"}},"RateLimit":{"description":"What is left, e.g. `\"minute\";r=119;t=1` (remaining requests, seconds until full).","schema":{"type":"string"}}},"schemas":{"DocumentRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":50000,"description":"The text to write. Newlines start new lines; blank lines leave a gap. Long text continues on new pages.","example":"Dear Anna,\n\nThank you so much for the flowers!\n\nLove, Sam"},"markdown":{"default":false,"description":"Read `text` as markdown, as the /write editor writes it: `**bold**` (a heavier pen), `*italic*` (leans further), `~~strikethrough~~`, `++underline++` and `==highlight==` (all drawn by hand), `[text]{red}` or `[text]{#c0392b}` (ink colour), `[text]{mark=green}` (highlighter colour: yellow, green, pink, blue, orange), `# Heading` to `### Heading` (larger writing), tables (rows start with `|`, cells between `|`; the `|---|---|` row under the header is optional; each row goes on one line of the paper, lines drawn by hand, the table shrunk to fit between the margins). Styles cover whole words. `\\*` writes a literal marker. Off: the text is written exactly as given.","type":"boolean"},"mistakes":{"default":0,"description":"Crossed-out mistakes, 0-1: now and then a word is started wrong or misspelt, struck through, and written again (1: about one word in twenty; only longer lowercase words). Where they fall depends on `seed`.","type":"number","minimum":0,"maximum":1},"hand":{"default":"br_119","description":"Hand id. `GET /v1/hands` lists them.","example":"br_119","type":"string","minLength":1,"maxLength":64},"format":{"default":"pdf","description":"`pdf`: one file with every page, at the real page size. `png` / `svg`: one file per page; several pages come as a ZIP.","type":"string","enum":["pdf","png","svg"]},"page_size":{"default":"a4","type":"string","enum":["a4","letter","a5","legal"]},"paper":{"default":"wide","description":"`plain`, `college` ruled, `wide` ruled, `legal` pad (yellow), `squared` (5 mm grid), `dotted` (dot grid), `lineatur27` (German, 9 mm lined, margins both sides), `lineatur28` (German, 5 mm squared, margins both sides), `seyes` (French Seyès, 8 mm with 2 mm fine rules), `russian-grid` (5 mm grid, margin on the right) or `indian-ruled` (8 mm lined, red margin and top line).","type":"string","enum":["plain","college","wide","legal","squared","dotted","lineatur27","lineatur28","seyes","russian-grid","indian-ruled"]},"size_mm":{"description":"Height of tall letters, in mm. Left out: a size that fits the paper's lines (about 0.6 of a line; 5 on plain and wide ruled, 4.5 on college and legal ruled, 6 on squared and dotted).","type":"number","minimum":2,"maximum":15},"line_spacing_mm":{"default":9,"description":"Distance between lines on plain paper, or when `on_lines` is false, in mm.","type":"number","minimum":3,"maximum":30},"on_lines":{"default":true,"description":"Ruled and squared paper: sit every line of writing on a printed rule.","type":"boolean"},"word_spacing":{"default":1,"description":"Multiplies the gap between words.","type":"number","minimum":0.25,"maximum":3},"margins_mm":{"description":"Page margins in mm. Each one you leave out uses the paper's own margin.","type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":100},"right":{"type":"number","minimum":0,"maximum":100},"bottom":{"type":"number","minimum":0,"maximum":100},"left":{"type":"number","minimum":0,"maximum":100}},"additionalProperties":false},"natural":{"default":true,"description":"Small random shifts of lines and words, as a real hand makes.","type":"boolean"},"variation":{"default":0,"description":"0 writes the steadiest version of the hand; higher values vary the letters more.","type":"number","minimum":0,"maximum":1.5},"seed":{"description":"Same seed and settings, same pages. Change it for another take.","type":"integer","minimum":0,"maximum":4294967296},"ink_color":{"default":"#1f3fa6","description":"Ink colour as `#rrggbb`.","example":"#1f3fa6","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"pen_width":{"default":1,"description":"Multiplies the pen's line width (1 = a fine pen).","type":"number","minimum":0.25,"maximum":3},"pen":{"default":"ballpoint","description":"The pen the ink comes from; shapes `ink_texture`. `ballpoint`: grainy, uneven ink that darkens on turns, with now and then a blob or a skip. `gel`: smooth, dark ink. `fountain`: wet ink, lighter strokes that pool at the ends and turns, soft edges.","type":"string","enum":["ballpoint","gel","fountain"]},"ink_texture":{"default":0,"description":"Ink imperfections, 0 (flat ink, the default) to 1: crossings darken, ink pools where the pen slows, the paper's grain shows in the ink, and the pen's own quirks (see `pen`).","type":"number","minimum":0,"maximum":1},"ink_flow":{"default":0,"description":"Pen pressure, 0 (an even line, the default) to 1: ink pools where the pen lands, the line thins as it lifts off and on fast strokes.","type":"number","minimum":0,"maximum":1},"slant":{"default":0,"description":"Lean of the writing in degrees: positive leans forward, negative back.","type":"number","minimum":-15,"maximum":15},"movement":{"description":"With `natural`: how much each kind of movement varies, 0 to 1 (0.5 when left out).","type":"object","properties":{"words":{"description":"Words' height and the gaps between them.","type":"number","minimum":0,"maximum":1},"lines":{"description":"Where each line starts, and its slope.","type":"number","minimum":0,"maximum":1},"spacing":{"description":"How far each line sits from its rule.","type":"number","minimum":0,"maximum":1}},"additionalProperties":false},"paper_texture":{"default":0,"description":"A scanned paper texture over the page, 0 (none, the default) to 1. PNG, SVG and PDF; not with `transparent`.","type":"number","minimum":0,"maximum":1},"paper_grain":{"default":"recycled","description":"Which paper's texture: `recycled` (fine grain, a few fibres), `smooth` (heavy paper) or `cold-press` (watercolour paper).","type":"string","enum":["recycled","smooth","cold-press"]},"shading":{"default":false,"description":"Light falls off towards the edges, like a photo of the page.","type":"boolean"},"soft_focus":{"default":false,"description":"Slightly out of focus, like a phone photo. PNG and SVG; PDFs keep sharp ink for printing.","type":"boolean"},"quality":{"default":"standard","description":"PNG only: `standard` 150 dpi, `hd` 300 dpi.","type":"string","enum":["standard","hd"]},"transparent":{"default":false,"description":"PNG only: leave the paper out, ink on a transparent background.","type":"boolean"},"pages":{"description":"Page numbers to return, from 1. All pages when left out.","maxItems":500,"type":"array","items":{"type":"integer","minimum":1,"maximum":9007199254740991}}},"required":["text"],"additionalProperties":false},"Document":{"type":"object","properties":{"id":{"type":"string","example":"doc_3kd9x0aQ1b2C3d4E"},"object":{"type":"string","enum":["document"]},"created":{"type":"number","description":"Unix time in seconds.","example":1795680145},"livemode":{"type":"boolean","description":"false for test keys: pages are watermarked and not billed."},"format":{"type":"string","enum":["pdf","png","svg"]},"pages":{"type":"number","description":"Pages in the document.","example":2},"billed_pages":{"type":"number","description":"Pages returned and billed.","example":2},"unwritable":{"type":"array","items":{"type":"string"},"description":"Characters in `text` that no hand can write yet, each once; they are written as `?`. The hands write Latin letters (accents included), numbers and common punctuation. Binary responses send the same as the `X-Unwritable-Characters` header, as code points (`U+00B0 U+0416`).","example":[]},"filename":{"type":"string","example":"handwriting.pdf"},"content_type":{"type":"string","example":"application/pdf"},"data":{"type":"string","description":"The file, base64-encoded."}},"required":["id","object","created","livemode","format","pages","billed_pages","unwritable","filename","content_type","data"],"additionalProperties":false},"HandwritingRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":50000,"description":"The text to write. Newlines start new lines; blank lines start paragraphs.","example":"Dear Anna,\nThank you so much for the flowers!\nLove, Sam"},"hand":{"default":"br_119","description":"Hand id. `GET /v1/hands` lists the curated hands with names and previews; any of the 1,743 ids from `GET /v1/hands?all=true` works too.","example":"br_119","type":"string","minLength":1,"maxLength":64},"format":{"default":"svg","description":"`svg`: a finished SVG image. `strokes`: raw pen strokes per word, for plotters and custom rendering.","type":"string","enum":["svg","strokes"]},"ink_color":{"description":"Ink colour as `#rrggbb`. Default: the hand's own ink.","example":"#1a237e","type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"variation":{"default":0,"description":"0 writes the steadiest version of the hand; higher values vary the letters more.","type":"number","minimum":0,"maximum":1.5},"seed":{"description":"With `variation` > 0, the same seed gives the same result.","type":"integer","minimum":0,"maximum":4294967296},"line_width":{"default":8,"description":"Line length in the model's units (8 fits a card, 14 a page).","type":"number","minimum":2,"maximum":20},"pen":{"default":"ballpoint","description":"`svg` only: the pen the ink comes from; shapes `ink_texture` (see `POST /v1/documents`).","type":"string","enum":["ballpoint","gel","fountain"]},"ink_texture":{"default":0,"description":"`svg` only: ink imperfections, 0 (flat ink, the default) to 1: crossings darken, ink pools where the pen slows, the pen's own quirks.","type":"number","minimum":0,"maximum":1},"ink_flow":{"default":0,"description":"`svg` only: pen pressure, 0 (an even line, the default) to 1: heavier where the pen lands, thinner as it lifts off.","type":"number","minimum":0,"maximum":1},"soft_focus":{"default":false,"description":"`svg` only: slightly out of focus, like a phone photo.","type":"boolean"}},"required":["text"],"additionalProperties":false},"Handwriting":{"type":"object","properties":{"id":{"type":"string","example":"hw_3kd9x0aQ1b2C3d4E"},"object":{"type":"string","enum":["handwriting"]},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix time in seconds.","example":1795680145},"livemode":{"type":"boolean","description":"false for test keys: output is watermarked and not billed."},"hand":{"type":"string","example":"br_119"},"format":{"type":"string","enum":["svg","strokes"]},"words":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"example":12},"pages":{"type":"number","description":"Pages billed for this request (1 page = up to 150 words).","example":1},"unwritable":{"type":"array","items":{"type":"string"},"description":"Characters in `text` that no hand can write yet, each once; they are written as `?`. The hands write Latin letters (accents included), numbers and common punctuation. Binary responses send the same as the `X-Unwritable-Characters` header, as code points (`U+00B0 U+0416`).","example":[]},"svg":{"description":"Present when `format` is `svg`.","example":"<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 829 160\">…</svg>","type":"string"},"strokes":{"description":"Present when `format` is `strokes`: words → strokes → points.","type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"number"},{"type":"number"}]},"minItems":2,"maxItems":2,"description":"[x, y]","example":[0.012,-0.034]}}}}},"required":["id","object","created","livemode","hand","format","words","pages","unwritable"],"additionalProperties":false},"HandList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"br_119"},"object":{"type":"string","enum":["hand"]},"name":{"nullable":true,"description":"Display name of a curated hand; null for the other renderer ids.","example":"Leo","type":"string"},"style":{"nullable":true,"example":"cursive","type":"string","enum":["print","slanted","cursive"]},"tags":{"type":"array","items":{"type":"string","enum":["neat","large","small","wide","narrow","back-slanted"]},"example":["neat"]},"description":{"nullable":true,"example":"Neat cursive","type":"string"},"recommended":{"type":"boolean","description":"One of the clearest hands, a good first choice.","example":true},"preview_url":{"nullable":true,"description":"An SVG sample of the hand.","example":"https://inkhand.app/hands/br_119.svg","type":"string"}},"required":["id","object","name","style","tags","description","recommended","preview_url"],"additionalProperties":false}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"],"additionalProperties":false},"Usage":{"type":"object","properties":{"object":{"type":"string","enum":["usage"]},"livemode":{"type":"boolean"},"plan":{"type":"string","enum":["free","pro","api"]},"period":{"type":"object","properties":{"start":{"type":"string","description":"ISO 8601","example":"2026-11-01T00:00:00.000Z"},"end":{"type":"string","description":"ISO 8601","example":"2026-12-01T00:00:00.000Z"}},"required":["start","end"],"additionalProperties":false},"pages":{"type":"object","properties":{"used":{"type":"number","example":120},"included":{"type":"number","example":2000},"remaining":{"type":"number","example":1880}},"required":["used","included","remaining"],"additionalProperties":false,"description":"The plan's monthly allowance."},"credits":{"type":"object","properties":{"pages":{"type":"number","example":500}},"required":["pages"],"additionalProperties":false,"description":"Top-up pages on the account. They never expire; live keys use them after the monthly allowance, test keys never do."},"limits":{"type":"object","properties":{"requests_per_minute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"example":120},"concurrency":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"example":4},"words_per_request":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"example":5000},"pages_per_period":{"type":"number","example":2000}},"required":["requests_per_minute","concurrency","words_per_request","pages_per_period"],"additionalProperties":false}},"required":["object","livemode","plan","period","pages","credits","limits"],"additionalProperties":false},"Problem":{"type":"object","properties":{"type":{"type":"string","example":"https://inkhand.app/docs/api/errors#rate_limited"},"title":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"example":429},"code":{"type":"string","example":"rate_limited"},"detail":{"type":"string"},"request_id":{"type":"string","example":"req_8f2kQ0xZ1yW3vU5t"},"errors":{"description":"Validation errors, for `invalid_request`.","type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","status","code","request_id"],"additionalProperties":false}}}}