A hosted alternative to local LLM mock servers like mockllm

Packages such as mockllm, llmock, fakellm and stubllm start a local server that imitates the OpenAI and Anthropic APIs, so tests can run without a real key or token bill. mockllm, for example, is an Apache-2.0 Python package that answers from a YAML file of canned responses; llmock focuses on injecting errors to test retries and fallbacks.

At a glance

local LLM mock servers compared with this playground, checked 2026-11-09.
 local LLM mock serversFun API Playground
Setuppip install, a config file, a running processA base URL
ResponsesYour own canned responsesDeterministic replies per scenario
Failure injectionPer tool (e.g. llmock error rates)mock-429, mock-503, mock-slow, mock-stream-cut, mock-malformed-json
Offline / privateYesNo — a hosted service
FormatsOpenAI and Anthropic (varies by package)OpenAI Chat Completions, Anthropic Messages, embeddings

Where it stops

They have to be installed, configured and kept running wherever the test runs — a developer laptop, every CI job, a classroom of machines — and each has its own configuration format. That is the right model for an application's own test suite and an obstacle for a quick experiment, a tutorial or a browser-based exercise.

What is different here

The Mock LLM API here is hosted: point an SDK at https://funapi.dev/api/llm/v1 (or /api/llm for Anthropic) with any key. The model name selects the scenario — mock-429, mock-503, mock-slow, mock-stream-cut, mock-malformed-json, mock-tool-call — so a test chooses its failure in the request instead of in a config file. Streaming uses SSE in both providers' shapes.

What local LLM mock servers does better

What this playground does better

Which to use

Run a local mock for your application's own CI and anything private. Use the hosted mock to learn, demonstrate or quickly test streaming, retries and tool calls without installing anything.

Checked against local LLM mock servers as of 2026-11-09.

Official sources and scope

This compares a training playground with the documented use case of the other tool. Plans, limits and hosted features can change. For current terms, use the official sources below.

Current Fun API behavior and limits · Run a practice example

Other comparisons

All 55 mock REST APIs · Getting started guide · About this playground

Last updated