A high-performance AI gateway written in Go, providing a unified OpenAI-compatible API for multiple AI model providers, full-observability and more.
Step 1: Start GOModel
docker run --rm -p 8080:8080 \
-e OPENAI_API_KEY="your-openai-key" \
enterpilot/gomodelPass only the provider credentials or base URL you need (at least one required):
docker run --rm -p 8080:8080 \
-e OPENAI_API_KEY="your-openai-key" \
-e ANTHROPIC_API_KEY="your-anthropic-key" \
-e GEMINI_API_KEY="your-gemini-key" \
-e GROQ_API_KEY="your-groq-key" \
-e XAI_API_KEY="your-xai-key" \
-e OLLAMA_BASE_URL="http://host.docker.internal:11434/v1" \
enterpilot/gomodel-e on the command line—they can leak via shell history and process lists. For production, use docker run --env-file .env to load API keys from a file instead.
Step 2: Make your first API call
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-chat-latest",
"messages": [{"role": "user", "content": "Hello!"}]
}'That's it! GOModel automatically detects which providers are available based on the credentials you supply.
Example model identifiers are illustrative and subject to change; consult provider catalogs for current models.
| Provider | Features | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Name | Credential | Example Model | Chat | Passthru | Voice | Image | Video | /responses | Embed | Cache |
| OpenAI | OPENAI_API_KEY |
gpt‑4o‑mini |
✅ | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 |
| Anthropic | ANTHROPIC_API_KEY |
claude‑sonnet‑4‑20250514 |
✅ | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 |
| Google Gemini | GEMINI_API_KEY |
gemini‑2.5‑flash |
✅ | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 |
| Groq | GROQ_API_KEY |
llama‑3.3‑70b‑versatile |
✅ | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 |
| xAI (Grok) | XAI_API_KEY |
grok‑2 |
✅ | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 | 🚧 |
| Ollama | OLLAMA_BASE_URL |
llama3.2 |
✅ | 🚧 | 🚧 | — | — | 🚧 | 🚧 | 🚧 |
✅ Supported 🚧 Coming soon — Not applicable
Prerequisites: Go 1.22+
-
Create a
.envfile:cp .env.template .env
-
Add your API keys to
.env(at least one required). -
Start the server:
make run
Includes GOModel + Redis + PostgreSQL + MongoDB + Adminer + Prometheus:
cp .env.template .env
# Add your API keys to .env
docker compose up -d| Service | URL |
|---|---|
| GOModel API | http://localhost:8080 |
| Adminer (DB UI) | http://localhost:8081 |
| Prometheus | http://localhost:9090 |
docker build -t gomodel .
docker run --rm -p 8080:8080 --env-file .env gomodel| Endpoint | Method | Description |
|---|---|---|
/v1/chat/completions |
POST | Chat completions (streaming supported) |
/v1/responses |
POST | OpenAI Responses API |
/v1/models |
GET | List available models |
/health |
GET | Health check |
/metrics |
GET | Prometheus metrics (when enabled) |
/admin/api/v1/usage/summary |
GET | Aggregate token usage statistics |
/admin/api/v1/usage/daily |
GET | Per-period token usage breakdown |
/admin/api/v1/models |
GET | List models with provider type |
/admin/dashboard |
GET | Admin dashboard UI |
GOModel is configured through environment variables. See .env.template for all options.
Key settings:
| Variable | Default | Description |
|---|---|---|
PORT |
8080 |
Server port |
GOMODEL_MASTER_KEY |
(none) | API key for authentication |
CACHE_TYPE |
local |
Cache backend (local or redis) |
STORAGE_TYPE |
sqlite |
Storage backend (sqlite, postgresql, mongodb) |
METRICS_ENABLED |
false |
Enable Prometheus metrics |
LOGGING_ENABLED |
false |
Enable audit logging |
Quick Start — Authentication: By default GOMODEL_MASTER_KEY is unset. Without this key, API endpoints are unprotected and anyone can call them. This is insecure for production. Strongly recommend setting a strong secret before exposing the service. Add GOMODEL_MASTER_KEY to your .env or environment for production deployments.
See DEVELOPMENT.md for testing, linting, and pre-commit setup.
| Feature | Basic | Full |
|---|---|---|
| Billing Management | 🚧 | 🚧 |
| Full-observability | 🚧 | 🚧 |
| Budget management | 🚧 | 🚧 |
| Many keys support | 🚧 | 🚧 |
| Administrative endpoints | ✅ | 🚧 |
| Guardrails | ✅ | 🚧 |
| SSO | 🚧 | 🚧 |
| System Prompt (GuardRails) | ✅ | 🚧 |
| Integration | Basic | Full |
|---|---|---|
| Prometheus | ✅ | 🚧 |
| DataDog | 🚧 | 🚧 |
| OpenTelemetry | 🚧 | 🚧 |
✅ Supported 🚧 Coming soon