LoremLLM
LoremLLM is a collection of tools that help developers mock LLM responses.
What LoremLLM is
LoremLLM is a set of tools for building and testing AI interfaces without paying for, or waiting on, a real language model. It is open source and built by Kaiyu Hsu.
There are two ways to use it. The `@loremllm/transport` npm package is a chat transport for the Vercel AI SDK: you describe the exact message parts the UI should receive — text, reasoning, tool calls — and `useChat` streams them back with no network request at all. The hosted API at `/api/chat` does the same over HTTP: it streams lorem ipsum, replays a markdown string, or answers from a collection of recorded interactions, picking the closest one by embedding similarity.
When to use LoremLLM
- You are building a chat UI before the backend exists — point `useChat` at `@loremllm/transport` or at `/api/chat` and the UI receives a realistic streamed response today
- You need deterministic AI responses in tests or demos — a collection maps known inputs to fixed outputs, so the same question always gets the same answer, token by token
- You want to exercise streaming edge cases — the transport can emit reasoning parts, tool calls and custom chunk timing that are hard to reproduce against a live model
- You need filler text shaped like model output — `POST /api/chat` with `{"type":"lorem"}` streams generated lorem ipsum as an AI SDK UI message stream — no account, no key
- Not a fit — LoremLLM does not run a language model, generate novel answers, or proxy to OpenAI or Anthropic. It replays what you stored; for real completions, call a real model provider
How to use it
How to call it: `POST /api/chat` with a JSON body whose `type` is `"lorem"`, `"markdown"` or `"chat"`. The response is an AI SDK UI message stream (server-sent events), so `useChat` from `@ai-sdk/react` consumes it directly. Lorem and markdown requests need no account. Chat requests name a public collection by its id; collections are created in the dashboard after signing up. Errors are `application/problem+json`. The full contract is in `/openapi.json` and on `/docs`.
Reading it as an agent: send `Accept: text/markdown` to any page URL — or append `.md` to it — and the same page comes back as Markdown instead of HTML. `/llms.txt` carries this overview in one request, and `/sitemap.xml` lists every indexable URL.
Machine-readable endpoints
- /openapi.json — OpenAPI 3.1 description of the public HTTP API
- /docs — API reference: request types, streaming format, errors, the eve endpoint and the npm transport
- POST /api/chat — streams a mock response — lorem ipsum, a markdown string, or the best match from a public collection
- /api/eve/<collectionId> — eve-protocol host for a collection, for clients built on the eve agent framework
- /sitemap.xml — every indexable URL on the site
- /llms.txt — this overview, for agents
- Markdown for any page — send `Accept: text/markdown` to any page URL, or append `.md` to it, and the same content comes back as Markdown
AI SDK Transport
- 01Simple Text Response
- 02Tool Calling
- 03Reasoning Stream
Platform API [IN PROGRESS]
- 01Default Generator
- 02Collections
- 03Markdown Streaming