Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next AI Gateway

简体中文

A TypeScript + Fastify AI protocol gateway for OpenAI, Anthropic, Gemini, MCP Gateway, and event-driven agent workflows.

Quick Start

npm install
npm run dev

Production:

npm run build
npm start

Docker Compose:

export AUTH_STATIC_API_KEYS='replace-with-gateway-client-key'
export MANAGER_API_KEY='replace-with-manager-admin-key'
export OPENAI_API_KEY='sk-...'
export MCP_REMOTE_KEY='replace-with-strong-mcp-key'
export TOOLHUB_MANAGEMENT_TOKEN='replace-with-toolhub-admin-key'
export MINIMAX_API_KEY='replace-with-minimax-api-key'
export ANTHROPIC_API_KEY='replace-with-tool-search-provider-key'
docker compose up --build

Features

  • OpenAI chat/completions, responses, embeddings, moderations, images/generations, images/edits, videos, videos/:id, and videos/:id/content
  • xAI videos/generations and videos/:id, with OpenAI ↔ xAI video request/response conversion
  • Authenticated, encrypted, expiring video IDs preserve routing/model/owner context without exposing it; configure a shared media.videoIdSigningSecret for multi-instance deployments
  • The gateway does not hard-code an OpenAI video model. OpenAI has announced removal of the Videos API, sora-2, and sora-2-pro on September 24, 2026, with no replacement; pin provider models explicitly and plan migrations accordingly (official deprecation notice)
  • Anthropic messages
  • Gemini generateContent / streamGenerateContent
  • Cross-protocol conversion, provider fallback, provider plugins, health checks, metrics, idempotency, concurrency isolation, circuit breaking, and retries
  • MCP Gateway, MCP WebSocket RPC, and event-driven agents
  • HTTP / WebSocket / gRPC / stdio external config sources and event delivery

Documentation

npm Publishing

This repository includes .npmignore, prepack builds, GitHub Actions CI/CD, and a release command that publishes a specific npm version:

npm run release -- 1.2.3

See Publishing and CI/CD for more options.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages