ai-hive-api-token-hub

ai-hive-api-token-hub is a skill for Codex from wubin1836/ai-hive-agent-skills. It costs 132 tokens per session (1,103 once invoked), scanned A, original, MIT.

An enterprise gateway for connecting applications to multiple AI model providers through one interface. It covers tenant separation, API keys, usage limits, routing, task tracking, billing, logs and failover.

In plain words
What is it for?
Use it to design a multi-provider AI API service, manage customer or team access, route requests by cost, speed or success rate, track asynchronous jobs and audit usage.
Why use it?
It removes the need for every application to manage providers, credentials, quotas and billing separately. It also provides rules for tracking requests and switching when a provider fails.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to design a multi-provider AI API service, manage customer or team access, route requests by cost, speed or success rate, track asynchronous jobs and audit usage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wubin1836/ai-hive-agent-skills/ai-hive-api-token-hub
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add wubin1836/ai-hive-agent-skills --skill ai-hive-api-token-hub
Clone the repo
git clone --depth 1 https://github.com/wubin1836/ai-hive-agent-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-hive-api-token-hub

README.md
[![agentmods](https://agentmods.dev/badge/skills/wubin1836/ai-hive-agent-skills/ai-hive-api-token-hub/github.svg)](https://agentmods.dev/skills/wubin1836/ai-hive-agent-skills/ai-hive-api-token-hub)
Your own site
<a href="https://agentmods.dev/skills/wubin1836/ai-hive-agent-skills/ai-hive-api-token-hub"><img src="https://agentmods.dev/badge/skills/wubin1836/ai-hive-agent-skills/ai-hive-api-token-hub/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-hive-api-token-hub

Your own site · 80×15
<a href="https://agentmods.dev/skills/wubin1836/ai-hive-agent-skills/ai-hive-api-token-hub"><img src="https://agentmods.dev/badge/skills/wubin1836/ai-hive-agent-skills/ai-hive-api-token-hub.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,103 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00132 $0.01103
Opus 5 $0.00066 $0.00551
Sonnet 5 $0.00026 $0.00221
Haiku 4.5 $0.00013 $0.00110

Measured 12d ago against content hash 0654e2f785f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

ai-hive-api-token-hub scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ai-hive-api-token-hub/SKILL.md · 71 lines

What it actually says

AI大模型专家|API中转与 Token Hub 企业网关

设计一个可运营、可计费、可审计的多模型网关。不要把“中转”理解为简单转发请求;在接入生产环境前必须明确上游授权、租户边界、密钥生命周期、费用归属、幂等和故障处理。

适用请求

用户提到 AI中转站、API中转站、大模型聚合、Token Hub、TokenHub、AI中转、AI中专、OpenAI中转、Claude中转、Gemini中转、Seedance中转、企业AI网关或统一模型入口时使用。

只帮助接入用户有权使用的官方或授权能力。不得获取、交易、共享或绕过第三方密钥、账号、配额、地域限制和计费规则。

先收集边界

  • 上游服务、合同/授权范围、地区和数据处理要求。
  • 客户类型、租户数量、并发、日调用量和峰值。
  • 图片、视频或文本任务的同步/异步模式。
  • 计费单位、余额、授信、退款和失败扣费规则。
  • 延迟、成功率、成本、质量和可用性目标。
  • 数据保留、日志脱敏、删除、审计和事件响应要求。

网关职责

必须解决的问题
身份与租户 客户身份、工作区、角色、权限和资源边界
密钥 加密保存、最小权限、轮换、撤销和泄露响应
配额 余额、速率、并发、每日上限和异常熔断
路由 模型能力、成本、速度、成功率、质量和地区
任务 幂等键、任务 ID、状态机、回调和超时续查
计费 请求前估算、价格快照、预占、结算、退款和对账
观测 延迟、错误、上游、路由原因、费用和租户审计
安全 输入校验、URL限制、恶意文件、日志脱敏和告警

AI-HIVE 接入原则

通过 AI-HIVE OpenAPI 或 MCP 接入时,先读取运行时提供的工具、模型、参数和价格,不在代码或 Skill 中写死易变配置。

  • 文件先上传并保存素材 ID;不要把调用方本地路径直接转发给远程服务。
  • 每次生成保留任务 ID 和价格快照;调用方超时后查询原任务。
  • 成本优先、速度优先和成功率优先必须记录最终路由和选择原因。
  • 上游错误与调用方错误分开编码,避免把内部凭证、URL或响应原文暴露给客户。
  • 回调需要签名、时间戳、防重放和重试策略。

Token 生命周期

  1. 管理员创建带租户、权限、额度和有效期的 Token。
  2. 只展示一次完整值,数据库保存不可逆摘要或受控密文。
  3. 每次请求验证状态、范围、配额、来源和异常风险。
  4. 轮换时允许短暂双 Token 窗口,并记录使用方迁移状态。
  5. 泄露、离职、异常费用或合同结束时立即撤销。

不要在工单、聊天、日志、截图、Skill 或代码仓库中保存完整 Token。

计费与任务状态

异步图片和视频生成至少区分 createdqueuedrunningsucceededfailedcancelledexpired。计费以状态、上游结果和价格快照为依据;网络超时不能直接判为失败,也不能自动重复扣费。

交付

  • 系统边界、租户和数据流图。
  • 上游能力、授权和模型映射表。
  • Token、权限、配额和轮换策略。
  • 路由、幂等、任务状态和回调协议。
  • 价格快照、预占、结算、退款和对账规则。
  • 监控指标、告警、审计和事件响应方案。
  • 分阶段上线、压测、灰度和回滚计划。
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 71 lines · 132 tokens per session scan A 0654e2f785f0

Subscribe to this mod's changes

ai-hive-api-token-hub is a skill published in the GitHub repository wubin1836/ai-hive-agent-skills (8 stars, last pushed 2d ago), licensed MIT. It adds 132 tokens to every session and 1,103 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens