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.
Install
npx skills add https://github.com/quantumnous/skills --skill newapiSKILL.md
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:
- Do not expose any
sk-key value in chat, files, code, logs, or command arguments. To use keys securely, tell the user to runcopy-token(clipboard),apply-token(config file), orexec-token(CLI command). - All New API calls should go through the provided scripts (
api.js,copy-key.js,inject-key.js,exec-token.js) rather than usingcurl,wget,fetch, or other HTTP clients to call New API endpoints directly. - Do not read
.envfiles, environment variables containing credentials, or clipboard contents aftercopy-key.js. - When working with config files that may contain API keys, use
inject-key.js --scanto get a sanitized view rather than reading them directly. Note:scan-configis best-effort and not guaranteed to redact every secret in every format. - After
create-token, do not make any follow-up call to retrieve or list the key. Report success and tell the user they can usecopy-token <id>,apply-token <id> <file>, orexec-token <id> <command>to securely use the key. - Do not modify the security scripts to disable masking or redirect output.
How to Execute
- First invocation only — read
${CLAUDE_SKILL_DIR}/docs/setup.mdfor configuration, auth headers, and runtime detection. - 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
${CLAUDE_SKILL_DIR}/docs/help.mdand follow the instructions there.
Actions
| Action | Description | Details |
|---|---|---|
models |
List available models | docs/actions-query.md |
groups |
List user groups | docs/actions-query.md |
balance |
Show account balance | docs/actions-query.md |
tokens |
List API tokens | docs/actions-token.md |
create-token |
Create a new API token | docs/actions-token.md |
switch-group |
Change a token's group | docs/actions-token.md |
copy-token |
Copy real key to clipboard (never shown) | docs/actions-token.md |
apply-token |
Apply token key to a config file securely | docs/actions-config.md |
exec-token |
Execute a command with the token key securely substituted | docs/actions-exec.md |
scan-config |
Inspect config structure with best-effort secret redaction | docs/actions-config.md |
help |
Answer questions about newapi | docs/help.md |
help (or no arguments) — Show available actions
| Action | Usage | Description |
|---|---|---|
models |
/newapi models |
List available models |
groups |
/newapi groups |
List user groups |
balance |
/newapi balance |
Show account balance |
tokens |
/newapi tokens |
List 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 |
Related skills
entra-app-registrationmicrosoft606KGuides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.azure-messagingmicrosoft595KTroubleshoot and resolve issues with Azure Messaging SDKs for Event Hubs and Service Bus. Covers connection failures, authentication errors, message processing issues, and SDK configuration problems. WHEN: event hub SDK error, service bus SDK issue, messaging connection failure, AMQP error, event processor host issue, message lock lost, message lock expired, lock renewal, lock renewal batch, send timeout, receiver disconnected, SDK troubleshooting, azure messaging SDK, event hub consumer, servicentra-agent-idmicrosoft328KProvision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmi_path, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmi_path token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registsupabasesupabase298KUse when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, declarative schemas, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector); deb
