Agent Skills › decolua/9router

decolua/9router

GitHub

通过9Router代理调用LLM,支持OpenAI和Anthropic格式,具备流式输出与多提供商自动降级功能。适用于问答、代码生成、文本摘要及提示词执行。

9 skills 23,053

Install All Skills

npx skills add decolua/9router --all -g -y
More Options

List skills in collection

npx skills add decolua/9router --list

Skills in Collection (9)

通过9Router代理调用LLM,支持OpenAI和Anthropic格式,具备流式输出与多提供商自动降级功能。适用于问答、代码生成、文本摘要及提示词执行。
用户要求使用大语言模型进行对话或问答 用户需要生成代码 用户请求总结文本内容 用户希望通过9Router运行特定提示词
skills/9router-chat/SKILL.md
npx skills add decolua/9router --skill 9router-chat -g -y
SKILL.md
Frontmatter
{
    "name": "9router-chat",
    "description": "Chat \/ code generation via 9Router using OpenAI \/v1\/chat\/completions or Anthropic \/v1\/messages format with streaming + auto-fallback combos. Use when the user wants to ask an LLM, generate code, summarize text, or run prompts through 9Router."
}

9Router — Chat

Requires NINEROUTER_URL (and NINEROUTER_KEY if auth enabled). See https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router/SKILL.md for setup.

Endpoints

  • POST $NINEROUTER_URL/v1/chat/completions — OpenAI format
  • POST $NINEROUTER_URL/v1/messages — Anthropic format

Discover

curl $NINEROUTER_URL/v1/models | jq '.data[].id'
# Per-model metadata (contextWindow, params)
curl "$NINEROUTER_URL/v1/models/info?id=openai/gpt-4o"

Combos (e.g. vip, mycodex) auto-fallback through multiple providers.

OpenAI format

curl -X POST $NINEROUTER_URL/v1/chat/completions \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/gpt-5","messages":[{"role":"user","content":"Hi"}],"stream":false}'

JS (OpenAI SDK):

import OpenAI from "openai";
const client = new OpenAI({ baseURL: `${process.env.NINEROUTER_URL}/v1`, apiKey: process.env.NINEROUTER_KEY });
const res = await client.chat.completions.create({
  model: "openai/gpt-5",
  messages: [{ role: "user", content: "Hi" }],
  stream: true,
});
for await (const chunk of res) process.stdout.write(chunk.choices[0]?.delta?.content || "");

Anthropic format

curl -X POST $NINEROUTER_URL/v1/messages \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"cc/claude-opus-4-7","max_tokens":1024,"messages":[{"role":"user","content":"Hi"}]}'

Response shape

OpenAI (/v1/chat/completions):

{ "id": "chatcmpl-...", "object": "chat.completion", "model": "openai/gpt-5",
  "choices": [{ "index": 0, "message": { "role": "assistant", "content": "Hello!" }, "finish_reason": "stop" }],
  "usage": { "prompt_tokens": 8, "completion_tokens": 2, "total_tokens": 10 } }

Streaming (stream:true) emits SSE: data: {choices:[{delta:{content:"..."}}]}\n\n ... data: [DONE]\n\n.

Anthropic (/v1/messages):

{ "id": "msg_...", "type": "message", "role": "assistant", "model": "cc/claude-opus-4-7",
  "content": [{ "type": "text", "text": "Hello!" }],
  "stop_reason": "end_turn", "usage": { "input_tokens": 8, "output_tokens": 2 } }
通过9Router统一接口调用OpenAI、Gemini等多厂商模型生成向量嵌入,支持RAG和语义搜索。提供批量处理、格式配置及多提供商适配说明,助力构建向量检索系统。
需要生成文本向量或嵌入表示 执行语义相似度计算 构建或优化RAG(检索增强生成)流程 进行语义搜索任务
skills/9router-embeddings/SKILL.md
npx skills add decolua/9router --skill 9router-embeddings -g -y
SKILL.md
Frontmatter
{
    "name": "9router-embeddings",
    "description": "Generate vector embeddings via 9Router \/v1\/embeddings using OpenAI \/ Gemini \/ Mistral \/ Voyage \/ Nvidia \/ GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text."
}

9Router — Embeddings

Requires NINEROUTER_URL (and NINEROUTER_KEY if auth enabled). See https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router/SKILL.md for setup.

Discover

curl $NINEROUTER_URL/v1/models/embedding | jq '.data[].id'
# Per-model dimensions
curl "$NINEROUTER_URL/v1/models/info?id=openai/text-embedding-3-small"

Endpoint

POST $NINEROUTER_URL/v1/embeddings

Field Required Notes
model yes from /v1/models/embedding
input yes string OR array of strings
encoding_format no float (default) / base64
dimensions no OpenAI v3 only

Examples

curl -X POST $NINEROUTER_URL/v1/embeddings \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/text-embedding-3-small","input":["hello","world"]}'

JS:

const r = await fetch(`${process.env.NINEROUTER_URL}/v1/embeddings`, {
  method: "POST",
  headers: { "Authorization": `Bearer ${process.env.NINEROUTER_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ model: "gemini/text-embedding-004", input: "RAG chunk text" }),
});
const { data } = await r.json();
console.log(data[0].embedding.length);  // dimension

Response shape

{ "object": "list", "model": "openai/text-embedding-3-small",
  "data": [
    { "object": "embedding", "index": 0, "embedding": [0.0123, -0.045, ...] },
    { "object": "embedding", "index": 1, "embedding": [...] }
  ],
  "usage": { "prompt_tokens": 5, "total_tokens": 5 } }

Provider quirks

Provider Notes
openai, openrouter, mistral, voyage-ai, fireworks, together, nebius, github, nvidia, jina-ai Native OpenAI shape — dimensions works only on OpenAI v3 (text-embedding-3-*)
gemini, google_ai_studio Server auto-converts to embedContent/batchEmbedContents — send OpenAI shape
openai-compatible-*, custom-embedding-* Custom baseUrl from credentials

Batch (input as array) is faster; some providers cap batch size.

通过9Router统一接口调用OpenAI、Gemini、DALL-E等多模型生成图像。支持文本转图片,提供URL、Base64及二进制格式返回,适配各提供商参数差异。
用户要求生成图片或绘图 文本转图像请求
skills/9router-image/SKILL.md
npx skills add decolua/9router --skill 9router-image -g -y
SKILL.md
Frontmatter
{
    "name": "9router-image",
    "description": "Generate images via 9Router \/v1\/images\/generations using OpenAI \/ Gemini Imagen \/ DALL-E \/ FLUX \/ MiniMax \/ SDWebUI \/ ComfyUI \/ Codex models. Use when the user wants to create, generate, draw, or render an image, picture, or text-to-image (txt2img)."
}

9Router — Image Generation

Requires NINEROUTER_URL (and NINEROUTER_KEY if auth enabled). See https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router/SKILL.md for setup.

Discover

curl $NINEROUTER_URL/v1/models/image | jq '.data[].id'
# Per-model params/options (size enum, quality enum, capabilities like edit)
curl "$NINEROUTER_URL/v1/models/info?id=openai/dall-e-3"

Endpoint

POST $NINEROUTER_URL/v1/images/generations

Field Required Notes
model yes from /v1/models/image
prompt yes image description
n no count (provider-dependent)
size no 1024x1024, 1792x1024, ...
quality no standard / hd (OpenAI)
response_format no url (default) or b64_json

Add query ?response_format=binary to receive raw image bytes (handy for saving file).

Examples

Save to file (binary):

curl -X POST "$NINEROUTER_URL/v1/images/generations?response_format=binary" \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gemini/gemini-3-pro-image-preview","prompt":"watercolor mountains at sunrise","size":"1024x1024"}' \
  --output out.png

JS (URL response):

const r = await fetch(`${process.env.NINEROUTER_URL}/v1/images/generations`, {
  method: "POST",
  headers: { "Authorization": `Bearer ${process.env.NINEROUTER_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ model: "gemini/gemini-3-pro-image-preview", prompt: "neon city", size: "1024x1024" }),
});
const { data } = await r.json();
console.log(data[0].url || data[0].b64_json.slice(0, 40));

Response shape

JSON (default response_format=url):

{ "created": 1735000000, "data": [{ "url": "https://..." }] }

response_format=b64_json:

{ "created": 1735000000, "data": [{ "b64_json": "iVBORw0KGgo..." }] }

Query ?response_format=binary returns raw image bytes (Content-Type image/png or image/jpeg).

Provider quirks

Common fields above work everywhere. These add/override:

Provider Extra/changed fields Notes
openai, minimax, openrouter, recraft quality, style, response_format Standard OpenAI shape
gemini (nano-banana) Only prompt; ignores size/n
codex (gpt-5.4-image) image, images[], image_detail, output_format, background SSE stream; ChatGPT Plus/Pro required
huggingface Only prompt; returns single image
nanobanana image, images[] (edit mode) size → aspect ratio; async polling
fal-ai image (img2img) nnum_images; size → ratio; async
stability-ai style (preset), output_format sizeaspect_ratio
black-forest-labs (FLUX) image (ref) size → exact width/height; async
runwayml image (ref) size → ratio; async; video models exist
sdwebui, comfyui Localhost noAuth (:7860 / :8188)
通过9Router将音频转录为文本,支持OpenAI Whisper、Groq、Gemini等多种模型。兼容OpenAI API格式,可处理多种音频格式并输出JSON或字幕文件。
用户需要将语音转换为文字 用户需要生成音频字幕 用户上传音频文件进行转写
skills/9router-stt/SKILL.md
npx skills add decolua/9router --skill 9router-stt -g -y
SKILL.md
Frontmatter
{
    "name": "9router-stt",
    "description": "Speech-to-text via 9Router \/v1\/audio\/transcriptions using OpenAI Whisper \/ Groq \/ Gemini \/ Deepgram \/ AssemblyAI \/ NVIDIA \/ HuggingFace models. Use when the user wants to transcribe audio, convert speech to text, or get subtitles from audio files."
}

9Router — Speech-to-Text

Requires NINEROUTER_URL (and NINEROUTER_KEY if auth enabled). See https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router/SKILL.md for setup.

Discover

curl $NINEROUTER_URL/v1/models/stt | jq '.data[].id'
# Per-model params (language, response_format, prompt, temperature support)
curl "$NINEROUTER_URL/v1/models/info?id=openai/whisper-1"

model = STT model ID (e.g. openai/whisper-1, groq/whisper-large-v3, deepgram/nova-3, gemini/gemini-2.5-flash).

Endpoint

POST $NINEROUTER_URL/v1/audio/transcriptions (OpenAI Whisper compatible, multipart/form-data)

Field Required Notes
model yes from /v1/models/stt
file yes audio file (mp3, wav, m4a, webm, ogg, flac)
language no ISO-639-1 (e.g. en, vi)
prompt no hint text to guide transcription
response_format no json (default) / text / verbose_json / srt / vtt
temperature no 0–1

Examples

curl -X POST "$NINEROUTER_URL/v1/audio/transcriptions" \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -F "model=openai/whisper-1" \
  -F "file=@audio.mp3" \
  -F "language=vi"

JS (Node):

import { createReadStream } from "node:fs";
const form = new FormData();
form.append("model", "groq/whisper-large-v3-turbo");
form.append("file", new Blob([await (await import("node:fs/promises")).readFile("audio.mp3")]), "audio.mp3");
const r = await fetch(`${process.env.NINEROUTER_URL}/v1/audio/transcriptions`, {
  method: "POST",
  headers: { "Authorization": `Bearer ${process.env.NINEROUTER_KEY}` },
  body: form,
});
const { text } = await r.json();
console.log(text);

Response shape

Default (response_format=json):

{ "text": "Xin chào, đây là bản ghi âm." }

verbose_json adds language, duration, segments[] with timestamps. srt / vtt return subtitle text.

Provider quirks

Provider model format Notes
openai whisper-1, gpt-4o-transcribe, gpt-4o-mini-transcribe Native OpenAI shape
groq whisper-large-v3, whisper-large-v3-turbo, distil-whisper-large-v3-en Fastest; OpenAI shape
gemini gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-flash-lite Server converts to generateContent with audio inline
deepgram nova-3, nova-2, whisper-large Token auth; server adapts response
assemblyai universal-3-pro, universal-2 Async upload+poll handled server-side
nvidia nvidia/parakeet-ctc-1.1b-asr NIM endpoint
huggingface openai/whisper-large-v3, openai/whisper-small HF Inference API
通过9Router网关调用OpenAI、ElevenLabs等多种TTS服务,将文本转换为语音音频。支持多种提供商模型选择及MP3/JSON格式输出,适用于朗读、旁白生成等场景。
用户要求将文本转换为语音或音频 需要生成旁白、朗读文本或合成声音
skills/9router-tts/SKILL.md
npx skills add decolua/9router --skill 9router-tts -g -y
SKILL.md
Frontmatter
{
    "name": "9router-tts",
    "description": "Text-to-speech via 9Router \/v1\/audio\/speech using OpenAI \/ ElevenLabs \/ Deepgram \/ Edge TTS \/ Google TTS \/ Hyperbolic \/ Inworld voices. Use when the user wants to convert text to speech, generate audio, voiceover, narrate, or read text aloud."
}

9Router — Text-to-Speech

Requires NINEROUTER_URL (and NINEROUTER_KEY if auth enabled). See https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router/SKILL.md for setup.

Discover

# 1) List models
curl $NINEROUTER_URL/v1/models/tts | jq '.data[].id'
# 2) Per-model metadata (params, voicesUrl if voice-by-id)
curl "$NINEROUTER_URL/v1/models/info?id=el/eleven_multilingual_v2"
# 3) List voices (elevenlabs, edge-tts, deepgram, inworld, local-device). Optional ?lang=vi
curl "$NINEROUTER_URL/v1/audio/voices?provider=edge-tts&lang=vi" | jq '.data[].model'

model field in /v1/audio/speech = voice ID directly (e.g. edge-tts/vi-VN-HoaiMyNeural, el/<voice_id>, or openai/tts-1 model+default voice).

Endpoint

POST $NINEROUTER_URL/v1/audio/speech

Field Required Notes
model yes voice ID from /v1/models/tts
input yes text to speak

Query ?response_format=mp3 (default, raw bytes) or ?response_format=json ({audio: base64, format}).

Examples

Save MP3:

curl -X POST "$NINEROUTER_URL/v1/audio/speech" \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/tts-1","input":"Hello world"}' \
  --output speech.mp3

JS (save file):

import { writeFile } from "node:fs/promises";
const r = await fetch(`${process.env.NINEROUTER_URL}/v1/audio/speech`, {
  method: "POST",
  headers: { "Authorization": `Bearer ${process.env.NINEROUTER_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ model: "el/eleven_multilingual_v2", input: "Xin chào" }),
});
await writeFile("speech.mp3", Buffer.from(await r.arrayBuffer()));

Response shape

Default → raw audio bytes (Content-Type audio/mp3).

?response_format=json:

{ "audio": "SUQzBAAAA...", "format": "mp3" }

Provider quirks (model format)

Provider model format Notes
openai tts-1/alloy (model/voice) or just voice Default model gpt-4o-mini-tts
elevenlabs <model_id>/<voice_id> or <voice_id> Default model eleven_flash_v2_5; list voices in Dashboard
openrouter openai/gpt-4o-mini-tts/alloy Streamed via chat-completions audio modality
edge-tts voice id e.g. vi-VN-HoaiMyNeural noAuth; default vi-VN-HoaiMyNeural
google-tts language code e.g. en, vi noAuth
local-device OS voice name (say -v ? / SAPI) noAuth; needs ffmpeg
deepgram aura-asteria-en etc Token auth
nvidia, inworld, cartesia, playht model/voice Provider-specific auth header
coqui, tortoise speaker / voice id Localhost noAuth
hyperbolic model id Body = {text} only
通过9Router调用xAI Grok Imagine异步生成、编辑或扩展视频。支持文生视频和图生视频,需轮询任务状态并下载MP4。适用于用户需要创建、渲染或修改视频内容的场景。
用户要求生成视频 文本转视频需求 图像转视频需求 编辑现有视频 延长视频时长
skills/9router-video/SKILL.md
npx skills add decolua/9router --skill 9router-video -g -y
SKILL.md
Frontmatter
{
    "name": "9router-video",
    "description": "Generate videos via 9Router \/v1\/videos\/generations using xAI Grok Imagine (grok-imagine-video). Async job flow - submit, poll request_id until done, download MP4. Use when the user wants to create, generate, or render a video, text-to-video (txt2vid), or image-to-video."
}

9Router — Video Generation (xAI Grok Imagine)

Requires NINEROUTER_URL (and NINEROUTER_KEY if auth enabled). See https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router/SKILL.md for setup.

Requires a connected xAI account in the 9Router dashboard — either Grok Build OAuth (SuperGrok / X Premium+ subscription sign-in) or a direct xAI API key from console.x.ai. The two are separate auth types with separate billing; the dashboard shows which one each connection uses.

Endpoints (async job flow)

Video generation is asynchronous: the POST returns a request_id immediately, then you poll until the job is done or failed.

Endpoint Purpose
POST /v1/videos/generations text-to-video / image-to-video
POST /v1/videos/edits edit an existing video
POST /v1/videos/extensions extend an existing video
GET /v1/videos/{request_id} poll job status

Request fields (passed through to xAI unchanged — see https://docs.x.ai/developers/rest-api-reference/inference/videos):

Field Required Notes
model no xai/grok-imagine-video (prefix is stripped before upstream)
prompt yes for T2V video description
duration no seconds
aspect_ratio no 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3
resolution no 480p, 720p, 1080p
image no { "url": "https://… or data:image/…;base64,…" } for image-to-video
video edits/extensions { "url": "…mp4" } or { "file_id": "…" }

Examples

Submit a job:

curl -X POST "$NINEROUTER_URL/v1/videos/generations" \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"xai/grok-imagine-video","prompt":"A cinematic tracking shot through a neon city at night","duration":8,"aspect_ratio":"16:9","resolution":"720p"}'
# → {"request_id":"abc123"}   (response header x-9router-connection-id: <id>)

Poll until done (echo the connection header back so the same account polls the job):

curl "$NINEROUTER_URL/v1/videos/abc123" \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -H "x-connection-id: <id from create response>"
# → {"status":"pending","progress":42}
# → {"status":"done","video":{"url":"https://…mp4","duration":8},"model":"grok-imagine-video"}
# → {"status":"failed","error":{"code":"…","message":"…"}}

Download: fetch video.url from the done response.

CLI one-shot

9router xai video \
  --prompt "A cinematic tracking shot through a neon city at night" \
  --output video.mp4
# options: --model --duration --aspect-ratio --resolution --image --timeout --port --api-key

Submits, polls with progress, downloads to video.mp4.part, atomically renames on success. Ctrl+C cancels cleanly; non-zero exit on failure.

Notes & limits

  • Jobs are account-bound upstream: poll with the same connection that created the job (x-connection-id header, value from the create response's x-9router-connection-id).
  • Creation POSTs are never auto-retried (a retry could create and bill two videos). Only a 401→token-refresh→single-retry is performed, which upstream rejects before job creation.
  • Video models are tagged kind: "video" and are excluded from chat model lists and chat fallback combos.
  • Grok Build subscription OAuth tokens are sent to the same api.x.ai/v1/videos endpoints as API keys; whether a given subscription tier includes video-generation quota is controlled by xAI and is not verified by 9Router — a 403/permission_denied from upstream means the connected account has no video access.
通过9Router接口调用Firecrawl、Jina等引擎,将网页URL抓取并转换为Markdown、文本或HTML格式。适用于网页内容提取、文章阅读及网页转Markdown场景。
用户需要获取指定URL的网页内容 用户希望将网页链接转换为Markdown格式 用户需要阅读或分析在线文章全文
skills/9router-web-fetch/SKILL.md
npx skills add decolua/9router --skill 9router-web-fetch -g -y
SKILL.md
Frontmatter
{
    "name": "9router-web-fetch",
    "description": "Fetch URL → markdown \/ text \/ HTML via 9Router \/v1\/web\/fetch using Firecrawl \/ Jina Reader \/ Tavily Extract \/ Exa Contents. Use when the user wants to scrape a webpage, extract URL content, read article, or convert a URL to markdown."
}

9Router — Web Fetch

Requires NINEROUTER_URL (and NINEROUTER_KEY if auth enabled). See https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router/SKILL.md for setup.

Discover

curl $NINEROUTER_URL/v1/models/web | jq '.data[] | select(.kind=="webFetch") | .id'
# Per-provider params
curl "$NINEROUTER_URL/v1/models/info?id=firecrawl/fetch"

IDs end in /fetch (e.g. firecrawl/fetch, jina/fetch). fetch-combo chains providers with auto-fallback.

Endpoint

POST $NINEROUTER_URL/v1/web/fetch

Field Required Notes
model (or provider) yes from /v1/models/web (e.g. firecrawl or jina-reader)
url yes URL to extract
format no markdown (default) / text / html
max_characters no truncate output

Examples

Jina Reader

curl -X POST $NINEROUTER_URL/v1/web/fetch \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"jina-reader","url":"https://9router.com","format":"markdown"}'

Exa

curl -X POST $NINEROUTER_URL/v1/web/fetch \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"exa","url":"https://example.com","format":"markdown","max_characters":0}'

Firecrawl

curl -X POST $NINEROUTER_URL/v1/web/fetch \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"firecrawl","url":"https://example.com","format":"markdown","max_characters":0}'

Tavily

curl -X POST $NINEROUTER_URL/v1/web/fetch \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"tavily","url":"https://example.com","format":"markdown","max_characters":0}'

JS:

const r = await fetch(`${process.env.NINEROUTER_URL}/v1/web/fetch`, {
  method: "POST",
  headers: { "Authorization": `Bearer ${process.env.NINEROUTER_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ model: "fetch-combo", url: "https://example.com", format: "markdown", max_characters: 5000 }),
});
const { data } = await r.json();
console.log(data.title, data.content.length);

Response shape

{
  "provider": "jina-reader",
  "url": "...",
  "title": "...",
  "content": { "format": "markdown", "text": "...", "length": 1234 },
  "metadata": { "author": null, "published_at": null, "language": null },
  "usage": { "fetch_cost_usd": 0 },
  "metrics": { "response_time_ms": 850, "upstream_latency_ms": 700 }
}

Provider quirks

Provider Auth Best for
firecrawl Bearer JS-rendered pages, format=markdown/html
jina-reader Bearer (optional) Free tier (~1M chars/mo); fastest plain markdown
tavily Bearer Bulk extract; returns raw_content
exa x-api-key Pre-indexed pages; fast text extraction
9Router 是本地/远程 AI 网关,提供 OpenAI 兼容 REST 接口。支持聊天、图像、TTS、嵌入、搜索等能力,实现多提供商自动回退。用户提及 9Router 或需简化 AI 调用时触发,通过配置环境变量和 API 密钥使用。
用户提到 '9Router' 或 'NINEROUTER_URL' 需要调用多种 AI 能力(如聊天、图像生成、语音合成)而不想处理底层提供商细节 希望使用统一的 OpenAI 兼容接口访问不同 AI 服务
skills/9router/SKILL.md
npx skills add decolua/9router --skill 9router -g -y
SKILL.md
Frontmatter
{
    "name": "9router",
    "description": "Entry point for 9Router — local\/remote AI gateway with OpenAI-compatible REST for chat, image, TTS, embeddings, web search, web fetch. Use when the user mentions 9Router, NINEROUTER_URL, or wants AI without writing provider boilerplate. This skill covers setup + indexes capability skills; fetch the relevant capability SKILL.md from the URLs below when needed."
}

9Router

Local/remote AI gateway exposing OpenAI-compatible REST. One key, many providers, auto-fallback.

Setup

export NINEROUTER_URL="http://localhost:20128"      # or VPS / tunnel URL
export NINEROUTER_KEY="sk-..."                      # from Dashboard → Keys (only if requireApiKey=true)

All requests: ${NINEROUTER_URL}/v1/... with header Authorization: Bearer ${NINEROUTER_KEY} (omit if auth disabled).

Verify: curl $NINEROUTER_URL/api/health{"ok":true}

Discover models

curl $NINEROUTER_URL/v1/models                  # chat/LLM (default)
curl $NINEROUTER_URL/v1/models/image            # image-gen
curl $NINEROUTER_URL/v1/models/tts              # text-to-speech
curl $NINEROUTER_URL/v1/models/embedding        # embeddings
curl $NINEROUTER_URL/v1/models/web              # web search + fetch (entries have `kind` field)
curl $NINEROUTER_URL/v1/models/stt              # speech-to-text
curl $NINEROUTER_URL/v1/models/image-to-text    # vision

Use data[].id as model field in requests. Combos appear with owned_by:"combo".

Response shape:

{ "object": "list", "data": [
  { "id": "openai/gpt-5", "object": "model", "owned_by": "openai", "created": 1735000000 },
  { "id": "tavily/search", "object": "model", "kind": "webSearch", "owned_by": "tavily", "created": 1735000000 }
]}

Capability skills

When the user needs a specific capability, fetch that skill's SKILL.md from its raw URL:

Capability Raw URL
Chat / code-gen https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router-chat/SKILL.md
Image generation https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router-image/SKILL.md
Text-to-speech https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router-tts/SKILL.md
Speech-to-text https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router-stt/SKILL.md
Embeddings https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router-embeddings/SKILL.md
Web search https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router-web-search/SKILL.md
Web fetch (URL → markdown) https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router-web-fetch/SKILL.md

Errors

  • 401 → set/refresh NINEROUTER_KEY (Dashboard → Keys)
  • 400 Invalid model format → check model exists in /v1/models/<kind>
  • 503 All accounts unavailable → wait retry-after or add another provider account

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-27 05:06
浙ICP备14020137号-1 $bản đồ khách truy cập$