9Router Embeddings Skill
Generate vector embeddings via a running 9Router's /v1/embeddings endpoint, drawing on OpenAI, Gemini, Mistral, Voyage, Nvidia, and GitHub embedding models for RAG, semantic search, and similarity.
Documentation-only skill with no executable scripts; accesses a local 9Router service via NINEROUTER_URL/NINEROUTER_KEY env vars, so the permission surface is small with no covert exfiltration. However, auth handling ('if auth enabled') is vague, and the skill does not disclose which upstream providers will receive the embedded text — data-flow disclosure incomplete.
curl/JS examples, response shape and provider-quirks table are internally consistent; ping.js in the repo confirms the embedding probe path exists. But there are no tests, no error-handling examples, and batch-size caps and failure feedback are undocumented — not full marks, and static review caps this at 10.
Trigger terms (embeddings/vectors/RAG/semantic search) and scenario are clear. Missing declared non-fit boundaries; requires prior 9Router install/config; docs are English-only with no note on mainland-China reachability while most embedding providers are overseas services.
Well-structured (Discover/Endpoint/Examples/Quirks) with clear MIT license. But the skill has no version or changelog, install guidance defers to an external SKILL.md link, and maintenance ownership/update path are not stated in the skill itself.
Examples appear directly copy-paste usable and should return OpenAI-shaped embeddings; marginal value lies in the unified multi-provider interface and quirks table. Not executed, so usability is inferred — static cap of 7 not reached.
ping.js and the README self-hosted-embedding section corroborate the skill's described endpoint, providing limited auditable primary material; no test coverage or third-party execution evidence — static cap 5, thin coverage yields 4.
- Static review only; no requests were executed and usability is inferred from source.
- Embedded text is sent to the selected upstream providers; the skill does not disclose per-provider data flow — assess sensitive text before use.
- Requires a pre-installed, configured 9Router (NINEROUTER_URL/KEY); setup lives in an external SKILL.md link that may drift with repo changes.
- Most embedding models are overseas services; mainland-China reachability is unstated and docs are English-only.
- Free tiers and model lists are noted as subject to change; verify provider status before relying on them.
What does this skill do, and when should you use it?
This skill is one of nine bundled in the 9Router monorepo and focuses solely on vector embedding generation. It teaches an agent how to discover embedding models available on a 9Router instance, query per-model dimensions, and call POST /v1/embeddings in OpenAI-compatible shape. It supports float/base64 encoding formats and batch input, targeting RAG and semantic search workloads. The prerequisite is a running 9Router service with NINEROUTER_URL set (plus NINEROUTER_KEY if auth is enabled). The skill is documentation-only guidance and contains no executable scripts.
Lists available embedding models via curl against /v1/models/embedding and queries per-model dimensions via /v1/models/info?id=; builds POST requests to $NINEROUTER_URL/v1/embeddings with model, input (string or array), optional encoding_format (float/base64), and optional dimensions (OpenAI v3 only); returns an OpenAI-shaped JSON response with embedding vectors in a data array plus usage token counts. The skill also documents provider quirks — e.g. Gemini/Google AI Studio requests are server-side auto-converted to embedContent/batchEmbedContents, so callers still send OpenAI shape.
- A developer already using 9Router for AI coding who wants to build RAG retrieval over a codebase without wiring up a separate embeddings API
- An engineer comparing or switching between embedding providers (OpenAI, Gemini, Mistral, Voyage, etc.) while keeping one OpenAI-style interface
- A developer building semantic search or similarity features who needs to know each model's output dimensions
- A budget-conscious indie developer who wants embeddings routed through 9Router's free or cheap provider tiers
What are this skill's strengths and limitations?
- One OpenAI-style interface across many embedding providers, including automatic Gemini/Google AI Studio format conversion
- Discovery endpoints (list models, query dimensions) make model selection dynamic
- Supports float/base64 encoding, batch input, and the dimensions parameter on OpenAI v3 models
- Concise docs with both curl and JS examples that are easy to copy
- Hard dependency on a running 9Router instance — not usable standalone
- The dimensions parameter only works on OpenAI text-embedding-3-* models
- Some providers cap batch size, but the specific limits are not documented
- The README does not state quota, free-tier coverage, or pricing details for embedding models on 9Router
How do you install this skill?
The skill is part of the skill collection packaged in the decolua/9router repo (MIT license), at skills/9router-embeddings/SKILL.md. Place the collection into your Agent Skills client's skills directory per its convention; the README documents no dedicated per-skill install command. Prerequisite: install and run 9Router itself per the main docs (e.g. npm install -g 9router, then 9router — dashboard at http://localhost:20128), and set NINEROUTER_URL (and NINEROUTER_KEY if auth is enabled).
How do you use this skill?
Trigger it by asking your agent about embeddings, vectors, RAG, or semantic search. Typical flow: run curl $NINEROUTER_URL/v1/models/embedding | jq '.data[].id' to list models, then curl -X POST $NINEROUTER_URL/v1/embeddings -H "Authorization: Bearer $NINEROUTER_KEY" -H "Content-Type: application/" -d '{"model":"openai/text-embedding-3-small","input":["hello","world"]}'; the response's data[i].embedding holds the vectors and usage holds token counts. Batch by passing an array as input for speed — some providers cap batch size.
How does this skill compare with similar options?
Complements the sibling 9router main skill (chat model routing, RTK token saving, auto-fallback): this one covers embeddings only. If you don't need a unified multi-provider interface, you can call embedding providers' native APIs directly — but then you must adapt to each provider's format yourself.