StatikAPI Documentation

Build APIs from your data — without backend complexity.

StatikAPI helps you combine external APIs with your own content, shape outputs, and publish reliable structured endpoints. These docs cover the open source foundation, with guidance for local CLI workflows, Cloudflare deployment, and hosted platform usage.

StatikAPI App

Use the hosted visual workflow when you want managed publishing, private APIs, and automation.

Open StatikAPI App

The open source CLI stays free and self-hostable. StatikAPI App adds hosted workflows, visual editing, automations, analytics, and private API access.

Last updated: May 2026

Core CLI — statikapi

The core CLI currently provides:

  • statikapi build
  • statikapi dev
  • global --help
  • global --version

It is the CLI used by the normal local workflow, not the Cloudflare adapter workflow.


Global usage

bash
statikapi --help
statikapi --version
statikapi build
statikapi dev

statikapi build

Builds JSON endpoints into the configured output directory.

Default directories:

  • source: src-api
  • output: api-out

Common flags

  • --srcDir <dir>
  • --outDir <dir>
  • --pretty
  • --minify=false
  • --listIndex=true|false
  • --listIndexPick id,title

Examples

bash
pnpm statikapi build
bash
pnpm statikapi build --srcDir api --outDir public/api --pretty
bash
pnpm statikapi build --listIndex=true --listIndexPick id,title

What it writes

  • route JSON files
  • api-out/.statikapi/manifest.json

Notes

  • output is minified by default
  • --pretty writes readable JSON
  • dynamic and catch-all routes without paths() are skipped instead of failing the whole build

statikapi dev

Starts the local watch/build/preview flow.

Common flags

  • --srcDir <dir>
  • --outDir <dir>
  • --host <host>
  • --port <port>
  • --no-ui
  • --no-open
  • --keep-alive
  • --serve
  • --listIndex=true|false
  • --listIndexPick id,title

Examples

bash
pnpm statikapi dev
bash
pnpm statikapi dev --port 8788 --srcDir src-api --outDir api-out
bash
pnpm statikapi dev --no-open

What it does

  • builds an initial output set
  • watches your source tree
  • rebuilds on change
  • removes stale output when routes disappear
  • updates the local manifest
  • serves the preview UI at /_ui/

Non-TTY behavior

In non-interactive environments, dev behaves like a stub unless you force it with:

  • --keep-alive
  • --serve
  • STATIKAPI_FORCE_DEV=1

That is useful when running under tools like concurrently.


Route output model

The regular CLI emits filesystem JSON:

  • / -> api-out/index.json
  • /users/1 -> api-out/users/1/index.json

If config.listIndex is enabled on a dynamic or catch-all route, it can also emit a parent collection route:

  • /posts/1
  • /posts/2
  • /posts

See Configuration and Dynamic Routes.


Manifest shape

The local manifest written to .statikapi/manifest.json currently includes:

  • route
  • outFile
  • srcFile
  • filePath
  • bytes
  • mtime
  • hash

The preview UI uses that manifest to show route lists and load payloads.


JSON restrictions

Route output must be JSON-serializable.

Allowed:

  • objects
  • arrays
  • strings
  • booleans
  • null
  • finite numbers

Rejected:

  • functions
  • symbols
  • BigInt
  • Date
  • class instances
  • circular structures
  • NaN
  • Infinity

Get started

Ready to publish your first API?

Start locally with the CLI or use StatikAPI App when you want managed publishing and automation.

Start building for free View examples