CursiveGen API

Client-side convert() concepts today. Planned hosted JSON API: /api/v1/convert.

Status: Spec only — REST endpoints are not live

Client-side convert()

CursiveGen’s Unicode engine maps each character through style tables (Script, Bold Script, Fraktur, effects, and more — 49 styles total). In the Astro app this is import { convert } from '../lib/fontEngine.js'.

import { convert } from '@cursivegen/font-engine'; // planned package name

const bio = convert('Hello Instagram', 'boldscript');
// → 𝓗𝓮𝓵𝓵𝓸 𝓘𝓷𝓼𝓽𝓪𝓰𝓻𝓪𝓶

navigator.clipboard.writeText(bio);

Common style IDs

Future REST: POST /api/v1/convert

Intended contract for a hosted JSON API (authentication, rate limits, and SLA TBD).

Request

{
  "text": "string (required, max 2000 chars planned)",
  "style": "boldscript | script | … (required)",
  "options": {
    "preserveWhitespace": true
  }
}

Success response (200)

{
  "ok": true,
  "text": "Hello Instagram",
  "style": "boldscript",
  "result": "𝓗𝓮𝓵𝓵𝓸 𝓘𝓷𝓼𝓽𝓪𝓰𝓻𝓪𝓶",
  "meta": { "engine": "fontEngine", "version": "1" }
}

Error response (4xx)

{
  "ok": false,
  "error": {
    "code": "UNKNOWN_STYLE",
    "message": "Style not found"
  }
}

fetch() example (future)

// FUTURE — not live yet
const res = await fetch('https://cursivegen.com/api/v1/convert', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
  body: JSON.stringify({
    text: 'Hello Instagram',
    style: 'boldscript',
  }),
});

const data = await res.json();
// { "ok": true, "text": "Hello Instagram", "style": "boldscript", "result": "𝓗𝓮𝓵𝓵𝓸…" }

curl example (future)

curl -X POST https://cursivegen.com/api/v1/convert \
  -H 'Content-Type: application/json' \
  -d '{"text":"CursiveGen","style":"script"}'

Embedding today

Until the npm package and REST API ship, integrate by linking users to the Unicode Font Generator or reusing the open character maps from the Unicode cheat sheet. Chrome extension scaffold lives in the repo under extension/.

Questions for partners: Contact · Press kit: Press

API FAQ

Is there a public REST API today?

Not yet. Conversion runs client-side via convert() in fontEngine. The JSON endpoints below are a published future specification so integrators can plan against a stable contract.

Can I embed convert() in my site now?

Yes conceptually: copy the mapping approach or call convert(text, style) from the same engine patterns documented here. A packaged npm module is planned; until then, use the browser tool or mirror the Bold Script map.