Guides
- Quickstart
- Quickstarts by language
- Migration guides
- Authentication and keys
- Key protection
- Models, aliases and fallbacks
- Automatic model choice (silicon/auto)
- Chat completions
- Streaming
- Structured outputs and tools
- Logprobs
- Vision
- Responses, Claude and Ollama
- Embeddings, rerank, audio, images
- Files and batches
- Documents and search
- LoRA adapters
- Project tags and costs
- Prefix caching
- Headers, rate limits and spend caps
- Errors
- Versioning and the sandbox
- Privacy and retention
- Verifiable receipts
- Data residency
- Pricing
- Billing
- Pay per request (x402)
- On-chain oracle
- Agent credit (backed compute lines)
- Status
- SDKs
- Swift SDK
- Integrations
- Run a node
- Linux agent
- Mac mini fleets
- Compute API
- Architecture
- Changelog
- Glossary
API reference
API reference
Embeddings and reranking
Vectors for retrieval and cross-encoder reranking, on the OpenAI embeddings shape and the Cohere and Jina rerank shape.
Base URL https://api.siliconnetwork.io
POST/v1/embeddings
Embeddings
bge-m3 is the alias of mlx-community/bge-m3-mlx-fp16; qwen3-embedding-0.6b and all-minilm-l6-v2 are the others, and any full id works. The response names the engine id that served. input may be one string, a list of strings, or token id arrays. encoding_format: "base64" packs each vector; dimensions truncates on models that support it.
silicon - zsh
curl -X POST https://api.siliconnetwork.io/v1/embeddings \ -H "Authorization: Bearer sn_live_..." \ -H "Content-Type: application/json" \ -d '{ "model": "bge-m3", "input": [ "The quick brown fox", "jumps over the lazy dog" ]}'sdk.py
from siliconnetwork import SiliconNetwork client = SiliconNetwork()out = client.embeddings.create(**{ "model": "bge-m3", "input": [ "The quick brown fox", "jumps over the lazy dog" ]})print(len(out.data[0].embedding))sdk.ts
import { SiliconNetwork } from "@siliconnetwork/sdk"; const client = new SiliconNetwork({ apiKey: process.env.SILICON_API_KEY });const out = await client.embeddings.create({ "model": "bge-m3", "input": [ "The quick brown fox", "jumps over the lazy dog" ]});console.log(out.data[0].embedding.length);response
{ "object": "list", "data": [ { "object": "embedding", "index": 0, "embedding": [0.0123, -0.0456, "..."] }, { "object": "embedding", "index": 1, "embedding": [0.0789, 0.0012, "..."] } ], "model": "mlx-community/bge-m3-mlx-fp16", "usage": { "prompt_tokens": 12, "total_tokens": 12 }}Responses: 200 Successful Response, 422 Validation Error
POST/v1/rerank
Rerank
silicon - zsh
curl -X POST https://api.siliconnetwork.io/v1/rerank \ -H "Authorization: Bearer sn_live_..." \ -H "Content-Type: application/json" \ -d '{ "model": "qwen3-reranker-0.6b", "query": "How do I rotate an API key?", "documents": [ "Keys are created in the dashboard and shown once.", "The relay lets nodes behind NAT join the network.", "Revoke a key any time; it stops working within 15 seconds." ], "top_n": 2, "return_documents": true}'sdk.py
from siliconnetwork import SiliconNetwork client = SiliconNetwork()out = client.rerank.create(**{ "model": "qwen3-reranker-0.6b", "query": "How do I rotate an API key?", "documents": [ "Keys are created in the dashboard and shown once.", "The relay lets nodes behind NAT join the network.", "Revoke a key any time; it stops working within 15 seconds." ], "top_n": 2, "return_documents": True})for r in out.results: print(r.index, r.relevance_score)sdk.ts
import { SiliconNetwork } from "@siliconnetwork/sdk"; const client = new SiliconNetwork({ apiKey: process.env.SILICON_API_KEY });const out = await client.rerank.create({ "model": "qwen3-reranker-0.6b", "query": "How do I rotate an API key?", "documents": [ "Keys are created in the dashboard and shown once.", "The relay lets nodes behind NAT join the network.", "Revoke a key any time; it stops working within 15 seconds." ], "top_n": 2, "return_documents": true});for (const r of out.results) console.log(r.index, r.relevance_score);response
{ "model": "mlx-community/Qwen3-Reranker-0.6B-mxfp8", "results": [ { "index": 2, "relevance_score": 0.91, "document": { "text": "Revoke a key any time; it stops working within 15 seconds." } }, { "index": 0, "relevance_score": 0.74, "document": { "text": "Keys are created in the dashboard and shown once." } } ], "usage": { "prompt_tokens": 58, "total_tokens": 58 }}Responses: 200 Successful Response, 422 Validation Error
Silicon Network›Docs›API›Embeddings and reranking54 items