Help Center  /  Developers

Set up the Local API Server

The Local API Server lets your own scripts and tools talk to Tholos AI through an OpenAI-compatible API — running on your machine, localhost only. It’s how you automate or integrate the on-device engine without anything ever leaving your device. This is a Business edition feature.

Before you start

  • You’re on the Business edition (the setting is locked otherwise).
  • A model is loaded in the app — the server only starts serving once there’s a model to answer with.

Turn it on

  1. Open Settings → Local API Server.
  2. Switch on Enable Local API Server.
  3. The Status line shows where it’s listening, e.g. Running — http://127.0.0.1:8756. (If no model is loaded yet, it reads “Enabled — starts once a model is loaded.”)

Get your API key

Every request must be authenticated with the key shown in the API Key row:

  • Copy — copies the key to your clipboard. Treat it like a password.
  • Regenerate — issues a new key and invalidates the old one (any script using the old key stops working until you update it).
  • Test — runs a quick built-in check and reports whether the server answered.

Your connection details

  • Base URL: http://127.0.0.1:8756/v1 (use the port shown in your Status line)
  • Auth header: Authorization: Bearer YOUR_API_KEY

Make your first call

With the server running, this sends a chat request from a terminal:

curl http://127.0.0.1:8756/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{"role": "user", "content": "Say hello in one sentence."}]
  }'

Omitting model uses whichever model is currently loaded in the app. For the full endpoint list, parameters, and code samples in Python and JavaScript, see the Local API Server reference.

It stays on your machine. The server binds to 127.0.0.1 (localhost) and has no outbound path — it can’t be reached from other machines on your network, and nothing is sent anywhere. It’s for your scripts on this computer.

Related articles

← Back to Help Center