Documentation
API Reference
de-ASCII ships a public REST API. Public endpoints need no credentials. Protected endpoints accept Authorization: Bearer <PLATPHORM_API_KEY> or X-PlatPhorm-API-Key.
Endpoints
/api/deasciiReconstruct an image from ASCII art, preserving ANSI color or applying deterministic colorization. Returns a PNG data URL.
public/api/deascii/from-asciiCall ascii.platphormnews.com JSON or NDJSON stream conversion, then reconstruct the output.
public/api/deascii/statusPublic-safe renderer limits and AI enhancement readiness. Does not expose secret values.
public/api/charsetsList supported character sets and luminance ramps.
public/api/infoService metadata, version, and capabilities.
public/api/healthLiveness and uptime check.
public/api/network/statusLive public-safe root graph and MCP gateway integration status.
public/api/webhooksSubscribe to reconstruction events. Requires PLATPHORM_API_KEY.
protected/api/mcpModel Context Protocol JSON-RPC endpoint.
publicReconstruct an image
POST arbitrary ASCII, ANSI terminal art, Unicode Braille, block/quadrant/box-drawing art, or ASCII converter output to /api/deascii. The response contains a base64 PNG data URL plus dimensions, renderer metadata, and optional enhancement status.
curl -X POST https://deascii.platphormnews.com/api/deascii \
-H "Content-Type: application/json" \
-d '{
"ascii": " .:-=+*#%@\n@%#*+=-:. ",
"charset": "auto",
"cellSize": 10,
"cellAspect": 2,
"smoothing": 3,
"renderMode": "tonal",
"colorize": { "mode": "smart", "strength": 0.88 },
"contrast": 1.08,
"sharpen": 0.3,
"enhance": false
}'{
"ok": true,
"data": {
"image": "data:image/png;base64,iVBORw0KGgo...",
"width": 80,
"height": 16,
"meta": {
"rows": 2,
"cols": 10,
"charset": "standard",
"cellSize": 10,
"cellWidth": 10,
"cellHeight": 20,
"renderMode": "tonal",
"colored": true,
"sourceColored": false,
"colorized": true,
"colorizeMode": "smart",
"colorizeScene": "portrait"
},
"enhanced": false
}
}Round-trip from ASCII converter
Use /api/deascii/from-ascii to call the trusted sibling service. Choose transport: "json" for small color-preserving runs or transport: "stream" for large NDJSON chunked artifacts. Stream imports request opt-in compact rgb24-b64-v1 color chunks from ascii.platphormnews.com unless includeColorGrid is set false. The browser tool also accepts #asciiPayload handoffs from ASCII so compact text and chroma grids can open without a server write.
curl -X POST https://deascii.platphormnews.com/api/deascii/from-ascii \
-H "Content-Type: application/json" \
-d '{
"transport": "stream",
"asciiRequest": {
"image": "data:image/png;base64,...",
"outputColumns": 220,
"charset": "detailed",
"grayscale": false,
"colorPayload": "compact",
"colorGridEncoding": "compact",
"chunkLineCount": 64
},
"deascii": {
"cellSize": 10,
"cellAspect": 2,
"renderMode": "tonal"
}
}'Request parameters
| Field | Type | Default | Description |
|---|---|---|---|
| ascii | string | — | Required. Plain ASCII, ANSI terminal art, Unicode Braille/block/box art, or converter output to reconstruct. |
| charset | string | "auto" | standard | detailed | blocks | minimal | braille | auto |
| cellSize | number | 10 | Pixels rendered per character cell (1-32). |
| cellAspect | number | 2 | Height multiplier when cellHeight is not set. Use 2 for ASCII converter round-trips. |
| smoothing | number | 3 | Optimized edge-aware blur passes to soften output (0-6). |
| renderMode | string | "tonal" | tonal | hybrid | glyph. Glyph and hybrid modes use bitmap masks for Latin letters, digits, Braille dot cells, Unicode block/box glyphs, and common text marks. |
| colorize | object | {"mode":"smart","strength":0.88} | Optional deterministic color restoration for monochrome ASCII: none | smart | portrait | cool | warm | palette. |
| inverted | boolean | false | Set true for dark-on-light ASCII. |
| background | number | 0 | Luminance for empty cells (0-1). |
| contrast | number | 1.08 | Luminance contrast multiplier (0.25-2). |
| sharpen | number | 0.3 | Unsharp mask amount after smoothing (0-2). |
| autoWrap | boolean | false | Wrap very long single-line pasted ASCII. |
| autoFitOutput | boolean | true | Scale oversized requested output under the pixel and canvas guardrails instead of failing. |
| maxOutputPixels | number | 12,000,000 | Direct PNG allocation budget. Metadata reports requested and emitted dimensions. |
| maxOutputDimension | number | 32,767 | Per-axis browser/server output guardrail. |
| adaptiveQuality | boolean | true | Reduce expensive smoothing/sharpening on very large outputs. |
| colors | string[][] | — | Optional expanded hex color grid from ascii.platphormnews.com JSON output. |
| colorGrid | object | — | Optional compact rgb24-b64-v1 packed color grid from ASCII for smaller exact-color requests. |
| enhance | boolean | false | Run the AI restoration/enhancement pass against the current reconstruction. |
| enhancePrompt | string | — | Optional image-model instruction override. Keep it restoration-focused and text-preserving; do not ask for a new scene. |
Webhook events
reconstruction.startedreconstruction.completedreconstruction.failedhealth.degradedhealth.restoredFAQ
Why do the defaults favor tonal reconstruction now?
Tonal mode, source-aspect cells, edge-aware smoothing, and compact exact color grids produce the closest image match for ASCII generated by ascii.platphormnews.com. Hybrid and glyph modes remain available when character texture is the goal.
How does de-ASCII keep payloads smaller without losing color?
ASCII text stays line-preserving and compact. Exact source color can travel as rgb24-b64-v1 colorGrid data instead of expanded ANSI escape sequences or large hex row arrays.
How should I reconstruct small text, code, signs, or UI labels?
Use the Text preset in the browser or API settings close to hybrid/glyph mode, smoothing 0, higher contrast/sharpening, and larger cells. The deterministic renderer has bitmap masks for Latin letters, digits, and common text marks so literal ASCII text remains more legible.
Does AI enhancement regenerate the image?
No. AI enhancement is treated as image restoration against the deterministic de-ASCII output. Prompts tell the model to preserve composition and clarify existing visible text evidence without inventing new words, numbers, symbols, or labels.
Can this become a browser game asset pipeline?
Yes. The roadmap tracks streaming ASCII from trusted converters into browser games, then reconstructing it as level maps, textures, signs, sprites, and other game assets over the next 136 days.
Machine-readable resources
Need the MCP integration? See the MCP guide →