Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.moorcheh.ai/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Returns whether the server is running, which Ollama embedding model is configured, and how many items are stored versus the global cap (default 100,000). Use this before uploads to check remaining quota, or to confirm Ollama is configured for text embedding and search.

Method

client.health() -> dict

API

GET /health — see Health

Example

from moorcheh import MoorchehApiClient, MoorchehApiError

client = MoorchehApiClient("http://localhost:8080")

health = client.health()

print(health["status"])       # ok
print(health["model"])        # e.g. nomic-embed-text
print(health["items"])        # current count across all namespaces
print(health["max_items"])    # 100000
print(health["remaining"])    # max_items - items

Returns

status
string
Server health. "ok" when the API is running and reachable.
model
string
Ollama embedding model configured for the server (for example "nomic-embed-text"). Used when embedding text documents and text search queries.
items
number
Total number of stored items across all namespaces (text documents + vectors).
max_items
number
Global storage cap for this instance. Default is 100000.
remaining
number
How many new items you can still add: max_items - items. Uploads that would exceed this return 409.
Example return value
{
  "status": "ok",
  "model": "nomic-embed-text",
  "items": 7,
  "max_items": 100000,
  "remaining": 99993,
}
Field order in the response may vary; all fields above are always present on success.

Errors

Non-2xx responses raise MoorchehApiError (for example if the server is not running or unreachable).
from moorcheh import MoorchehApiError

try:
    health = client.health()
except MoorchehApiError as e:
    print(e.status_code, e.body)