# GoModel

> A single-binary AI gateway in Go with caching, cost tracking and a dashboard

- Category: Evaluation & Production Ops / Gateways & Routing
- Language: Go
- Licence: MIT
- Repository: https://github.com/ENTERPILOT/GoModel
- Website: https://gomodel.enterpilot.io/
- Canonical page: https://ai-tldr.dev/tools/gomodel/
- Updated: 2026-04-25

## In short

GoModel is a single-binary AI gateway in Go with caching, cost tracking and a dashboard. It sits in the Gateways & Routing category of the Evaluation & Production Ops tools and is open-source, written in Go and licensed MIT. To get started: install and start the gateway.

## Overview

GoModel is an open-source AI gateway written in Go by ENTERPILOT. It sits between your application and the model providers you use, exposing two compatible surfaces — an OpenAI-compatible API at `/v1` and an Anthropic-compatible API at `/v1/messages` — so the official OpenAI and Anthropic SDKs work unchanged once you point their base URL at the gateway.

Behind that endpoint it fans out to a long list of providers: OpenAI, Anthropic, xAI, Google Gemini, Cohere, Vertex AI, DeepSeek, Groq, Fireworks AI, OpenRouter, Z.ai, Alibaba Cloud Model Studio, MiniMax, Azure OpenAI, Oracle, Amazon Bedrock, ElevenLabs, self-hosted runtimes such as Ollama, SGLang, vLLM and llm-d, and any other OpenAI-compatible endpoint. The project positions itself as an alternative to LiteLLM and Portkey and publishes self-reproducible benchmarks for its throughput and resource use.

The gateway is also where GoModel does the cross-cutting work you would otherwise scatter through application code: exact and semantic response caching so repeated prompts cost nothing, per-request cost estimates and spending breakdowns, budgets, prompt compression and intelligent routing. An admin dashboard at `/admin/dashboard` surfaces usage analytics and observability, and configuration resolves through built-in defaults, then `config.yaml`, then `.env`, then exported environment variables.

## What it does

- One endpoint in two dialects — OpenAI-compatible at `/v1` and Anthropic-compatible at `/v1/messages` — so official SDKs work by changing only the base URL
- 25+ providers behind that endpoint, including hosted APIs, cloud platforms and local runtimes such as Ollama, vLLM and SGLang
- Exact and semantic response caching, so repeated prompts are served without a provider call
- Cost tracking with per-request estimates, usage analytics and spending breakdowns, plus hard budgets
- Admin dashboard for observability, token and cost monitoring, and the most important settings
- Ships as a single Go binary with an install script for macOS, Linux and Windows, plus a Docker image and Compose stack

## Getting started

GoModel installs as one binary and starts with no configuration; provider keys are optional at first run and can be added later from the dashboard, a `.env` file or `config.yaml`.

1. Install and start the gateway

   On macOS or Linux, run the install script and launch it. A PowerShell installer is available for Windows.

```bash
curl -fsSL https://gomodel.enterpilot.io/install.sh | sh
# OPENAI_API_KEY="your-openai-key"   # optional
gomodel
```

2. Or run it in Docker

   The published image exposes the gateway on port 8080.

```bash
docker run --rm -p 8080:8080 \
  -e OPENAI_API_KEY="your-openai-key" \
  enterpilot/gomodel
```

3. Open the dashboard

   Usage analytics, cost tracking and the main settings live in the admin UI.

```text
http://localhost:8080/admin/dashboard
```

4. Send a request through it

   Call the OpenAI-compatible endpoint directly, or point an official SDK at http://localhost:8080/v1 (OpenAI) or http://localhost:8080 (Anthropic, which appends /v1/messages itself).

```bash
curl http://localhost:8080/v1/responses \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5-chat-latest",
    "input": "Hello!"
  }'
```

## When to use it

- Put one OpenAI- and Anthropic-compatible endpoint in front of every provider your team uses, so application code stops caring which one is behind it
- Cut spend on repeated prompts with exact and semantic caching, and see where the rest of the budget goes per request
- Enforce hard budgets and watch token usage across teams from a single dashboard
- Mix hosted APIs with self-hosted vLLM, SGLang or Ollama endpoints behind the same interface

## Version history

- 2026-04-25: AI/TLDR covered GoModel after its Show HN: an MIT-licensed AI gateway in Go offering a unified OpenAI-compatible endpoint across providers, with caching, cost tracking, guardrails and an admin dashboard.
