osmoss.ai Docs
Everything you need to install, configure, and integrate osmoss.ai.
Quick Start
Get osmoss.ai running locally in under five minutes. The install script detects your OS and hardware, downloads the runtime, and starts the API server automatically.
1. Install
Run the one-line install script. On macOS you can also use Homebrew.
# Linux & macOS
curl -fsSL https://get.osmoss.ai | sh
# macOS (Homebrew)
brew install osmoss/tap/osmoss
# Windows (PowerShell, run as Administrator)
irm https://get.osmoss.ai/win | iex2. Pull a model
Download a quantised model from the registry. Mistral 7B Q4 is a good starting point — fast on most hardware.
osmoss pull mistral-7b-q43. Start the server
Launch the runtime. The OpenAI-compatible API starts on port 11434.
osmoss serve4. Make your first request
Send a chat completion request with cURL to verify everything is working.
curl http://localhost:11434/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "mistral-7b-q4",
"messages": [{"role": "user", "content": "Hello!"}]
}'API Reference
osmoss.ai exposes an OpenAI-compatible REST API on port 11434. Any client that works with the OpenAI API works here without modification — just change the base URL.
POST /v1/chat/completions
Generate a chat completion. Supports streaming via Server-Sent Events when stream is true.
# Request
curl http://localhost:11434/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "mistral-7b-q4",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain quantum entanglement briefly."}
],
"temperature": 0.7,
"max_tokens": 512,
"stream": false
}'
# Response
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1700000000,
"model": "mistral-7b-q4",
"choices": [{
"index": 0,
"message": {"role": "assistant", "content": "Quantum entanglement is..."},
"finish_reason": "stop"
}],
"usage": {"prompt_tokens": 28, "completion_tokens": 94, "total_tokens": 122}
}POST /v1/completions
Raw text completion. Useful for non-chat models or prompt-completion workflows.
curl http://localhost:11434/v1/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "mistral-7b-q4",
"prompt": "The capital of France is",
"max_tokens": 16,
"temperature": 0
}'POST /v1/embeddings
Generate vector embeddings for a string or array of strings. Returns a 1536-dimension float array per input.
curl http://localhost:11434/v1/embeddings \
-H 'Content-Type: application/json' \
-d '{
"model": "mistral-7b-q4",
"input": "The quick brown fox"
}'
# Response
{
"object": "list",
"data": [{"object": "embedding", "index": 0, "embedding": [0.0023, -0.0091, ...]}],
"model": "mistral-7b-q4",
"usage": {"prompt_tokens": 5, "total_tokens": 5}
}GET /v1/models
List all models currently available on the runtime.
curl http://localhost:11434/v1/models
# Response
{
"object": "list",
"data": [
{"id": "mistral-7b-q4", "object": "model", "created": 1700000000, "owned_by": "osmoss"},
{"id": "llama3-8b-q5", "object": "model", "created": 1700000001, "owned_by": "osmoss"}
]
}GET /health
Health check endpoint. Returns 200 OK when the runtime is ready to serve requests. Use this for load balancer probes.
curl http://localhost:11434/health
# {"status": "ok", "model": "mistral-7b-q4", "uptime": 3821}CLI Reference
The osmoss CLI manages models, controls the runtime, and exposes diagnostics. All commands accept --help for full option listings.
osmoss pull
Download a model from the registry. Quantisation variant is specified with a suffix (q4, q5, q8). Omitting the suffix pulls the recommended default.
osmoss pull mistral-7b-q4
osmoss pull llama3-8b # pulls recommended variant
osmoss pull phi3-mini-q8
osmoss pull gemma-7b-q4osmoss serve
Start the API server. Flags override config.toml values.
osmoss serve
osmoss serve --host 0.0.0.0 --port 11434
osmoss serve --model llama3-8b-q5 --gpu-layers 35osmoss list
List all locally available models with their size, quantisation, and hash.
osmoss list
# NAME SIZE QUANT HASH
# mistral-7b-q4 4.1 GB Q4_K_M 3f2a...
# llama3-8b-q5 5.7 GB Q5_K_M 9c1b...osmoss set-default
Set the default model served when no model is specified in the request. Hot-swaps at runtime with zero downtime.
osmoss set-default llama3-8b-q5osmoss remove
Delete a model from local storage to free disk space.
osmoss remove mistral-7b-q4osmoss info & doctor
Display hardware detection results and run a full diagnostic report.
osmoss info # GPU, CPU, memory, active backend
osmoss doctor # full diagnostic with pass/fail checksosmoss service
Install and manage the background service (systemd on Linux, launchd on macOS, Windows Service on Windows).
osmoss service install
osmoss service start
osmoss service stop
osmoss service status
osmoss service uninstallConfiguration
osmoss.ai is configured via config.toml. Every value can be overridden with an environment variable prefixed OSMOSS_. CLI flags take the highest precedence.
config.toml — full reference
The config file lives at ~/.osmoss/config.toml on Linux/macOS and %APPDATA%\osmoss\config.toml on Windows.
[runtime]
host = "127.0.0.1" # bind address
port = 11434 # API port
ctx_size = 4096 # context window (tokens)
gpu_layers = -1 # layers to offload; -1 = all
threads = 8 # CPU threads (ignored when GPU is active)
batch_size = 512 # prompt eval batch size
[model]
default = "mistral-7b-q4"
dir = "~/.osmoss/models"
[logging]
level = "info" # debug | info | warn | error
format = "text" # text | json
file = "" # path to log file; empty = stdout
[dashboard]
enabled = true
port = 11435Environment variables
Every config key maps to an OSMOSS_ environment variable. Underscores replace dots; keys are uppercased.
OSMOSS_HOST=0.0.0.0
OSMOSS_PORT=11434
OSMOSS_CTX_SIZE=8192
OSMOSS_GPU_LAYERS=35
OSMOSS_THREADS=16
OSMOSS_MODEL_DEFAULT=llama3-8b-q5
OSMOSS_LOGGING_LEVEL=debug
OSMOSS_LOGGING_FORMAT=jsonModel Catalogue
osmoss.ai ships curated, hardware-optimised weights for every major open-weight model family. Quantised variants trade a small accuracy loss for dramatically lower memory requirements.
Supported models
Pull any model by its registry name. The Recommended column shows the best variant for most hardware.
# MODEL FAMILY PARAMS RECOMMENDED
# mistral-7b-q4 Mistral 7B mistral-7b-q4
# mistral-8x7b-q4 Mistral 56B mistral-8x7b-q4
# llama3-8b-q5 LLaMA 3 8B llama3-8b-q5
# llama3-70b-q4 LLaMA 3 70B llama3-70b-q4
# phi3-mini-q8 Phi-3 3.8B phi3-mini-q8
# phi3-medium-q4 Phi-3 14B phi3-medium-q4
# gemma-2b-q8 Gemma 2B gemma-2b-q8
# gemma-7b-q4 Gemma 7B gemma-7b-q4
# qwen2-7b-q4 Qwen 2 7B qwen2-7b-q4
# deepseek-r1-7b-q4 DeepSeek 7B deepseek-r1-7b-q4
# falcon-7b-q4 Falcon 7B falcon-7b-q4Quantisation formats
osmoss.ai supports GGUF and safetensors. GGUF quantised variants are recommended for most deployments.
# VARIANT BITS VRAM (7B) QUALITY
# q4 4-bit ~4 GB good — recommended default
# q5 5-bit ~5 GB better accuracy, slightly more VRAM
# q8 8-bit ~8 GB near-lossless, best for production
# f16 16-bit ~14 GB full precision, maximum qualityAuth & Security
By default osmoss.ai binds to 127.0.0.1 and requires no authentication — it is only reachable from the local machine. When exposing the API on a network, enable the API key middleware.
Enabling API key auth
Set one or more API keys in config.toml. The server then requires an Authorization: Bearer <key> header on every request.
[auth]
enabled = true
keys = ["sk-local-abc123", "sk-local-def456"]Using a key in requests
Pass the key as a Bearer token. This is identical to how you would authenticate with the OpenAI API.
curl http://your-server:11434/v1/chat/completions \
-H 'Authorization: Bearer sk-local-abc123' \
-H 'Content-Type: application/json' \
-d '{"model": "mistral-7b-q4", "messages": [{"role": "user", "content": "Hi"}]}'TLS / HTTPS
osmoss.ai does not terminate TLS itself. Place it behind a reverse proxy such as nginx or Caddy for HTTPS.
# Caddy example — automatic HTTPS with Let's Encrypt
ai.example.com {
reverse_proxy localhost:11434
}Deployment
osmoss.ai can be deployed as a systemd service, a Docker container, or a Kubernetes workload. All three approaches are production-ready.
systemd (Linux)
The CLI generates and installs a systemd unit file automatically.
osmoss service install
systemctl enable --now osmoss
journalctl -u osmoss -f # follow logsDocker
The official image is available on Docker Hub. Mount a volume for model persistence.
docker run -d \
--name osmoss \
--gpus all \
-p 11434:11434 \
-v ~/.osmoss/models:/root/.osmoss/models \
osmoss/osmoss:latest serve --host 0.0.0.0Kubernetes (Helm)
Install the Helm chart for a production-grade Kubernetes deployment with GPU node affinity and a PersistentVolumeClaim for models.
helm repo add osmoss https://charts.osmoss.ai
helm repo update
helm install osmoss osmoss/osmoss \
--set runtime.gpuLayers=-1 \
--set model.default=mistral-7b-q4 \
--set persistence.size=50GiSDK Examples
osmoss.ai is a drop-in replacement for the OpenAI API. Set the base URL to http://localhost:11434/v1 and use any api_key string — it is not validated locally.
Python
Use the official openai Python package. Works with both sync and async clients.
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:11434/v1",
api_key="local",
)
# Streaming chat completion
with client.chat.completions.stream(
model="mistral-7b-q4",
messages=[{"role": "user", "content": "Write a haiku about on-device AI."}],
) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)Node.js / TypeScript
Use the official openai npm package.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'http://localhost:11434/v1',
apiKey: 'local',
});
const stream = await client.chat.completions.stream({
model: 'mistral-7b-q4',
messages: [{ role: 'user', content: 'Explain GGUF quantisation.' }],
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? '');
}cURL
Raw HTTP — useful for testing, shell scripts, and CI pipelines.
# Non-streaming
curl http://localhost:11434/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"mistral-7b-q4","messages":[{"role":"user","content":"Hello"}]}'
# Streaming (SSE)
curl http://localhost:11434/v1/chat/completions \
-H 'Content-Type: application/json' \
--no-buffer \
-d '{"model":"mistral-7b-q4","stream":true,"messages":[{"role":"user","content":"Count to 5"}]}'