
Mock HTTP APIs
with real-world behavior
Mokksy is a mock HTTP server for integration testing — with true streaming, SSE, and failure simulation. Test your services as they behave in production.
Tested with these LLM providers & frameworks
Why it matters
Catch failures before production
Unit tests don’t cover timeouts, retries, or streaming behavior. Mokksy lets you test real HTTP interactions — including slow responses, partial streams, and connection drops — in a deterministic way.
Why Mokksy
Everything WireMock isn't
for AI testing
Built for the unique challenges of testing LLM-powered applications — streaming, chunked responses, and non-determinism included.
True Streaming
Native Server-Side Events support. Simulate chunked token delivery just like real LLM APIs — with configurable delays between chunks.
Request Matching
Fluent Kotlin DSL for matching requests by model, prompt content, parameters, and headers. Return different responses per scenario.
Error Simulation
Mock rate limits, token exhaustion, network timeouts, and provider-specific error formats. Test unhappy paths reliably.
Latency Control
Add configurable delays at request level or between individual streaming chunks. Reproduce real-world performance conditions in tests.
Drop-in Compatible
Point your existing Anthropic, OpenAI, or Gemini SDK client at the mock server URL. No code changes needed in your application.
Kotest Ready
First-class Kotest integration with fluent assertions, concise test DSL, and full JUnit 5 support for Java teams.
Next-level mocking
Mokksy & AI-Mocks
Mokksy and AI-Mocks bring realistic behavior to HTTP and LLM API testing. They let you test streaming, delays, retries, and failures — not just static responses.