OmniRouters Support
OmniRouters Support is a user-level skill for OmniRouters after-sales and technical support workflows. It is designed for Claude Code, Codex, OpenClaw, and other AI coding assistants, allowing support staff to diagnose customer requests, reconcile per-request usage, inspect models/groups/balance/tokens, and draft customer-facing replies.
INFO
The OmniRouters Support Skill is designed for OmniRouters operated-platform support scenarios. It avoids printing real sk- keys in terminal output, chat, logs, or files; sensitive operations such as copying token keys use safer channels, and customer replies avoid internal routes, upstream keys, and protected implementation details.
Source / Download
What Is OmniRouters Support Skill
OmniRouters Support Skill is a lightweight extension for AI coding assistants. After installation, the assistant can call the bundled script during a conversation and access OmniRouters user APIs for model lookup, group lookup, balance checks, token management, request-level billing reconciliation, failed-request diagnosis, and customer reply drafting.
It reduces context switching between the editor, terminal, and OmniRouters dashboard. You can ask from the current coding context:
/omnirouters models
/omnirouters balance
/omnirouters usage 202605220433553074851578268d9d6HOuv1cXR
/omnirouters diagnose 202605220433553074851578268d9d6HOuv1cXRWhy Use Skills
- Zero switching: handle OmniRouters support questions directly from Claude Code, Codex, OpenClaw, and similar assistants.
- Built-in support operations: inspect models, groups, balance, and tokens; create or switch API tokens.
- Request-level reconciliation: use
X-Oneapi-Request-Idto check actual consumption or failure cause for one request. - Customer reply drafts: generate concise, actionable replies for common support situations.
- Security first: token lists only show masked keys; real
sk-keys are not printed, and customer replies filter internal details. - Ready to run: the skill includes a Node.js script, so you do not need to write API calls by hand.
Supported AI Editors
| AI editor / coding assistant | Type | Notes |
|---|---|---|
| Claude Code | Terminal AI coding assistant | Can call /omnirouters during a conversation |
| Codex CLI | Terminal AI coding assistant | Can call the script from the skill directory |
| OpenClaw | Self-hosted AI assistant platform | Supports skill-based conversation workflows |
| Cursor | AI-native code editor | Suitable for skill protocol or scripted workflows |
| Windsurf | AI code editor | Suitable for skill protocol or scripted workflows |
| Cline | VS Code AI extension | Can reuse the script inside project workflows |
Any AI tool that supports the Skills protocol or can read a skill directory can use this skill to call OmniRouters user APIs.
Commands and Capabilities
Query Commands
| Command | Description | Use case |
|---|---|---|
/omnirouters models | List available models | See models callable by the current account |
/omnirouters groups | List usable groups | Inspect account groups, ratios, and quota-related data |
/omnirouters balance | Check account balance | Show remaining quota, used quota, and request count |
/omnirouters usage <request_id> | Query per-request usage | Reconcile model, token, quota, and token counts by request id |
/omnirouters diagnose <request_id> | Diagnose one request | Query related logs, separate consume/error/refund records, and produce a support summary |
Token Management Commands
| Command | Description | Use case |
|---|---|---|
/omnirouters tokens | List API tokens | Show created tokens with masked keys |
/omnirouters create-token <name> [--group=xxx] | Create a new API token | Create independent keys for projects or apps |
/omnirouters switch-group <token_id> <group> | Switch token group | Adjust model access and group routing for a token |
/omnirouters copy-token <token_id> | Copy the real key | Copy the key to the system clipboard without printing it |
Support Reply Commands
| Command | Description | Use case |
|---|---|---|
/omnirouters reply <situation> | Draft a customer-facing reply | Generate customer-readable replies for billing, failed requests, 401, compatibility, and similar cases |
/omnirouters help <question> | Ask OmniRouters usage questions | Get help for API calls, groups, tokens, usage, and troubleshooting |
Installation and Configuration
Install the Skill
Download the package and place the omnirouters directory in your AI coding assistant's Skills directory:
If your tool supports installing a skill from a local directory, point it to skills/omnirouters in this repository.
Set Environment Variables
OmniRouters Skill needs the following environment variables to connect to your OmniRouters account:
export OMNIROUTERS_BASE_URL=https://omnirouters.com
export OMNIROUTERS_ACCESS_TOKEN=your-profile-access-token
export OMNIROUTERS_USER_ID=1| Variable | Description | Example |
|---|---|---|
OMNIROUTERS_BASE_URL | OmniRouters service URL, defaults to https://omnirouters.com | https://omnirouters.com |
OMNIROUTERS_ACCESS_TOKEN | Profile access token, not a model API key | your-profile-access-token |
OMNIROUTERS_USER_ID | User id used by the New-Api-User request header | 1 |
OMNIROUTERS_QUOTA_PER_UNIT | Optional conversion value, otherwise read from API or defaults to 500000 | 500000 |
Start Using
After installing the skill and configuring environment variables, enter /omnirouters commands in a supported AI coding assistant.
Common examples:
/omnirouters models
/omnirouters groups
/omnirouters balance
/omnirouters tokens
/omnirouters create-token my-app --group default
/omnirouters switch-group 7 auto
/omnirouters usage 202605220433553074851578268d9d6HOuv1cXR
/omnirouters diagnose 202605220433553074851578268d9d6HOuv1cXR
/omnirouters copy-token 7
/omnirouters reply Customer says the request failed but has no request_id
/omnirouters help How do I check the actual cost of one request?To run the script directly from a terminal, enter the skill directory and run:
node scripts/omnirouters.mjs models
node scripts/omnirouters.mjs balance
node scripts/omnirouters.mjs tokens --page-size 20
node scripts/omnirouters.mjs usage <request_id>
node scripts/omnirouters.mjs diagnose <request_id>
node scripts/omnirouters.mjs reply "Customer asks why they were charged"Add --json to print sanitized JSON:
node scripts/omnirouters.mjs balance --jsonRequest-Level Reconciliation
To reconcile actual consumption for one model request, first capture the response header:
X-Oneapi-Request-Id: <request_id>Then run:
node scripts/omnirouters.mjs usage <request_id>In the result, quota is the final raw integer consumption for that request. USD conversion in docs or script output is only a display helper; keep the raw quota for settlement, audit exports, and reconciliation.
Failed Request Diagnosis
If a customer reports a failed request, abnormal billing, or uncertainty about a call, ask for the X-Oneapi-Request-Id response header first, then run:
node scripts/omnirouters.mjs diagnose <request_id>diagnose queries related logs and separates them into three categories:
| Log type | Meaning |
|---|---|
| consume log | The request succeeded and produced actual usage |
| error log | The request failed and usually has no successful consume record |
| refund log | Quota has already been returned by the system |
The output includes a fact summary, likely cause, and customer reply draft. When replying to customers, keep confirmed log facts separate from likely interpretations.
Support References
The skill includes bundled support references that the assistant can read for the relevant scenario:
| File | When to use |
|---|---|
references/support-playbook.md | Support workflow, customer reply rules, and required information checklist |
references/api-errors.md | Customer-facing explanations for 401, 403, 429, 400, 5xx, and unavailable models |
references/model-compatibility.md | Protocol and model capability differences across OpenAI, Claude, Gemini, and other model families |
references/actions.md | Script actions, endpoint map, and usage reconciliation rules |
Runtime Requirements
OmniRouters Skill uses a Node.js script to call user APIs:
| Runtime | Version | Notes |
|---|---|---|
| Node.js | 18+ | Current LTS is recommended |
The script uses fetch for OmniRouters API calls and the system clipboard for copy-token.
Security Mechanisms
- Never expose real
sk-keys in chat, terminal output, logs, files, or command arguments. tokensonly shows masked keys.create-tokendoes not retrieve or print the real key after creation.copy-tokencopies the real key to the system clipboard only.usagepreserves rawquotato avoid reconciliation errors caused by display conversions.diagnoseseparates log facts, likely causes, and customer reply drafts.replyavoids asking customers to send full API keys.- Error messages redact suspected secrets.
