Docs›Reference›Office API

Office API

Each joined computer runs a small relay that speaks the OpenAI chat API. Any OpenAI-compatible client on that computer can use the office, with the same models, policy and budgets as the app.

Find the relay#

The relay listens on 127.0.0.1 only, on a free port written to a file in the data folder:

# Mac
cat "$HOME/Library/Application Support/Emergic/data/emergic/relay.port"

Ask a question#

curl http://127.0.0.1:$(cat "$HOME/Library/Application Support/Emergic/data/emergic/relay.port")/v1/chat/completions \
  -H "Authorization: Bearer $EMERGIC_USER_TOKEN" -H 'Content-Type: application/json' \
  -d '{"model":"qwen3-4b","messages":[{"role":"user","content":"Hello"}]}'

EMERGIC_USER_TOKEN is your sign-in token from your admin. /v1/models lists the models you may use.

What the relay does#

It forwards each request and your token to the office server over mutual TLS, with your computer's certificate. A computer must have joined the office to use it.

Model ladders let an app that hard-codes a model name, such as gpt-4o, reach office models. Office model.