Offline AI API Emulator
Runs a local stand in for the OpenAI and Anthropic APIs, so you can test AI features offline, free and repeatably.
Claude's review
7/10 Detailed guide to a local OpenAI and Anthropic emulator with SDK setup, scripted rules and error injection for tests.
We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.
In detail
Deterministic OpenAI Responses, Chat Completions, and Anthropic Messages emulation for local development and CI. Use when the user needs to test an app that calls an LLM without network access, keys, or cost, including text, streaming, structured output, tool loops, reasoning, refusals, retries, timeouts, and stored conversations. Triggers include "mock OpenAI", "emulate OpenAI", "test the OpenAI SDK", "mock Anthropic", "emulate Anthropic", "test the Anthropic SDK", "test the AI SDK", "generateText", "generateObject", "streamText", "Chat Completions", "Responses API", "Messages API", "simulate a 429", "test tool calls", "no API key", or any task requiring a local AI provider.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: ai
description: Deterministic OpenAI Responses, Chat Completions, and Anthropic Messages emulation for local development and CI. Use when the user needs to test an app that calls an LLM without network access, keys, or cost, including text, streaming, structured output, tool loops, reasoning, refusals, retries, timeouts, and stored conversations. Triggers include "mock OpenAI", "emulate OpenAI", "test the OpenAI SDK", "mock Anthropic", "emulate Anthropic", "test the Anthropic SDK", "test the AI SDK", "generateText", "generateObject", "streamText", "Chat Completions", "Responses API", "Messages API", "simulate a 429", "test tool calls", "no API key", or any task requiring a local AI provider.
allowed-tools: Bash(npx emulate:*), Bash(curl:*)
---
# AI Provider Emulator
Deterministic OpenAI Responses, Chat Completions, and Anthropic Messages emulation. Replies are scripted by rules, not generated by a model, so the same request returns the same answer every run. Use it to test text, streaming, structured output, tool-calling agent loops, reasoning, refusals, stored conversations, errors, mid-stream disconnects, and stalls, offline and without keys.
## Start
```bash
npx emulate start --service ai --port 4014
```
A single selected service otherwise uses the base port, normally 4000. In an all-services run, `ai` listens on port 4014. Startup prints the base URL setup for the service.
| What | URL |
| -------------------- | ---------------------------- |
| Base URL for clients | `http://localhost:4014/v1` |
| Inspector | `http://localhost:4014/` |
| Control routes | `http://localhost:4014/_ai/` |
Programmatically:
```typescript
import { createEmulator } from "emulate";
const ai = await createEmulator({
service: "ai",
port: 4014,
seed: {
ai: {
rules: [{ id: "hello", match: { textContains: "Hi" }, reply: [{ type: "text", text: "Hello from emulate." }] }],
},
},
});
```
...From vercel-labs's repository, Apache-2.0 licence.
Related skills
-
Checked
JUnit and Mockito tests
Writes and fixes Java tests with JUnit, AssertJ and Mockito that are deterministic and keep failures visible.
8/101 credit -
Checked
Test code review
Reviews new or changed tests in pytest, Jest, Go and more, so weak tests are caught before merge.
7/101 credit -
Checked
Go table driven tests
Writes Go tests with table cases, fakes, fuzzing, benchmarks and golden files that stay fast and reliable.
8/101 credit -
Checked
MSTest Unit Testing
Writes modern C# unit tests with current MSTest APIs, assertions, data driven tests and lifecycle patterns.
8/101 credit -
Checked
Quarkus Testing
Writes and fixes Quarkus tests using Dev Services containers, with the right profiles, mocks and run commands.
7/101 credit -
Checked
Dotnet Test Hot Reload
Sets up a live .NET test host that reruns your tests automatically each time you edit the code.
7/101 credit