Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add yanstd888/9routerx --skill 9routerx-embeddings -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/9routerx-embeddings/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/9routerx-embeddings/

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

Similar skills

All skills for AI and ML →

From the same set9

9routerx-chat The 9routerx-chat Claude Code skill sends language-model requests through 9RouterX. It activates for code generation, text summaries, and other prompts to a model. CX Codex +1 ★ 259repo stars 9routerx Claude Code skill connects your agent to the 9RouterX gateway. It routes OpenAI-compatible REST calls for chat, speech, embeddings, and web fetch to multiple AI models. CX Codex +1 ★ 259repo stars 9routerx-tts The 9routerx-tts Claude Code skill turns text into speech through the 9RouterX API. It runs for voiceovers, generated audio, or reading text aloud. CX Codex +1 ★ 259repo stars 9routerx-image The 9routerx-image Claude Code skill creates images through the 9RouterX API. It activates when a request asks for a picture or text-to-image generation. CX Codex +1 ★ 259repo stars 9routerx-stt 9routerx-stt — a skill for Claude Code and Codex that routes audio transcription requests through 9RouterX. Transcribes voice recordings and generates subtitle files across multiple model backends. CX Codex +1 ★ 259repo stars 9routerx-web-fetch The 9routerx-web-fetch Claude Code skill retrieves webpage content as Markdown, plain text, or HTML. The agent uses it to read an article or extract material from a URL. CX Codex +1 ★ 259repo stars 9routerx-video The 9routerx-video Claude Code skill creates videos through xAI Grok Imagine. It runs when asked to generate a clip from text or an image. CX Codex +1 ★ 259repo stars 9routerx-web-search The 9routerx-web-search Claude Code skill searches the web and public X posts through 9RouterX. It runs when an agent is asked to find articles, information, or posts on X. CX Codex +1 ★ 259repo stars

Project sponsors

Companies that keep this analytics open