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
Migration guide
Migrate from Ollama
The gateway serves Ollama's chat and generate routes under /ollama, so an Ollama client can move from a local server to the network with a new host and an Authorization header.
What changes
| Local Ollama | Silicon Network | |
|---|---|---|
| Host | http://localhost:11434 | https://api.siliconnetwork.io/ollama |
| Key | none | Authorization: Bearer sn_live_... on /api/chat and /api/generate |
| Models | tags you pulled, such as llama3.2 | catalog ids such as llama-3.2-3b, or the names /api/tags lists |
| Pulling models | ollama pull | nothing to pull: the network serves what is loaded |
Discovery (the root probe, /api/version, /api/tags and /api/ps) needs no key and lists only the models loaded right now, so a model picker never offers one that will not answer. Chat and generate need the key, so use a client that lets you set an Authorization header. They stream newline delimited JSON unless you send "stream": false.
Python
from ollama import Client client = Client(host="http://localhost:11434") resp = client.chat( model="llama3.2", messages=[{"role": "user", "content": "Say hello in one line."}],)print(resp["message"]["content"])import os from ollama import Client client = Client( host="https://api.siliconnetwork.io/ollama", headers={"Authorization": f"Bearer {os.environ['SILICON_API_KEY']}"},) resp = client.chat( model="llama-3.2-3b", messages=[{"role": "user", "content": "Say hello in one line."}],)print(resp["message"]["content"])TypeScript
import { Ollama } from "ollama"; const ollama = new Ollama({ host: "http://localhost:11434" }); const res = await ollama.chat({ model: "llama3.2", messages: [{ role: "user", content: "Say hello in one line." }],});console.log(res.message.content);import { Ollama } from "ollama"; const ollama = new Ollama({ host: "https://api.siliconnetwork.io/ollama", headers: { Authorization: `Bearer ${process.env.SILICON_API_KEY}` },}); const res = await ollama.chat({ model: "llama-3.2-3b", messages: [{ role: "user", content: "Say hello in one line." }],});console.log(res.message.content);These use the host and headers options of the ollama packages. A client that cannot send a header, or drops the /ollama path from its host, cannot call chat or generate here: use the HTTP calls below, or the OpenAI-compatible routes in Migrate from OpenAI.
curl
curl https://api.siliconnetwork.io/ollama/api/chat \ -H "Authorization: Bearer $SILICON_API_KEY" \ -d '{ "model": "llama-3.2-3b", "stream": false, "messages": [{"role": "user", "content": "Say hello in one line."}], "options": {"temperature": 0.2} }'curl https://api.siliconnetwork.io/ollama/api/tagsOptions
options carries the sampler settings, held to the same bounds as the other surfaces (temperature 0 to 2, top_p 0 to 1, repeat_penalty 0.01 to 10). options.num_predict above 8,192 is clamped to 8,192.
What does not carry over
| Ollama | Instead |
|---|---|
| POST /api/pull, /api/push, /api/create, /api/copy, DELETE /api/delete | Nothing to manage: the network serves what is loaded. |
| POST /api/show | GET /ollama/api/tags, or GET /v1/models for the aliases. |
| POST /api/embed, /api/embeddings | POST /v1/embeddings in the OpenAI shape, with an embedding model such as bge-m3. |
| Models you made with a Modelfile | Catalog models only. For your own fine-tune, see LoRA adapters in the guides. |
| Running offline | Every request goes over the internet to the network. |
Checklist
| Step | Done when |
|---|---|
| Create a key and add balance | A key from the API Keys page; balance on the Billing page. |
| Change the host and add the header | The client sends to https://api.siliconnetwork.io/ollama with Authorization: Bearer. |
| Map each model name | Every model is a catalog id or a name from /ollama/api/tags. |
| Remove model management | No pull, create, copy, delete or show calls. |
| Move embeddings | Embeddings go to /v1/embeddings. |
| Compare answers | Your own prompts give acceptable answers on the network's models. |