Docs

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

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

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