A fake REST API with realistic data, generated from a description.

Describe your domain to get related resources, seeded data and endpoints with filtering, sorting and pagination. Add failure modes for testing, and export TypeScript types, OpenAPI, SQL or MSW handlers.

Version 2.0.0 · MIT license · github.com/dguywhoknows/mock-api-generator

The app itself, running inside this page. Anything you do here is saved in your browser.

Ask it to do things

Press Ctrl+K in the app (Cmd+K on a Mac) and describe what you want. The model chooses from the app's own functions, runs them in order and tells you what changed. Some examples:

An API for a vet clinic with owners, pets and appointmentsDesigns the schema and generates data.
Add a nullable microchip number to petsEdits the schema and regenerates data.
Make GET /appointments fail with a 503 half the timeAdds a route override for testing errors.

Instructions you save in the same box, such as "keep it short" or "I'm a beginner", are added to every AI request the app makes.

Features

AI schema design
With 29 field types, refs, enums, ranges, required/nullable/unique.
Seeded
Reproducible fake data generated in topological (FK-safe) order.
REST simulator
CRUD, filters (_gte/_lte/_ne/_like), q search, multi-sort, page/limit, fields, expand, nested routes.
Validation engine
With 422 details (types, enums, ranges, emails, FK existence, uniqueness, unknown fields).
Latency simulation
And chaos mode (random 500s) for resilience testing.
Syntax-highlighted JSON console
With one-click example requests.
Exports
TypeScript interfaces, OpenAPI 3.0, JSON Schema, db.json.
Schema page
Editable resources and fields (types, required/nullable/unique, ranges, enum values, references) with a live entity-relationship diagram; data regenerates as you edit.
Data page
Browse generated rows per resource, change the seed and row count, download CSV.
Console page
Request history, and copyable curl and fetch snippets for the current request.

Runs in your browser

Data generation, routing, querying, validation, exports. None of this needs a network connection or a model.

Uses a language model for

Natural-language → typed API schema, sanitized and repaired locally.

Notes

Cost
Free. Each account has a daily allowance of AI requests.
Your data
What you make stays in this browser on this device. Your account is only used for signing in and for the built-in AI. You can export a backup or clear everything from Settings.
AI access
Signed-in users get the built-in AI with nothing to set up. You can also use your own Groq or OpenRouter key under Settings.
Source
The code and tests are on GitHub under the MIT license. The tests also run in your browser.