Why I Built Stockyard
I was building an app with the OpenAI API. Everything worked great in development. Then I shipped it.
Within the first week, three things happened:
- My API bill hit $400 and I didn’t notice until the invoice.
- OpenAI went down for 45 minutes on a Tuesday afternoon. My app went down with it.
- I realized I was paying for the exact same API response dozens of times because users kept asking similar questions.
These are not hard problems. Cost caps, failover routing, and response caching are solved problems in every other part of the stack. But for LLM APIs? You’re on your own.
I looked at the options. LiteLLM is the big one. But it’s Python, it needs Redis and Postgres, and it’s one monolithic proxy. I just wanted a spending cap. I didn’t want to set up an entire infrastructure stack for it.
So I built what I wanted: a single binary I could download and run in 10 seconds.
What Stockyard is
Stockyard is a Go proxy that sits between your app and any LLM provider. You don’t change your application code — you just point your OPENAI_BASE_URL at Stockyard instead of directly at OpenAI.
# Install curl -fsSL stockyard.dev/install.sh | sh # Run export OPENAI_API_KEY=sk-... stockyard
That’s it. Your app now has cost tracking, response caching, rate limiting, provider failover, content safety, prompt management, and an audit trail. There’s a dashboard at localhost:4200/ui where you can see everything happening in real-time.
Why Go, why single binary
I’m tired of tools that need Docker Compose files with 4 services, a Postgres database, and a Redis instance just to add a spending cap to my API calls.
Stockyard is a single static binary. No runtime dependencies. No database to manage — it uses embedded SQLite. No Docker required. Download, run, done.
It starts in under 50ms, uses about 12MB of memory, and cross-compiles to every platform. That’s the Go advantage.
76 modules, 150 tools, one binary
The proxy is built as composable middleware. There are 76 modules organized across 8 categories — routing, caching, cost, safety, transform, validate, observe, and shims. Each one is toggleable at runtime via the API. No restarts.
Beyond the proxy, there are five more apps baked into the same binary:
- Lookout — Traces, costs, alerts, anomaly detection
- Brand — Hash-chained audit ledger, policies, evidence export
- Tack Room — Versioned prompt templates, A/B experiments
- Forge — DAG workflow engine with tool registry
- Trading Post — Config pack marketplace with one-click install
Try it
curl -fsSL stockyard.dev/install.sh | sh stockyard
Free to start. Unlimited requests on the free tier. Just download and run.