Docs

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

Before and after
Local OllamaSilicon Network
Hosthttp://localhost:11434https://api.siliconnetwork.io/ollama
KeynoneAuthorization: Bearer sn_live_... on /api/chat and /api/generate
Modelstags you pulled, such as llama3.2catalog ids such as llama-3.2-3b, or the names /api/tags lists
Pulling modelsollama pullnothing 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

before.py
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"])
after.py
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

before.ts
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);
after.ts
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

chat - 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}  }'
tags - curl
curl https://api.siliconnetwork.io/ollama/api/tags

Options

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

Not served
OllamaInstead
POST /api/pull, /api/push, /api/create, /api/copy, DELETE /api/deleteNothing to manage: the network serves what is loaded.
POST /api/showGET /ollama/api/tags, or GET /v1/models for the aliases.
POST /api/embed, /api/embeddingsPOST /v1/embeddings in the OpenAI shape, with an embedding model such as bge-m3.
Models you made with a ModelfileCatalog models only. For your own fine-tune, see LoRA adapters in the guides.
Running offlineEvery request goes over the internet to the network.

Checklist

Before you switch traffic
StepDone when
Create a key and add balanceA key from the API Keys page; balance on the Billing page.
Change the host and add the headerThe client sends to https://api.siliconnetwork.io/ollama with Authorization: Bearer.
Map each model nameEvery model is a catalog id or a name from /ollama/api/tags.
Remove model managementNo pull, create, copy, delete or show calls.
Move embeddingsEmbeddings go to /v1/embeddings.
Compare answersYour own prompts give acceptable answers on the network's models.
Silicon Network›Docs›Guides›Migration guides›Ollama54 items