OPEN SOURCE
Snark logo

Snark

A self-hostable LLM API, and a working reference for production LLM infrastructure

Published September 17, 2026

The problem

Teams putting LLM features into production discover the same problems in the same order: provider outages, cost spikes, unpredictable latency, repetitive output, abuse on public endpoints, and no visibility into what any of it costs.

These are infrastructure problems, not prompt problems, and they are where most LLM projects stall between prototype and production.

What we built

Multi-provider layer

Integration across Groq, Gemini and Claude with automatic fallback, so a single provider outage degrades rather than fails.

Caching & anti-repetition

Redis response caching to cut cost and latency, plus logic preventing the same generation recurring across requests.

Streaming & abuse control

SSE token streaming so time-to-first-token replaces time-to-complete-response, and per-IP rate limiting.

Agent access & tooling

An MCP server letting AI agents call the API as native tools, a one-command Docker Compose stack, a CLI client and an admin dashboard reporting usage, cost and latency.

Outcome

  • A working reference implementation of the patterns that separate an LLM prototype from an LLM product
  • Provider redundancy, so no single vendor is a single point of failure
  • Cost and latency made observable rather than assumed
  • Deployable in one command, agent-callable via MCP, open source and publicly readable