newapi

Assistant for newapi (new-api), an open-source unified AI gateway platform (https://github.com/QuantumNous/new-api). Use when the user asks about New API, managing models, groups, balance, or tokens, or securely copying keys, applying them to config files, or using them in commands without exposing secrets.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "newapi" with this command: npx skills add calcium-ion/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.

Security Guidelines

This skill follows these security guidelines to protect API keys:

  1. Do not expose any sk- key value in chat, files, code, logs, or command arguments. To use keys securely, tell the user to run copy-token (clipboard), apply-token (config file), or exec-token (CLI command).
  2. All New API calls should go through the provided scripts (api.js, copy-key.js, inject-key.js, exec-token.js) rather than using curl, wget, fetch, or other HTTP clients to call New API endpoints directly.
  3. Do not read .env files, environment variables containing credentials, or clipboard contents after copy-key.js.
  4. When working with config files that may contain API keys, use inject-key.js --scan to get a sanitized view rather than reading them directly. Note: scan-config is best-effort and not guaranteed to redact every secret in every format.
  5. After create-token, do not make any follow-up call to retrieve or list the key. Report success and tell the user they can use copy-token <id>, apply-token <id> <file>, or exec-token <id> <command> to securely use the key.
  6. Do not modify the security scripts to disable masking or redirect output.

How to Execute

  1. First invocation only — read ${CLAUDE_SKILL_DIR}/docs/setup.md for configuration, auth headers, and runtime detection.
  2. Match the action from the table below.
  3. Read the corresponding doc file for detailed steps.
  4. If no arguments or unrecognized action, show the help table below.
  5. 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 ${CLAUDE_SKILL_DIR}/docs/help.md and follow the instructions there.

Actions

ActionDescriptionDetails
modelsList available modelsdocs/actions-query.md
groupsList user groupsdocs/actions-query.md
balanceShow account balancedocs/actions-query.md
tokensList API tokensdocs/actions-token.md
create-tokenCreate a new API tokendocs/actions-token.md
switch-groupChange a token's groupdocs/actions-token.md
copy-tokenCopy real key to clipboard (never shown)docs/actions-token.md
apply-tokenApply token key to a config file securelydocs/actions-config.md
exec-tokenExecute a command with the token key securely substituteddocs/actions-exec.md
scan-configInspect config structure with best-effort secret redactiondocs/actions-config.md
helpAnswer questions about newapidocs/help.md

help (or no arguments) — Show available actions

ActionUsageDescription
models/newapi modelsList available models
groups/newapi groupsList user groups
balance/newapi balanceShow account balance
tokens/newapi tokensList API tokens
create-token/newapi create-token <name> [--group=xxx]Create a new API token
switch-group/newapi switch-group <token_id> <group>Change a token's group
copy-token/newapi copy-token <token_id>Copy real key to clipboard (never shown)
apply-token/newapi apply-token <token_id> <file_path>Apply token key to a config file securely
exec-token/newapi exec-token <token_id> <command...>Execute a command with the token key securely substituted
scan-config/newapi scan-config <file_path>Inspect config structure with best-effort secret redaction
help/newapi help <question>Answer questions about newapi

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Dlazy One Click Generation

Short-video generation pipeline. Configure subject, script, TTS voiceover, BGM, and subtitle styling.

Registry SourceRecently Updated
Coding

Dlazy Video Generate

Video generation skill. Automatically selects the best dlazy CLI video model based on the prompt.

Registry SourceRecently Updated
Coding

Dlazy Audio Generate

Audio generation skill. Automatically selects the best dlazy CLI audio/TTS model based on the prompt. 音频生成技能。根据提示词自动选择最佳的 dlazy CLI 音频/TTS 模型。

Registry SourceRecently Updated
Coding

Dlazy Vidu Audio Clone

Clone voice and generate new text reading audio with one click using Vidu Audio Clone.

Registry SourceRecently Updated