Skip to content

Use SynapCores as an Ollama server: chat, generate and embeddings API

SynapCores answers the Ollama API on the same port as the database. Models run inside the engine, so code written for Ollama works against SynapCores with a base URL and an API key, and the same models also power EMBED() and GENERATE() in SQL.

Tested on SynapCores 2.5.0-ceUpdated November 18, 2026

Install free, one command

curl -fsSL https://get.synapcores.com | SYNAPCORES_REF=docs-ollama-api sh

Free Community Edition. Linux (x86_64, aarch64) and macOS on Apple Silicon; Windows via WSL2. Docker and other options

You need a running engine (quickstart or Docker) and an API key in SYNAPCORES_API_KEY. The MCP guide shows how to create one with two commands; a session token from /v1/auth/login works too.

EndpointWhat it does
POST /api/chatChat completion, streamed as NDJSON or as one JSON object with "stream": false
POST /api/generateText completion from a prompt
POST /api/embedEmbeddings for one input or a list of inputs
POST /api/embeddingsSingle embedding, older request format ("prompt")
GET /api/tagsModels available to your key
POST /api/showModel details: template, model info, capabilities
GET /api/psModels loaded in memory
GET /api/versionVersion probe, no key needed

List the models

bash
curl -s localhost:8080/api/version | jq -c .

curl -s localhost:8080/api/tags -H "Authorization: Bearer $SYNAPCORES_API_KEY" \
  | jq -r '.models[].name'
Output
{"version":"0.20.6"}
all-minilm:latest
d1:latest
qwen2.5-coder:7b

Your list shows the models on your install. The installer offers a chat model sized to your RAM, and the engine downloads the all-minilm embedding model on first start.

Chat

bash
MODEL=qwen2.5-coder:7b   # any chat model from /api/tags

curl -s localhost:8080/api/chat -H "Authorization: Bearer $SYNAPCORES_API_KEY" \
  -H 'Content-Type: application/json' \
  -d "{\"model\":\"$MODEL\",\"stream\":false,\"messages\":[{\"role\":\"user\",\"content\":\"In one sentence: what is a vector database?\"}]}" \
  | jq '{model, message, done}'
Output
{
  "model": "qwen2.5-coder:7b",
  "message": {
    "role": "assistant",
    "content": "A vector database is a type of database designed to store and manage data in the form of vectors, which can represent complex information such as text, images, or other high-dimensional data efficiently."
  },
  "done": true
}

Leave out "stream":false to stream tokens as newline-delimited JSON, like Ollama:

bash
curl -s -N localhost:8080/api/chat -H "Authorization: Bearer $SYNAPCORES_API_KEY" \
  -H 'Content-Type: application/json' \
  -d "{\"model\":\"$MODEL\",\"messages\":[{\"role\":\"user\",\"content\":\"Name three colors.\"}]}"
Output (first lines)
{"model":"qwen2.5-coder:7b","created_at":"2026-11-18T16:02:01.857043000Z","done":false,"message":{"role":"assistant","content":"Sure"}}
{"model":"qwen2.5-coder:7b","created_at":"2026-11-18T16:02:01.907453000Z","done":false,"message":{"role":"assistant","content":"!"}}
{"model":"qwen2.5-coder:7b","created_at":"2026-11-18T16:02:01.976066000Z","done":false,"message":{"role":"assistant","content":" Here"}}
…

Create embeddings

bash
curl -s localhost:8080/api/embed -H "Authorization: Bearer $SYNAPCORES_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"model":"all-minilm:latest","input":["SynapCores runs SQL and vector search in one engine","How do I reset my password?"]}' \
  | jq -c '{model, count: (.embeddings | length), dims: (.embeddings[0] | length)}'
Output
{"model":"all-minilm:latest","count":2,"dims":384}

With curl, send Content-Type: application/json on every POST, as in these examples. Ollama client libraries send it for you.

Point the official Ollama Python client at SynapCores

The ollama package reads OLLAMA_HOST and sends OLLAMA_API_KEY as a bearer token, so existing code needs no changes:

bash
python3 -m venv .venv && . .venv/bin/activate
pip install ollama

export OLLAMA_HOST=http://localhost:8080
export OLLAMA_API_KEY=$SYNAPCORES_API_KEY
python demo.py
demo.py
import ollama

print([m.model for m in ollama.list().models])

reply = ollama.chat(
    model="qwen2.5-coder:7b",
    messages=[{"role": "user", "content": "In one sentence: what is a vector database?"}],
)
print(reply.message.content)

emb = ollama.embed(model="all-minilm:latest", input="SynapCores runs SQL and vector search in one engine")
print(len(emb.embeddings[0]), "dimensions")
Output
['all-minilm:latest', 'd1:latest', 'qwen2.5-coder:7b']
A vector database is a type of database designed to store and manage data in the form of vectors, which can represent complex information such as text, images, or other high-dimensional data efficiently.
384 dimensions

To set the URL in code instead, use ollama.Client(host="http://localhost:8080", headers={"Authorization": "Bearer …"}).

Build on it

  • Build a RAG app with LlamaIndex: llama-index-llms-ollama talks to the chat model on your engine with a base URL and your token, and retrieval runs in SQL. See the LlamaIndex guide.
  • Store your documents in the same engine and search them by meaning from Python, with no separate vector database.
  • Keep retrieval in SQL: EMBED() and COSINE_SIMILARITY() in the quickstart use the same embedding model as /api/embed.

Next steps

Full reference

  • SQL reference: Every statement and function: EMBED, VECTOR, COSINE_SIMILARITY, GENERATE, Cypher, AutoML, agent memory.
  • API reference: The REST API. Your engine also serves its own OpenAPI schema at /v1/openapi.json.
  • System requirements: Supported platforms, memory and disk sizing.