OpenAPI → hosted mock server

Host a mock server straight from your OpenAPI spec.

Paste your spec and get a hosted mock API whose data actually connects — the same IDs resolve across every endpoint, with realistic values and no dead foreign keys.

https://api.mocksmith.io/m/petstore

Endpoints

  • GET/pets
  • GET/pets/{id}
  • GET/owners/{id}
  • POST/visits

GET /pets/7

{
  "id": 7,
  "name": "Mochi",
  "species": "cat",
  "ownerId": 312
}

ownerId: 312 GET /owners/312 returns the same owner.

From spec to hosted URL in three steps

1Paste your OpenAPI spec — a URL or an uploaded file.
2Mocksmith infers your entities, their keys, and how they relate.
3Copy your hosted mock URL — every endpoint returns connected data.

A coherent mock server beats a pile of endpoint stubs

Most mock servers fake each endpoint in isolation. Follow a link between two of them and the data falls apart — an ID from one response points at nothing on another.

Other mock tools
GET /orders/42
{
  "id": 42,
  "customerId": "9f3b1c7e-44a2-4f08-bd31",
  "total": 129.00
}

GET /customers/9f3b1c7e-44a2-4f08-bd31
→ 404 Not Found

The customerId points at a customer that doesn't exist. Your flow breaks the moment it follows the link.

Mocksmith
GET /orders/42
{
  "id": 42,
  "customerId": 318,
  "total": 129.00
}

GET /customers/318
{
  "id": 318,
  "name": "Alice Tan",
  "email": "alice.tan@example.com"
}

customerId: 318 resolves to the same realistic customer — everywhere it appears across your API.

Mocksmith generates the whole dataset at once, so the mock behaves like a real backend when your app walks from one resource to the next.

What Mocksmith reads from your spec

Entities behind your paths

It groups your endpoints into the real domain objects they serve — Customer, Order, Invoice — instead of treating every path as unrelated.

Primary and foreign keys

It infers which field identifies each entity and which fields point at another one, so an order’s customerId lines up with a real customer.

Field meaning, not just type

A field typed string could be an email, a city, or an ISO date. Mocksmith reads the name and context to pick a generator that fits.

Enums and constraints

Declared enums, formats, and min/max bounds in your schema are respected, so the mock stays inside the shapes your real API promises.

How it compares to Prism, Mockoon, and Postman

Every tool can stand up endpoints from a spec. The dividing line is whether the data between those endpoints holds together.

CapabilityMockoonPrismPostmanWireMockMocksmith
Generate a mock from an OpenAPI spec
Realistic field values by meaning
Cross-endpoint data coherence (foreign keys resolve)
Auto-infers entity relationships from the spec
Hosted, zero local setup
No manual example authoring

As of 2026, based on each tool's documented default behavior. “Partial” = possible, but manual or limited.

Read the full comparison of mock API tools →

OpenAPI mock server FAQ

What OpenAPI versions does it support?

Mocksmith reads OpenAPI 3.x specs (the format most tools export as Swagger). You can paste a URL to a hosted spec or upload the file directly.

Is the mock server hosted, or do I run it locally?

It’s hosted. You get a public mock URL you can point a frontend, a demo, or a test suite at — there’s nothing to install or keep running on your machine.

How is this different from Prism’s mock server?

Prism mocks each endpoint independently from your examples or schema, so an ID returned by one endpoint usually doesn’t exist on another. Mocksmith generates one coherent dataset, so foreign keys resolve across endpoints.

Do foreign keys really resolve across endpoints?

Yes. If GET /orders/42 returns customerId 318, then GET /customers/318 returns that same customer. The whole dataset is generated together, not per request.

Do I have to write example responses by hand?

No. Mocksmith infers realistic values from your schema, so you don’t maintain a pile of hand-authored examples that drift from the spec over time.

New to this? Read the 5-minute walkthrough or see how it helps with demos and prototypes.

Spin up your OpenAPI mock server

Mocksmith is in early access. Leave your email and we’ll reach out as we open up hosted mock servers.

Get early access

We'll email you when your spot opens — feature requests welcome.

Optional feedback0/500

We'll only contact you about launch updates.