# Nocturne

Inference on idle Apple Silicon Macs

Nocturne is a self-hosted, OpenAI-compatible inference project using idle Apple Silicon Macs. Each request runs on one worker, not a distributed cluster of Macs.

Choose a Nocturne instance and obtain its public API base URL and API key from its operator. Check its available models and status before sending work: workers and availability can change.

Install the OpenAI Python client in your own environment. Set NOCTURNE_BASE_URL to the chosen instance's API base URL and NOCTURNE_API_KEY to your own key. Select a model returned by that instance, not a hardcoded model name.

The upstream project describes Lightning payment support. Availability, credit and payment arrangements are instance-specific; review the chosen operator's terms before use. Hbit does not collect keys, submit prompts, buy credit or initiate payments.

This is a client introduction, not a hosted-service availability promise. Consult the current upstream README for deployment, worker setup and billing details.

[Nocturne source and current documentation](https://github.com/lucasfth/nocturne#readme)

[Apple Silicon worker setup](https://github.com/lucasfth/nocturne/blob/main/docs/mac-setup.md)

## List the chosen instance's models (run on your own machine)

```python
# Install in your own Python environment: python -m pip install openai
# Set NOCTURNE_BASE_URL and NOCTURNE_API_KEY privately first.
import os
from openai import OpenAI

client = OpenAI(
    base_url=os.environ["NOCTURNE_BASE_URL"],
    api_key=os.environ["NOCTURNE_API_KEY"],
)
for model in client.models.list().data:
    print(model.id)
```
