ai-gateway logo

ai-gateway

Enrichment pending
ferro-labs/ai-gateway

Unified AI Gateway for 30+ LLMs (OpenAI, Anthropic, Bedrock, Azure etc) with Caching, Guardrails, A/B test & cost controls. Go-native Fastest & Scalable AI Gateway LiteLLM & Kong AI Gateway alternativ

GraphCanon updated today · GitHub synced today

180 stars31 forksLast push 1d Go Apache-2.0

Verify the decision

Maintenance and security

Full trust report
Maintenance
Very active (1d since push)
As of today
Provenance
Not a fork · Organization account
As of today
Security (OSV)
7 low (7 low)
As of today

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Install

go get github.com/ferro-labs/ai-gateway
pkg.go.dev

Similar tools

Same-category neighbours. No typed graph edges are catalogued for this tool yet.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

Unified AI Gateway for 30+ LLMs (OpenAI, Anthropic, Bedrock, Azure etc) with Caching, Guardrails, A/B test & cost controls. Go-native Fastest & Scalable AI Gateway LiteLLM & Kong AI Gateway alternative.

Capability facts

Deploy
Self-host

Source: dockerfile:Dockerfile · Jul 15, 2026

Docker
Dockerfile present

Source: dockerfile:Dockerfile · Jul 15, 2026

Languages
go

Source: github.language · Jul 15, 2026

Categories

Tags

README

Quick Start

Get from zero to first request in under 2 minutes.


Option B — Docker

docker pull ghcr.io/ferro-labs/ai-gateway:latest
docker run -p 8080:8080 \
  -e OPENAI_API_KEY=sk-your-key \
  -e MASTER_KEY=fgw_your-master-key \
  ghcr.io/ferro-labs/ai-gateway:latest

Option D — Docker Compose (dev & prod)

The repo ships three Compose files that follow the standard override pattern:

FilePurpose
docker-compose.ymlBase — shared image, port mapping, all provider env var stubs
docker-compose.dev.ymlDev — builds from source, debug logging, live config mount, Ollama host access
docker-compose.prod.ymlProd — pinned image tag, restart policy, health check, resource limits, log rotation

Dev (builds from source):

docker compose -f docker-compose.yml -f docker-compose.dev.yml up

Prod (pin to a release tag — never use latest in production):


---

### Docker Compose (with PostgreSQL)

```yaml
services:
  ferrogw:
    image: ghcr.io/ferro-labs/ai-gateway:latest
    ports:
      - "8080:8080"
    environment:
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - GATEWAY_CONFIG=/etc/ferrogw/config.yaml
      - CONFIG_STORE_BACKEND=postgres
      - CONFIG_STORE_DSN=postgresql://ferrogw:ferrogw@db:5432/ferrogw?sslmode=disable
      - API_KEY_STORE_BACKEND=postgres
      - API_KEY_STORE_DSN=postgresql://ferrogw:ferrogw@db:5432/ferrogw?sslmode=disable
      - REQUEST_LOG_STORE_BACKEND=postgres
      - REQUEST_LOG_STORE_DSN=postgresql://ferrogw:ferrogw@db:5432/ferrogw?sslmode=disable
    volumes:
      - ./config.yaml:/etc/ferrogw/config.yaml:ro
    depends_on:
      - db

  db:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: ferrogw
      POSTGRES_PASSWORD: ferrogw
      POSTGRES_DB: ferrogw
    volumes:
      - pgdata:/var/lib/postgresql/data

volumes:
  pgdata:

Gains: failover, caching, rate limiting, cost tracking

client = OpenAI( base_url="http://localhost:8080/v1", api_key="your-ferro-api-key", )


Ferro Labs AI Gateway handles provider failover automatically — if OpenAI is down, your requests fall through to Anthropic or Gemini with zero application code changes.

---

---

## License

Apache 2.0 — see [LICENSE](LICENSE).

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.