Skip to content

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:

text
/omnirouters models
/omnirouters balance
/omnirouters usage 202605220433553074851578268d9d6HOuv1cXR
/omnirouters diagnose 202605220433553074851578268d9d6HOuv1cXR

Why 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-Id to 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 assistantTypeNotes
Claude CodeTerminal AI coding assistantCan call /omnirouters during a conversation
Codex CLITerminal AI coding assistantCan call the script from the skill directory
OpenClawSelf-hosted AI assistant platformSupports skill-based conversation workflows
CursorAI-native code editorSuitable for skill protocol or scripted workflows
WindsurfAI code editorSuitable for skill protocol or scripted workflows
ClineVS Code AI extensionCan 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

CommandDescriptionUse case
/omnirouters modelsList available modelsSee models callable by the current account
/omnirouters groupsList usable groupsInspect account groups, ratios, and quota-related data
/omnirouters balanceCheck account balanceShow remaining quota, used quota, and request count
/omnirouters usage <request_id>Query per-request usageReconcile model, token, quota, and token counts by request id
/omnirouters diagnose <request_id>Diagnose one requestQuery related logs, separate consume/error/refund records, and produce a support summary

Token Management Commands

CommandDescriptionUse case
/omnirouters tokensList API tokensShow created tokens with masked keys
/omnirouters create-token <name> [--group=xxx]Create a new API tokenCreate independent keys for projects or apps
/omnirouters switch-group <token_id> <group>Switch token groupAdjust model access and group routing for a token
/omnirouters copy-token <token_id>Copy the real keyCopy the key to the system clipboard without printing it

Support Reply Commands

CommandDescriptionUse case
/omnirouters reply <situation>Draft a customer-facing replyGenerate customer-readable replies for billing, failed requests, 401, compatibility, and similar cases
/omnirouters help <question>Ask OmniRouters usage questionsGet 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:

bash
export OMNIROUTERS_BASE_URL=https://omnirouters.com
export OMNIROUTERS_ACCESS_TOKEN=your-profile-access-token
export OMNIROUTERS_USER_ID=1
VariableDescriptionExample
OMNIROUTERS_BASE_URLOmniRouters service URL, defaults to https://omnirouters.comhttps://omnirouters.com
OMNIROUTERS_ACCESS_TOKENProfile access token, not a model API keyyour-profile-access-token
OMNIROUTERS_USER_IDUser id used by the New-Api-User request header1
OMNIROUTERS_QUOTA_PER_UNITOptional conversion value, otherwise read from API or defaults to 500000500000

Start Using

After installing the skill and configuring environment variables, enter /omnirouters commands in a supported AI coding assistant.

Common examples:

text
/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:

bash
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:

bash
node scripts/omnirouters.mjs balance --json

Request-Level Reconciliation

To reconcile actual consumption for one model request, first capture the response header:

text
X-Oneapi-Request-Id: <request_id>

Then run:

bash
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:

bash
node scripts/omnirouters.mjs diagnose <request_id>

diagnose queries related logs and separates them into three categories:

Log typeMeaning
consume logThe request succeeded and produced actual usage
error logThe request failed and usually has no successful consume record
refund logQuota 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:

FileWhen to use
references/support-playbook.mdSupport workflow, customer reply rules, and required information checklist
references/api-errors.mdCustomer-facing explanations for 401, 403, 429, 400, 5xx, and unavailable models
references/model-compatibility.mdProtocol and model capability differences across OpenAI, Claude, Gemini, and other model families
references/actions.mdScript actions, endpoint map, and usage reconciliation rules

Runtime Requirements

OmniRouters Skill uses a Node.js script to call user APIs:

RuntimeVersionNotes
Node.js18+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.
  • tokens only shows masked keys.
  • create-token does not retrieve or print the real key after creation.
  • copy-token copies the real key to the system clipboard only.
  • usage preserves raw quota to avoid reconciliation errors caused by display conversions.
  • diagnose separates log facts, likely causes, and customer reply drafts.
  • reply avoids asking customers to send full API keys.
  • Error messages redact suspected secrets.

Learn More