Installation
Install stitchapi and set up the zero-dependency runtime in Node or the browser.
Install the package, import stitch, and turn your first endpoint into a typed,
callable function. stitchapi has zero dependencies and runs anywhere fetch
does — Node, the browser, and edge runtimes. The whole entry is ~25 kB
minified + gzipped — and with no dependencies, there is no transitive tree
behind it (a typical import { stitch } tree-shakes to ~20 kB).
Validators are bring-your-own. Because stitchapi ships with zero
dependencies, it does not bundle a schema library and declares no zod
(or Valibot / ArkType / …) peer dependency. input/output accept any
Standard Schema validator — Zod,
Valibot, ArkType, Effect, TypeBox — or a plain predicate, but the one you
pick is your dependency: add it to your own project's dependencies so
it is never a phantom (undeclared) import.
Install
npm install stitchapi@rcImport it
stitch is a named export. Pick the form that matches your module system —
everything after the import is identical.
import { } from 'stitchapi';Verify
Declare a stitch from one URL and call it like a function — no config object, no client to construct:
import { } from 'stitchapi';
const = ('https://api.example.com/users');
const = await (); // GET, parsed JSONIf that returns without throwing, the runtime is wired up. Add an output schema
next and you get TypeScript types, runtime validation, and drift detection in one
move — see Quickstart.