Okapi — DevOps skill for Claude Code
🦀 Rust 写的 AI API 中转网关:一个入口兼容 OpenAI / Claude / Gemini,统一接入 OpenAI、Anthropic、Gemini、Azure、Bedrock、Vertex;倍率计费每一分钱可解释,渠道池路由、管理后台 + 用户门户,Claude Code / Codex 直连,可从 new-api 迁移.
How to install Okapi
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open qiaojinxia/okapi and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Okapi does
🦀 Rust 写的 AI API 中转网关:一个入口兼容 OpenAI / Claude / Gemini,统一接入 OpenAI、Anthropic、Gemini、Azure、Bedrock、Vertex;倍率计费每一分钱可解释,渠道池路由、管理后台 + 用户门户,Claude Code / Codex 直连,可从 new-api 迁移。LLM API gateway in Rust: OpenAI/Anthropic/Gemini-compatible, 6 providers, precise billing, 10k+ RPS. A new-api / one-api alternative.
Alternatives in DevOps
- Claudable — Claudable is an open-source web builder that leverages local CLI agents, such as Claude Code, Codex, Gemini CL 4k ★
- Codeg — Aggregate and browse AI coding agent sessions (Claude Code, Codex, Gemini CLI, etc.) in one place 850 ★
- Chat — chat web app for teams, sass with user management and ratelimit, support chatgpt(openai & azure), claude, gemi 568 ★
README
Okapi
[](https://github.com/qiaojinxia/okapi/actions/workflows/ci.yml) [](LICENSE)
AI API 中转网关([ok-api](https://github.com/qiaojinxia/ok-api) v2 重构):Rust 单二进制三角色 (gateway / console / worker),倍率计费模型,PostgreSQL + Redis(+ 可选 ClickHouse / NATS), React 19 管理后台与用户门户。
一句话:把多家上游 LLM 供应商收敛成一个 OpenAI / Anthropic / Gemini 兼容入口,按倍率精确计费, 每一分钱可解释。
为什么是 Okapi
- 每一分钱可解释。 金额全程 i64 micro-USD 定点,计费路径禁浮点(CI 守卫拦截);每笔账落一份可回放的
pricing_snapshot;门户里任意一笔账单能展开成逐步算式,管理员改价前有定价模拟器预览新旧差异。 - 一个入口,四种协议互转。 入口 OpenAI / Anthropic
/v1/messages/ Gemini / Responses,上游 OpenAI / Anthropic / Gemini / Azure / Bedrock / Vertex 任意组合;reasoning_effort、thinking、reasoning:{…}三种写法归一成一条内部指令再按渠道方言展开——客户端不必知道这次会路由到哪家。 - 账目安全到多副本。 Redis Lua 原子预扣 → 上游调用 → usage 结算 → PG 事件溯源 + outbox;失败原额退款; 三方对账(事件重放 ↔ Redis 热余额 ↔ PG 快照)并可按账本修复;采集上游成本算毛利,负毛利自动熔断。
- 自用订阅凭证也能进网关。 站长自己的 Claude Pro / Max、ChatGPT Codex 订阅经 OAuth 登录成渠道, token 刷新走四步锁;Claude Code / Codex CLI 直接切到网关(实验性)。
- AI 直接管网关。 console 内置 MCP 服务(Streamable HTTP),22 个工具按 RBAC 裁剪;写操作过三道闸 (站点总开关 + 权限点 + dry-run / confirm)。
- 单二进制,热路径干净。
okapi gateway|console|worker|all一个二进制跑任意组合;gateway 只碰 Redis 与上游,零跨服务调用。容器 8 vCPU 压测 json 10874 / stream 10402 RPS 全 0 错误,SSE 2 万条持有 120s 无泄漏。
架构一图
flowchart LR
subgraph bin["okapi 单二进制"]
GW["gateway
鉴权 · 路由 · 预扣结算 · SSE 转发"]
CS["console
管理 / 门户 API · 定价发布 · MCP"]
WK["worker
relay · chsink · 对账 · 熔断 · 清扫"]
end
SDK["客户端
OpenAI · Anthropic · Gemini SDK
Claude Code · Codex CLI"] -->|"/v1/* · /v1beta/* · WS"| GW
UI["管理后台 · 用户门户 · MCP 客户端"] --> CS
GW -->|"六家方言"| UP["上游
OpenAI · Anthropic · Gemini
Azure · Bedrock · Vertex"]
GW <-->|"Lua 预扣 / 结算"| RD[("Redis")]
GW -->|"记账 + outbox"| PG[("PostgreSQL")]
CS --> PG
CS -->|"定价 epoch"| NATS{{"NATS"}}
Related Skills
Litellm
Python SDK, Proxy Server (LLM Gateway) to call 100+ LLM APIs in OpenAI format - Bedrock, Azure, OpenAI, Verte
LibreChat
Enhanced ChatGPT Clone: Features OpenAI, Assistants API, Azure, Groq, GPT-4 Vision, Mistral, Bing, Anthropic,
Swobu
Provider router and compatibility proxy for Claude Code, Codex and AI coding agents. Switch and fail over acro
Kiro Provider
Local gateway that serves your AWS Kiro accounts through OpenAI Responses and Anthropic Messages, for Codex CL
Claude Proxy
这是一个部署在 Cloudflare Workers 上的 TypeScript 项目,它充当一个代理服务器,能够将 Claude API 格式的请求无缝转换为 OpenAI API 格式。这使得任何与 Claude A
Semantic Code MCP
AI-powered semantic code search MCP server. Multi-agent concurrent access via Milvus Docker. Multi-provider em
Related Agents
LLM Orchestrator
Use this agent for LLM integration work — prompt engineering, multi-provider abstraction (OpenRouter, Gemini,
AI ML
AI/ML 통합 전문가 + LLM API 최신 모델/SDK 코딩 가이드. RAG 시스템, 문서 분석, OpenAI/Anthropic/Gemini/Ollama 최신 API 보장. "AI integra
AI Saglayici Uzmani
Anthropic Messages API ve OpenAI Codex App Server entegrasyonunun uzmanı — akış, araç döngüsü, hata/yeniden de