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

POST/api/deascii

Reconstruct an image from ASCII art, preserving ANSI color or applying deterministic colorization. Returns a PNG data URL.

public
POST/api/deascii/from-ascii

Call ascii.platphormnews.com JSON or NDJSON stream conversion, then reconstruct the output.

public
GET/api/deascii/status

Public-safe renderer limits and AI enhancement readiness. Does not expose secret values.

public
GET/api/charsets

List supported character sets and luminance ramps.

public
GET/api/info

Service metadata, version, and capabilities.

public
GET/api/health

Liveness and uptime check.

public
GET/api/network/status

Live public-safe root graph and MCP gateway integration status.

public
POST/api/webhooks

Subscribe to reconstruction events. Requires PLATPHORM_API_KEY.

protected
POST/api/mcp

Model Context Protocol JSON-RPC endpoint.

public

Reconstruct 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
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
  }'
200 OK
{
  "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.

stream import
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

FieldTypeDefaultDescription
asciistringRequired. Plain ASCII, ANSI terminal art, Unicode Braille/block/box art, or converter output to reconstruct.
charsetstring"auto"standard | detailed | blocks | minimal | braille | auto
cellSizenumber10Pixels rendered per character cell (1-32).
cellAspectnumber2Height multiplier when cellHeight is not set. Use 2 for ASCII converter round-trips.
smoothingnumber3Optimized edge-aware blur passes to soften output (0-6).
renderModestring"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.
colorizeobject{"mode":"smart","strength":0.88}Optional deterministic color restoration for monochrome ASCII: none | smart | portrait | cool | warm | palette.
invertedbooleanfalseSet true for dark-on-light ASCII.
backgroundnumber0Luminance for empty cells (0-1).
contrastnumber1.08Luminance contrast multiplier (0.25-2).
sharpennumber0.3Unsharp mask amount after smoothing (0-2).
autoWrapbooleanfalseWrap very long single-line pasted ASCII.
autoFitOutputbooleantrueScale oversized requested output under the pixel and canvas guardrails instead of failing.
maxOutputPixelsnumber12,000,000Direct PNG allocation budget. Metadata reports requested and emitted dimensions.
maxOutputDimensionnumber32,767Per-axis browser/server output guardrail.
adaptiveQualitybooleantrueReduce expensive smoothing/sharpening on very large outputs.
colorsstring[][]Optional expanded hex color grid from ascii.platphormnews.com JSON output.
colorGridobjectOptional compact rgb24-b64-v1 packed color grid from ASCII for smaller exact-color requests.
enhancebooleanfalseRun the AI restoration/enhancement pass against the current reconstruction.
enhancePromptstringOptional 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.restored

FAQ

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 →