High-throughput Fastify HTTP AI Gateway proxy providing OpenAI-compatible endpoints with capability routing, auto-discovery, and automatic failover.
@free-ai-gateway/gateway is the production HTTP proxy application of Free-AI Gateway. Built on Fastify 5.x, it translates standard OpenAI API requests into capability queries, dispatches them through @free-ai-gateway/core, and returns compliant OpenAI responses to any SDK or frontend.
npm run devnpm run build
npm startdocker-compose up -dStandard OpenAI-compatible chat completion endpoint. Supports explicit model IDs or capability selectors (e.g. auto:reasoning, auto:tool_calling+structured_output).
curl http://localhost:3000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "auto:reasoning",
"messages": [
{ "role": "user", "content": "How many r'\''s are in strawberry?" }
]
}'curl http://localhost:3000/v1/embeddings \
-H "Content-Type: application/json" \
-d '{
"model": "auto:embedding",
"input": "The quick brown fox jumps over the lazy dog"
}'Returns an OpenAI-compliant list of all currently discovered provider models and capability routes.
Returns gateway uptime, active providers, and circuit breaker health statuses.
MIT © Md. Mahedi Zaman Zaber