API & MCP
Everything a person can do on Printable Flashcards (Double-sided PDF), a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://deckwrightprintcards.usefulweb.site/api/v1/calculate– run Printable Flashcards (Double-sided PDF)GET https://deckwrightprintcards.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Printable Flashcards (Double-sided PDF)
Lays out flashcards on card or label sheets (business-card size 90 × 54 mm, 99 × 68 mm, 70 × 37 mm and US Letter 4 × 2 in, among others): questions on the front pages, answers on the back pages mirrored for long-edge or short-edge duplex printing, cut lines, registration crosses and a card number on both sides. Text shrinks to fit (down to 6 pt). Also prints questions only, or question and answer side by side for folding. Vector PDF with embedded fonts for Latin, Greek, Cyrillic, Arabic, Devanagari, Chinese, Japanese and Korean.
| Field | Type | Default | Description |
|---|---|---|---|
text | textarea | "# Greetings\nhola ::: hello\nbuenos días ::: good morning\ngracias ::: thank yo | Cards. Markdown: “Q:” and “A:” lines, “term :: definition” (“:::” also makes the reverse card), {{c1::cloze}} gaps, # headings as tags. Or CSV/TSV rows (front, back, tag), an Anki plain-text export, or a slide deck. |
format | select (auto, markdown, csv, tsv, anki, deck) | "auto" | Format |
reverse | boolean | false | Also make reverse cards (answer → question) |
sheet | select (a4-2x5-90x54, a4-2x4-99x68, a4-3x8-70x37, a4-2x7-99x38, letter-2x5, letter-3x10) | "a4-2x5-90x54" | Card sheet |
sides | select (both, front, fold) | "both" | Sides |
flip | select (long, short) | "long" | Duplex flip edge |
cutLines | boolean | true | Cut lines around the cards |
sizePt | number | 14 | Largest text size |
lang | text | — | Card language (BCP 47, e.g. en, es, ja). Used for answer checks and fonts; empty = English. |
Example request
Spanish phrases, business-card size, double-sided
curl -X POST https://deckwrightprintcards.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"text":"# Greetings\nhola ::: hello\nbuenos días ::: good morning\ngracias ::: thank you\n\n# Getting around\nQ: How do you ask where the station is?\nA: ¿Dónde está la estación?\n\nla estación :: the station\nel billete :: the ticket\n\n# At the café\nun café con leche :: a coffee with milk\n\nQ: How do you ask for the bill?\nA: la cuenta, por favor\n\nMadrid's main station is {{c1::Atocha}}; the fast train to Barcelona takes about {{c2::two and a half::how long?}} hours.\n","lang":"es"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://deckwrightprintcards.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
deckwright_print_cards - Local stdio connector:
node src/mcp-stdio.ts --tool=deckwright-print-cards
{
"mcpServers": {
"deckwright-print-cards": { "type": "http", "url": "https://deckwrightprintcards.usefulweb.site/mcp" }
}
}