API & MCP

Everything a person can do on Erasure-Coding Playground, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Erasure-Coding Playground

Splits your text or bytes into k data shards, adds m Reed–Solomon parity shards computed over GF(256), lets you drop any shards and reconstructs the original from any k survivors. Shows the generator and decoding matrices, the shard bytes in hex, and compares storage overhead and fault tolerance with replication and RAID-5 style XOR parity.

Inputs of Erasure-Coding Playground
FieldTypeDefaultDescription
data (required)textarea"Hello, erasure coding!"Data. Up to 4,096 bytes. Text is encoded as UTF-8.
encodingselect (text, hex)"text"Data is
kinteger4Data shards (k)
minteger2Parity shards (m)
losttext—Lost shards. Shards to delete before reconstruction: D1…Dk (data), P1…Pm (parity) or numbers 1…k+m. Leave empty to only encode.

Example request

RS(4,2): lose two data shards

curl -X POST https://erasurecodingplayground.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"data":"Hello, erasure coding!","encoding":"text","k":4,"m":2,"lost":"D1, D3"}'

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)

{
  "mcpServers": {
    "erasure-coding-playground": { "type": "http", "url": "https://erasurecodingplayground.usefulweb.site/mcp" }
  }
}