Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台
Full-Stack MIT Open Source · 10x Rust Gateway · Turnkey Commercialization

Niu Documentation

Route every model API through one high-throughput gateway, orchestrate smart Model Pools, and run multi-tenant billing out of the box.

Whether you are connecting an app in five minutes, equipping coding agents via MCP, or self-hosting a commercial AI gateway for your customers, start from a verified guide below.

Choose your path

Jump straight to the workflow matching what you are building or operating today.

Send a real request in seconds

Call any authorized model route or published Model Pool using your workspace API key.

Open interactive API console
POST /v1/chat/completions · Call a model or published Model Pool slug
curl https://niu.io/v1/chat/completions \
  -H "Authorization: Bearer $NIU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "smart-coder",
    "messages": [
      { "role": "user", "content": "Explain Rust zero-copy SSE streaming in two sentences." }
    ]
  }'

Explore by capability

End-to-end guides covering application integration, commercial operations, and production reliability.

Contracts & Reference Specifications

Generated directly from checked-in OpenAPI contracts and TypeScript SDK declarations.

Download OpenAPI JSON
全栈 MIT 开源 · 10 倍性能 Rust 网关 · 丰富商业化功能

Niu 牛元文档

一套网关统一调度全球大模型与自定义模型池,内置多租户充值计费、权限隔离与全链路审计。

无论您是希望 5 分钟把应用或编程智能体接入大模型,还是私有化部署一套可直接对外商业化运营的企业级 AI 网关,都可以在这里找到清晰的实操指南与接口契约。

按角色快速上手

根据您当前的使用场景,直接进入对应的核心工作流。

几秒内发起首个真实请求

使用工作空间 API 密钥,零改造调用任意已授权模型路由或自定义模型池。

打开在线 API 调试台
POST /v1/chat/completions · 直接调用单模型或已发布的模型池名称
curl https://niu.io/v1/chat/completions \
  -H "Authorization: Bearer $NIU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "smart-coder",
    "messages": [
      { "role": "user", "content": "Explain Rust zero-copy SSE streaming in two sentences." }
    ]
  }'

全栈能力指南目录

覆盖应用开发集成、多租户商业化运营与生产级高可用运维的完整文档体系。

接口契约与技术参考

由代码仓库中的 OpenAPI 契约与 TypeScript SDK 源码自动编译生成,确保与线上实现严格一致。

下载 OpenAPI JSON