9routerx-embeddings — Claude Code skill: embeddings and setup
The 9routerx-embeddings Claude Code skill creates text embeddings through the 9RouterX API. The agent uses it for RAG, semantic search, and text similarity tasks.
MIT ★ 259 updated 2026-11-16
npx skills add yanstd888/9routerx --skill 9routerx-embeddings -a claude-codeWhat 9routerx-embeddings does
The skill sends text to /v1/embeddings and returns vector embeddings from 9RouterX. The input can be a single string or an array; batches are faster, though some providers limit their size.
Set 9ROUTERX_URL to the server address. 9ROUTERX_KEY is also required when authentication is enabled. The skill describes how to list embedding models through /v1/models/embedding; dimensions works only with OpenAI v3 models. For Gemini, the server converts the request, while the client still sends an OpenAI-shaped payload.
What it helps with
- create vectors for RAG text
- prepare embeddings for semantic search
- compare text using vector embeddings
- send multiple strings in one request
Example prompts for the agent
- Create embeddings for these text chunks for my RAG setup.
- Prepare vectors for semantic search across these texts.
- Compare these strings using embeddings from 9RouterX.
How to install 9routerx-embeddings
1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-embeddings -a claude-code2Manually: put the files in place
~/.claude/skills/9routerx-embeddings/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/9routerx-embeddings/
1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-embeddings -a codex2Manually: put the files in place
.agents/skills/9routerx-embeddings/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-embeddings -a cursor2Manually: put the files in place
.cursor/skills/9routerx-embeddings/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install yanstd888/9routerx skills/9routerx-embeddings2Manually: put the files in place
.github/skills/9routerx-embeddings/SKILL.md1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-embeddings -a gemini-cli2Platform CLI
gemini skills install https://github.com/yanstd888/9routerx --path skills/9routerx-embeddingsManually: put the files in place
.devin/skills/9routerx-embeddings/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about 9routerx-embeddings
How do I install 9routerx-embeddings in Claude Code?
Run npx skills add yanstd888/9routerx --skill 9routerx-embeddings -a claude-code. The skill file is placed at ~/.claude/skills/9routerx-embeddings/SKILL.md.
What does 9routerx-embeddings do?
It sends a string or an array of strings to the 9RouterX /v1/embeddings API and retrieves vector embeddings for RAG, semantic search, or text similarity.
What does 9routerx-embeddings need to run?
A 9RouterX server address in 9ROUTERX_URL is required. Set 9ROUTERX_KEY as well when server authentication is enabled.
Source text
SKILL.md · MIT
---
name: 9routerx-embeddings
description: Generate vector embeddings via 9RouterX /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.
---
# 9RouterX — Embeddings
Requires `9ROUTERX_URL` (and `9ROUTERX_KEY` if auth enabled). See https://raw.githubusercontent.com/yanstd888/9routerx/refs/heads/main/skills/9routerx/SKILL.md for setup.
## Discover
```bash
curl $9ROUTERX_URL/v1/models/embedding | jq '.data[].id'
# Per-model dimensions
curl "$9ROUTERX_URL/v1/models/info?id=openai/text-embedding-3-small"
```
## Endpoint
`POST $9ROUTERX_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
```bash
curl -X POST $9ROUTERX_URL/v1/embeddings \
-H "Authorization: Bearer $9ROUTERX_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"openai/text-embedding-3-small","input":["hello","world"]}'
```
JS:
```js
const r = await fetch(`${process.env.9ROUTERX_URL}/v1/embeddings`, {
method: "POST",
headers: { "Authorization": `Bearer ${process.env.9ROUTERX_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
```json
{ "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.
© yanstd888 · MIT · yanstd888/9routerx