Available APIThree owner-configured storage primitives · 10 MB for KV and SQLite, 10 MB for files, per website

A visual guide

Give every site three building blocks for saved data.

An agent chooses its own keys, SQL schema, and file layout. Simple Host supplies storage and clear access rules, without forcing a particular app template.

01 / Access flow

A request passes two independent gates.

Try a visitor, an operation, and a policy. This policy explorer is a browser simulation; it sends nothing to an API.

Caller
Operation
Optional site passcode

Uses the existing site passcode. No second password. Authorized owner tools bypass this visitor gate.

1 · callerAnonymous visitorReads a resource
2 · site / resourceChoose a storage resourceIts owner sets the two policies
3 · passcode gateNo passcodeContinue to policy
4 · identity policyAnyone may readIdentity requirement met
5 · chosen storageKey–value · SQLite · filesData is separate from site versions
6 · responseAllowedThe visitor can read

A public read reaches the selected storage resource. This simulation does not send a request.

R

Read and write are separate.
Each resource has its own rule for each operation.

◎

Open + passcode is still open.
Anyone who unlocks may use an “Anyone” operation; an account is needed only when its policy requires one.

★

Owner control stays with the owner.
Only the owner creates resources or changes policies; authorized owner tooling bypasses the visitor passcode.

02 / Storage types

Pick the shape that fits the data.

These API paths are available. The examples are illustrative. Agents remain free to design their own names, schema, and layout.

A namespace holds keys
settingstheme"dark"
settingslaunch-date"2026-11-01"
countersvisits42

Choose any namespace and key. Store one JSON value at each key.

01 · Key–value

Simple values, named by you.

Useful for settings, counters, snapshots and small documents. One key addresses one JSON value; it does not prescribe an app model.

HTTP shape ↗
WritePUT /v1/sites/{site}/storage/kv/{namespace}/keys/{key}
{"value":{"theme":"dark"}}
ReadGET /v1/sites/{site}/storage/kv/{namespace}/keys/{key}
{"key":"theme","value":{"theme":"dark"}}
★
Owner creates each resource and sets its policies.

Rules apply to a whole key–value namespace, SQLite database or file bucket. “Signed in” means shared access to that resource, not private rows per person. Public pages never receive an owner API key.

Owner resource setup ↗
Owner-only · illustrativePUT /v1/sites/{site}/storage/resources/{name}
{"kind":"kv","read":"anyone","write":"signed-in","site_passcode":"inherit"}

The optional passcode is the site’s existing visitor gate; “inherit” does not create another password. The owner can change policies later; the resource kind cannot change.

03 / How it fits

Three primitives, with Host compatibility.

Simple Host keeps its existing state, collections and declared data as deprecated compatibility APIs. Simple Hack websites use only key–value, SQLite and files.

Deprecated compatibility

Existing Host sites

State, collections and declared kinds keep working for existing Simple Host sites. New sites use the three primitives.

New capability

Agent-designed storage

Choose keys, tables or paths and set read/write access for each resource. No forced app category or schema.

No automatic migration or data deletion. Simple Host has no removal date for its deprecated APIs. Simple Hack rejects old storage calls; owner archives can retain previously stored data. Whole-resource access does not provide per-person row privacy.

10 MB10,000,000 bytes for KV and SQLite · per website
One pool for KV and SQLite, a separate one for files.

KV values and SQLite database files share the 10 MB allowance; raw uploads have their own 10 MB. Published website files and existing collection data keep their current limits. Owner tooling can read exact used and remaining bytes; the public page does not get an owner key.

Owner usage API ↗
Owner-only GETGET /v1/sites/{site}/storage/usage
{"used_bytes":16526,"limit_bytes":10000000,"remaining_bytes":9983474,
 "breakdown":{"kv_bytes":31,"sqlite_bytes":16384,"files_bytes":111}}

Example from a disposable site. SQLite WAL is transient and excluded from the reported durable bytes.

A generated photo-upload page should resize and compress phone images in the browser, show the result and its byte size, and refuse an oversized result instead of uploading the original. The raw-files API preserves the bytes sent.

Measured disk example, not a savings promise

One disposable workload: 10,000 deterministic JSON records (1.84 MB logical data), plus a separate case of 200 synthetic 100 KiB photos. Bars show measured physical bytes, not the full service. The record workload fits within the 10 MB KV and SQLite allowance; the photo case is larger than the 10 MB file allowance.

SQLite also had a 2.41 MB transient WAL in this run. Tiny 10-row case: Postgres 65.5 KB; SQLite 12.3 KB plus 24.8 KB transient WAL. Postgres remains for accounts and metadata, and indexes, logs, backups, dual storage and real photo sizes add overhead. Results are workload-specific.

A visual API guide

Design the data around your site.

The policy explorer above is a simulation. The documented HTTP routes are live; this page makes no API request or saved-data change.

Run another policy scenario ↑