Every capability of the LAKA design library — systems, rules, tokens, WCAG contrast, pattern selection, release gates, site audits, artifact rendering and delivery — is a documented REST endpoint. The reference below is rendered live from the API's own OpenAPI document, so it cannot drift from behaviour.
Checking API status…
# Read endpoints are public — no key needed. curl https://api.designsystem.bowtiekreative.com/v1/systems curl "https://api.designsystem.bowtiekreative.com/v1/contrast?foreground=accent&font_size_px=16" # Machine-readable index of every endpoint: curl https://api.designsystem.bowtiekreative.com/v1 curl https://api.designsystem.bowtiekreative.com/v1/openapi.json
# Audit, render and delivery endpoints are metered, # so they require a bearer token: curl -X POST https://api.designsystem.bowtiekreative.com/v1/audit/site \ -H "Authorization: Bearer $LAKA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com"}'
Read endpoints (library, tokens, rules, contrast, graph, patterns, gates, templates) are public. Endpoints marked KEY below — audits, rendering, delivery — need Authorization: Bearer <key>. Keys are issued by Bow Tie Kreative; the MarkupGo / Emailit / Publer credentials always stay server-side.
JSON in, JSON out, UTF-8, CORS open. GET parameters go in the query string (arrays comma-separated: systems=forms,funnel). POST bodies are JSON; missing required fields return 400 with the schema. Colours accept hex, rgb[a](), or token names like accent. Errors are {"error": "…"} with a meaningful status: 400, 401, 404, 405, 410, 413.
The former MCP endpoint at mcp.designsystem.bowtiekreative.com/mcp has been retired and now answers 410 Gone with a pointer here. Every former tool maps 1-to-1 onto a REST endpoint — e.g. check_contrast → GET /v1/contrast, resolve_rules → GET /v1/rules, validate → POST /v1/validate, audit_site → POST /v1/audit/site. Agents can consume the OpenAPI document directly.
Rules tell an agent what; this layer teaches why. Machine-readable at GET /v1/principles, condensed for agents at /llms.txt. When no explicit rule covers a situation, the answer is derived from these principles — then proposed as a new rule through the evolve workflow.
Loading the knowledge layer…
Endpoints are just verbs; the sequence is the system. Pick your task below — each workflow is an ordered chain where every step says what it feeds the next. Machine-readable at GET /v1/workflows, so agents follow the same logic as humans. Precedence everywhere: accessibility > truthfulness > governance > brand expression > aesthetics.
Grouped by concern. Expand an endpoint for its parameters, request body and an example. Rendered from /v1/openapi.json at page load.
Loading the live endpoint reference…
If a page already embeds laka.js, the API client is available as LAKA.api — no hand-rolled fetch code:
// after <script src="https://designsystem.bowtiekreative.com/dist/laka.js" defer></script> const { ratio } = await LAKA.api.contrast({ foreground: 'accent', font_size_px: 16 }); const { rules } = await LAKA.api.rules({ systems: 'forms', severity: 'block' }); const nav = await LAKA.api.navContract(); // metered endpoints — set a key first LAKA.api.key = '…'; const audit = await LAKA.api.auditSite({ url: 'https://example.com' });
Contrast checks also run entirely offline via LAKA.contrast('accent', 'canvas', { fontSizePx: 16 }) — same math, no network.