> ## 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.

# Health Check

> Check server health and quota using the Python client

## health

Returns whether the server is running, which **embedding provider** and **model** are configured, and how many items are stored versus the global cap (default 100,000).

```python theme={null}
client.health() -> dict[str, Any]
```

**API:** `GET /health` — see [Health](/on-prem/api-references/health)

### Examples

```python theme={null}
from moorcheh import MoorchehClient, MoorchehApiError

with MoorchehClient("http://localhost:8080") as client:
    health = client.health()

    print(health["status"])              # ok
    print(health["embedding_provider"])  # ollama, openai, or cohere
    print(health["model"])               # e.g. embed-v4.0
    print(health["items"])               # current count across all namespaces
    print(health["max_items"])           # 100000
    print(health["remaining"])           # max_items - items
```

## Returns

<ResponseField name="status" type="string">
  Server health. `"ok"` when the API is running and reachable.
</ResponseField>

<ResponseField name="embedding_provider" type="string">
  Active provider: `ollama`, `openai`, or `cohere`.
</ResponseField>

<ResponseField name="model" type="string">
  Embedding model id for the configured provider. Used for text documents and text search queries.
</ResponseField>

<ResponseField name="items" type="number">
  Total number of stored items across **all** namespaces (text documents + vectors).
</ResponseField>

<ResponseField name="max_items" type="number">
  Global storage cap for this instance. Default is `100000`.
</ResponseField>

<ResponseField name="remaining" type="number">
  How many **new** items you can still add: `max_items - items`. Uploads that would exceed this return **409**.
</ResponseField>

```python Example return value theme={null}
{
  "status": "ok",
  "model": "nomic-embed-text",
  "items": 7,
  "max_items": 100000,
  "remaining": 99993,
}
```

<Note>
  Field order in the response may vary; all fields above are always present on success.
</Note>

### Error Handling

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

```python theme={null}
from moorcheh import MoorchehApiError

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

## Related Operations

* [API: Health](/on-prem/api-references/health)
* [CLI: moorcheh status](/on-prem/cli/runtime/status)
* [Python: documents.upload()](/on-prem/python-client/data/upload-documents) — **409** quota errors include the same fields in `MoorchehApiError.body`
