AI网关代理 是 AI Skill Hub 本期精选AI工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
AI网关代理 是一款基于 Go 开发的开源工具,专注于 ai、ai-gateway、ai-proxy 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
AI网关代理 是一款基于 Go 开发的开源工具,专注于 ai、ai-gateway、ai-proxy 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:go install(推荐) go install github.com/gumieri/nenya@latest # 方式二:从源码编译 git clone https://github.com/gumieri/nenya cd nenya go build -o nenya . # 方式三:下载预编译二进制 # 访问 Releases 页面下载对应平台二进制文件 # https://github.com/gumieri/nenya/releases
# 查看帮助 nenya --help # 基本运行 nenya [options] <input> # 详细使用说明请查阅文档 # https://github.com/gumieri/nenya
# nenya 配置说明 # 查看配置选项 nenya --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export NENYA_CONFIG="/path/to/config.yml"
<img alt="nenya" src="https://github.com/user-attachments/assets/bd518ded-2b65-42f9-866e-5a670cf9dbb1" />
LimitMEMLOCK=infinity and LimitCORE=0 in systemd/tmpNenya provides native packages for major Linux distributions and community package managers:
| Distribution | Command |
|---|---|
| **Debian/Ubuntu (.deb)** | Download nenya_<version>_linux_amd64.deb from the release page and run sudo dpkg -i |
| **Fedora/RHEL (.rpm)** | Download nenya-<version>.x86_64.rpm from the release page and run sudo rpm -i |
| **Arch Linux (.pkg.tar.zst)** | Download nenya-<version>-x86_64.pkg.tar.zst from the release page and run sudo pacman -U |
| **Arch Linux (AUR)** | yay -S nenya-bin (or your preferred AUR helper) |
| **Nix/NixOS** | Add gumieri/nur-packages to your NUR registry and use nenya |
All packages install the binary to /usr/bin/nenya and include systemd service and socket units. After install, enable and start:
sudo systemctl enable --now nenya.socket
sudo systemctl enable --now nenya.service
Nenya supports standard environment variables for deployment portability:
| Variable | Default | Description |
|---|---|---|
PORT | 8080 | Listening port (overrides server.listen_addr) |
HOST | — | Optional bind address (e.g. 127.0.0.1). Only used when combined with PORT |
NENYA_CONFIG_DIR | /etc/nenya/ | Configuration directory path |
NENYA_CONFIG_FILE | — | Single config file path (takes precedence over NENYA_CONFIG_DIR) |
NENYA_SECRETS_DIR | — | Secrets directory (overrides CREDENTIALS_DIRECTORY) |
Example usage:
PORT=9090 HOST=127.0.0.1 ./nenya --config /path/to/config.json
Or in Docker:
docker run -e PORT=9090 -p 9090:9090 ghcr.io/gumieri/nenya:latest
All /v1/* endpoints require Authorization: Bearer <client_token> or Bearer <api_key_token>. API keys support RBAC enforcement — agent scoping, endpoint allowlists, role-based permissions (admin bypasses all checks).
| Endpoint | Auth | Description |
|---|---|---|
POST /v1/chat/completions | Bearer + RBAC | OpenAI-compatible chat with SSE streaming, agent fallback, MCP multi-turn |
POST /v1/messages | Bearer + RBAC | Anthropic Messages API with bidirectional format conversion |
GET /v1/models | Bearer + RBAC | Live model catalog from discovered providers + static registry (context window, max tokens) |
POST /v1/embeddings | Bearer + RBAC | Passthrough proxy |
POST /v1/responses | Bearer + RBAC | Passthrough proxy |
POST /v1/images/generations | Bearer + RBAC | Image generation (OpenAI-compatible) |
POST /v1/audio/transcriptions | Bearer + RBAC | Audio transcription (Whisper-compatible, multipart support) |
POST /v1/audio/speech | Bearer + RBAC | Text-to-speech synthesis (OpenAI-compatible) |
POST /v1/moderations | Bearer + RBAC | Content moderation (OpenAI-compatible) |
POST /v1/rerank | Bearer + RBAC | Re-ranking API (Cohere/Jina/Voyage-compatible) |
POST /v1/a2a | Bearer + RBAC | Agent-to-Agent protocol (Google A2A) |
GET /v1/files | Bearer + RBAC | File listing, upload, retrieval, deletion |
POST /v1/batches | Bearer + RBAC | Batch API operations |
POST /proxy/{provider}/* | Bearer + RBAC | Arbitrary provider endpoint passthrough (all HTTP methods, SSE streaming) |
GET /healthz | None | Engine health probe |
GET /statsz | None | Token usage, circuit breaker state, MCP server status |
GET /metrics | None | Prometheus-compatible metrics |
GET /debug/pprof/* | Bearer | Go profiling endpoints (disabled by default, see debug.pprof_enabled) |
See docs/PASSTHROUGH_PROXY.md for detailed passthrough proxy usage.
高安全性AI API网关/代理,值得关注
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
经综合评估,AI网关代理 在AI工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | nenya |
| Topics | aiai-gatewayai-proxygo |
| GitHub | https://github.com/gumieri/nenya |
| License | Apache-2.0 |
| 语言 | Go |
收录时间:2026-06-06 · 更新时间:2026-06-06 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。