newapi
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSKILL: newapi
SKILL: newapi
newapi (new-api) is an open-source unified AI gateway platform.
It aggregates multiple model providers behind OpenAI / Claude / Gemini compatible interfaces, and provides model, token, group, and balance management.
newapi(new-api)是一个开源的统一AI网关平台。它通过兼容OpenAI / Claude / Gemini的接口聚合了多家模型提供商,并提供模型、令牌、群组和余额管理功能。
Security Guidelines
安全准则
This skill follows these security guidelines to protect API keys:
- Do not expose any key value in chat, files, code, logs, or command arguments. To use keys securely, tell the user to run
sk-(clipboard),copy-token(config file), orapply-token(CLI command).exec-token - All New API calls should go through the provided scripts (,
api.js,copy-key.js,inject-key.js) rather than usingexec-token.js,curl,wget, or other HTTP clients to call New API endpoints directly.fetch - Do not read files, environment variables containing credentials, or clipboard contents after
.env.copy-key.js - When working with config files that may contain API keys, use to get a sanitized view rather than reading them directly. Note:
inject-key.js --scanis best-effort and not guaranteed to redact every secret in every format.scan-config - After , do not make any follow-up call to retrieve or list the key. Report success and tell the user they can use
create-token,copy-token <id>, orapply-token <id> <file>to securely use the key.exec-token <id> <command> - Do not modify the security scripts to disable masking or redirect output.
本技能遵循以下安全准则以保护API密钥:
- 不得在聊天内容、文件、代码、日志或命令参数中暴露任何格式的密钥值。如需安全使用密钥,请告知用户运行
sk-(复制到剪贴板)、copy-token(写入配置文件)或apply-token(在CLI命令中使用)。exec-token - 所有New API调用都应通过提供的脚本(、
api.js、copy-key.js、inject-key.js)执行,而非直接使用exec-token.js、curl、wget或其他HTTP客户端调用New API端点。fetch - 不得读取文件、包含凭证的环境变量,或
.env执行后的剪贴板内容。copy-key.js - 当处理可能包含API密钥的配置文件时,请使用获取经过脱敏的视图,而非直接读取文件。注意:
inject-key.js --scan仅为尽力而为的脱敏操作,无法保证对所有格式的敏感信息都能完成脱敏。scan-config - 执行后,不得进行任何后续调用以检索或列出该密钥。只需告知用户操作成功,并说明他们可以使用
create-token、copy-token <id>或apply-token <id> <file>来安全使用该密钥。exec-token <id> <command> - 不得修改安全脚本以禁用掩码功能或重定向输出。
How to Execute
执行步骤
- First invocation only — read for configuration, auth headers, and runtime detection.
${CLAUDE_SKILL_DIR}/docs/setup.md - Match the action from the table below.
- Read the corresponding doc file for detailed steps.
- If no arguments or unrecognized action, show the help table below.
- If the user asks about newapi (what it is, how to use a command, or any API usage question like calling a specific model format) — read and follow the instructions there.
${CLAUDE_SKILL_DIR}/docs/help.md
- 仅首次调用时执行 — 阅读以了解配置、认证头和运行时检测相关内容。
${CLAUDE_SKILL_DIR}/docs/setup.md - 匹配下表中的操作类型。
- 阅读对应的文档文件以获取详细步骤。
- 若未提供参数或操作无法识别,显示下方的帮助表格。
- 若用户询问newapi相关问题(如是什么、如何使用某个命令、或任何API使用问题如调用特定模型格式),请阅读并按照其中的说明操作。
${CLAUDE_SKILL_DIR}/docs/help.md
Actions
操作列表
| Action | Description | Details |
|---|---|---|
| List available models | |
| List user groups | |
| Show account balance | |
| List API tokens | |
| Create a new API token | |
| Change a token's group | |
| Copy real key to clipboard (never shown) | |
| Apply token key to a config file securely | |
| Execute a command with the token key securely substituted | |
| Inspect config structure with best-effort secret redaction | |
| Answer questions about newapi | |
| 操作 | 描述 | 详情文档 |
|---|---|---|
| 列出可用模型 | |
| 列出用户群组 | |
| 显示账户余额 | |
| 列出API令牌 | |
| 创建新的API令牌 | |
| 修改令牌所属群组 | |
| 将真实密钥复制到剪贴板(永不显示明文) | |
| 安全地将令牌密钥应用到配置文件 | |
| 执行命令并安全替换令牌密钥 | |
| 检查配置文件结构并尽力脱敏敏感信息 | |
| 解答newapi相关问题 | |
help
(or no arguments) — Show available actions
helphelp
(或无参数)—— 显示可用操作
help| Action | Usage | Description |
|---|---|---|
| | List available models |
| | List user groups |
| | Show account balance |
| | List API tokens |
| | Create a new API token |
| | Change a token's group |
| | Copy real key to clipboard (never shown) |
| | Apply token key to a config file securely |
| | Execute a command with the token key securely substituted |
| | Inspect config structure with best-effort secret redaction |
| | Answer questions about newapi |
| 操作 | 使用方式 | 描述 |
|---|---|---|
| | 列出可用模型 |
| | 列出用户群组 |
| | 显示账户余额 |
| | 列出API令牌 |
| | 创建新的API令牌 |
| | 修改令牌所属群组 |
| | 将真实密钥复制到剪贴板(永不显示明文) |
| | 安全地将令牌密钥应用到配置文件 |
| | 执行命令并安全替换令牌密钥 |
| | 检查配置文件结构并尽力脱敏敏感信息 |
| | 解答newapi相关问题 |