- Speech-to-Text: full pipeline with sttCore handler, /v1/audio/transcriptions endpoint, sttConfig for OpenAI, Gemini, Groq, Deepgram, AssemblyAI, HuggingFace, NVIDIA Parakeet; new 9router-stt skill - Gemini TTS: add gemini provider with 30 prebuilt voices and TTS_PROVIDER_CONFIG - Usage: implement GLM (intl/cn) and MiniMax (intl/cn) quota fetchers; refactor Gemini CLI usage to use retrieveUserQuota with per-model buckets - Disabled models: lowdb-backed disabledModelsDb + /api/models/disabled route - Header search: reusable Zustand store (headerSearchStore) wired into Header - CLI tools: add Claude Cowork tool card and cowork-settings API - Providers: introduce mediaPriority sorting in getProvidersByKind, add Kimi K2.6, reorder hermes, drop qwen STT kind - UI: expand media-providers/[kind]/[id] page (+314), enhance OAuthModal, ModelSelectModal, ProviderTopology, ProxyPools, ProviderLimits - Assets: refresh provider PNGs (alicode, byteplus, cloudflare-ai, nvidia, ollama, vertex, volcengine-ark) and add aws-polly, fal-ai, jina-ai, recraft, runwayml, stability-ai, topaz, black-forest-labs
61 lines
2.9 KiB
Markdown
61 lines
2.9 KiB
Markdown
---
|
|
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
|
|
|
|
```bash
|
|
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
|
|
|
|
```bash
|
|
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:
|
|
```json
|
|
{ "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
|