API Documentation

OllamoMUI is a drop-in Ollama replacement — all standard Ollama endpoints work unmodified. Plus, we add custom endpoints for RAG, memory, settings, and provider management.

Ollama Compatible (3)OpenAI Compatible (2)RAG (4)Memory (2)Settings (5)

Ollama Compatible

GET/api/tags

List all available models. Returns model names, sizes, and metadata.

curl https://ollamomui-backend.onrender.com/api/tags
POST/api/chat

Chat completion streaming endpoint. Drop-in replacement for Ollama's /api/chat.

curl -X POST https://ollamomui-backend.onrender.com/api/chat \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'
POST/api/generate

Text generation endpoint. Drop-in replacement for Ollama's /api/generate.

curl -X POST https://ollamomui-backend.onrender.com/api/generate \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o-mini","prompt":"Hello"}'

OpenAI Compatible

POST/v1/chat/completions

OpenAI-compatible chat completions. Use any OpenAI SDK/curl with the OllamoMUI base URL.

curl -X POST https://ollamomui-backend.onrender.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'
GET/v1/models

List models in OpenAI-compatible format.

curl https://ollamomui-backend.onrender.com/v1/models

RAG

POST/api/rag/query

Query the RAG knowledge base. Optionally specify a collection. Returns chunk matches with similarity scores.

curl -X POST https://ollamomui-backend.onrender.com/api/rag/query \
  -H "Content-Type: application/json" \
  -d '{"query":"What is RAG?","top_k":5}'
POST/api/rag/upload

Upload a document (PDF, TXT, CSV, MD, JSON, DOCX) for ingestion into the RAG pipeline.

curl -X POST https://ollamomui-backend.onrender.com/api/rag/upload \
  -F "file=@document.pdf"
GET/api/rag/collections

List all RAG collections with document counts.

curl https://ollamomui-backend.onrender.com/api/rag/collections
DELETE/api/rag/collections/{id}

Delete a RAG collection and all its documents.

curl -X DELETE https://ollamomui-backend.onrender.com/api/rag/collections/1

Memory

GET/api/memory

Retrieve conversation memory history with pagination.

curl https://ollamomui-backend.onrender.com/api/memory?session_id=abc123
POST/api/memory/clear

Clear memory for a session or all sessions.

curl -X POST https://ollamomui-backend.onrender.com/api/memory/clear \
  -H "Content-Type: application/json" \
  -d '{"session_id":"abc123"}'

Settings

GET/api/providers

List all configured LLM providers and their status.

curl https://ollamomui-backend.onrender.com/api/providers
PUT/api/providers/{name}

Update an LLM provider's configuration (API key, model, endpoint).

curl -X PUT https://ollamomui-backend.onrender.com/api/providers/gpt-4o-mini \
  -H "Content-Type: application/json" \
  -d '{"api_key":"sk-...","model":"gpt-4o-mini"}'
GET/api/settings/database

Get current database URL configuration.

curl https://ollamomui-backend.onrender.com/api/settings/database
PUT/api/settings/database

Update database connection URL and reconnect.

curl -X PUT https://ollamomui-backend.onrender.com/api/settings/database \
  -H "Content-Type: application/json" \
  -d '{"database_url":"postgresql://user:pass@host:5432/db"}'
GET/api/settings/database/test

Test database connectivity without applying changes.

curl https://ollamomui-backend.onrender.com/api/settings/database/test?url=postgresql://...