local API control for frontend teams
Create a controllable local API from JSON, models, or OpenAPI. Then flip any response, error, delay, or whole scenario from one panel.
empty cart ·unauthorized user ·3s latency ·checkout failed — one click away.
no account no cloud no code changes one binary
20-second demo poster — a real storefront UI beside the laqi panel; click GET /products → empty, the UI empties — 16:9
or browse filesfor whom
laqi is for the moments when an API is missing, unreliable, inconvenient, or simply not behaving the way you need to test.
frontend
Start from a JSON contract, an OpenAPI file, or a TypeScript model. Point your app at laqi and keep building while the real API is still in progress.
model → seeded data → local endpoint → working UI
quality
Force an empty state, a 401, a 500, or slow loading whenever you need it. Reproduce the state precisely instead of waiting for an unstable environment or lucky timing.
empty · slow · unauthorized · error
agents
With MCP, an agent can create endpoints, generate data, import OpenAPI, and switch responses — while you see the result in a real frontend.
model / OpenAPI → agent → mock files → panel
real HTTP
Use the same mocks from a physical phone, another machine, React Native, or curl. laqi serves real HTTP responses.
quick start
npm i -g laqi@2 01
A JSON file in ./laqi/. One key per route, a named response for each state you care about. Add "delay": 2400 to any of them and you have built the slow state too.
{
"GET /todos": {
"default": "ok",
"responses": {
"ok": {
"status": 200,
"body": [{ "id": 1 }]
},
"empty": {
"status": 200,
"body": []
},
"error": {
"status": 500
}
}
}
} 02
One command. The panel opens with it, and the folder is watched from then on.
$ laqi start
⚡ laqi 2.0.0
serving 127.0.0.1:8000
panel 127.0.0.1:8000/__laqi
watching ./laqi/ 7 endpoints 03
Change one base URL. Everything else — states, errors, latency — now happens in the panel.
// .env.local
VITE_API_URL=http://127.0.0.1:8000
// or per-request, no state change:
fetch("/todos", {
headers: {
"X-Laqi-Response": "error"
}
}) predictable by design
A request header, a one-off panel choice, an active scenario, or the file default: laqi resolves responses in a clear order and tells you which layer won.
You always know why a response won — the panel shows it, the
terminal logs it, and every response carries it in an
X-Laqi-Resolved header.
header
X-Laqi-Response on one request · changes nothing
state
you clicked a chip in the panel · persists
scenario
offline, logged-out, empty-state · one at a time
default
whatever the file says · the baseline
what you get
one click
Make the next request succeed, fail, return empty data, or wait — without a rebuild or restart.
scenarios
Activate a named situation — logged out, checkout broken, offline — and change multiple endpoints in one move.
live log
Every request is visible, including unmatched ones. Find out why a mock is not answering instead of guessing.
latency
Add delay to any response and test the loading experience users will actually see.
plain files
Mocks are ordinary JSON files: editable, reviewable, and shareable with the team.
real HTTP
Connect web, mobile, devices, curl, and other clients — not just an intercepted browser request.
30-second demo poster — activate scenario 'checkout-broken': empty cart, payment error, visible delay — one click, several endpoints
or browse files30-second demo poster — paste a TypeScript Order interface, generate seeded data, a working UI appears on localhost
or browse filesbuilt for AI-assisted workflows
laqi’s MCP server gives coding agents tools to create endpoints, import OpenAPI, generate realistic data, and switch responses. The result is still ordinary JSON and a local panel your team can inspect.
Using laqi with AI agents →Order.ts / openapi.yaml agent via laqi mcp laqi/orders.json panel · your team flips states A JSON file, one command, one base URL — and every state your frontend needs to handle is a click away.
Plain JSON in your repo · runs on your machine · the panel stays
local — --share exposes only mock responses, never the
control plane.