API access¶
Every account on mit.nonlocally.org can call the platform from code with a personal API
key, through the same OpenAI-compatible surface the chat UI uses. Each claim on this page
carries the date it was checked against the running platform; tests/test_goal_20260904.py
pins the page to the committed configuration so it cannot silently drift.
1. Create a key¶
Settings → Account → API keys → Create new secret key. Copy the key (sk-…); the same
pane lets you regenerate or delete it later.
Measured 2026-09-04
API keys are enabled for every user (auth.enable_api_keys = true, user permission
features.api_keys = true) and no endpoint restrictions are configured, so a key reaches
every endpoint your account can. Browser sessions expire after 4 weeks (auth.jwt_expiry);
keys do not carry an expiry — revoke by deleting or regenerating.
2. Base URL, endpoints, auth¶
| Base URL | https://mit.nonlocally.org/api |
| Auth header | Authorization: Bearer sk-… |
| List models | GET /api/models — exactly the models your account sees in the picker |
| Chat | POST /api/chat/completions — OpenAI chat-completions shape, stream: true or false |
export OWUI_KEY="sk-…"
curl -sS https://mit.nonlocally.org/api/chat/completions \
-H "Authorization: Bearer $OWUI_KEY" -H "Content-Type: application/json" \
-d '{"model":"claude-haiku-4-5","messages":[{"role":"user","content":"Reply with the single word OK"}],"max_tokens":5}'
from openai import OpenAI
client = OpenAI(base_url="https://mit.nonlocally.org/api", api_key="sk-…")
print([m.id for m in client.models.list().data][:5])
r = client.chat.completions.create(model="claude-haiku-4-5",
messages=[{"role": "user", "content": "Reply with the single word OK"}],
max_tokens=5)
print(r.choices[0].message.content, r.usage)
Measured 2026-09-04
With a user key: GET /api/models → 200 (47 models for an admin account — visibility is
per account); the request above on claude-haiku-4-5 → OK with a usage block
(13 prompt / 4 completion tokens). An invalid key → 401. The model gateway behind the
API (LiteLLM) is reachable only inside the cluster; this /api surface is the one public
API.
Model ids are the ones the picker shows: plain routes such as claude-sonnet-5, gpt-5,
grok-4.6, glm, [local] Qwen3 235B, and the presets (code-agent, formal-verifier,
photonics-designer, …). Every call — chat or API — draws down the same subscription allowance:
see Usage & metering.
3. Function calling: which models honour a tools parameter¶
If your code passes OpenAI-style tools, the call is only useful on a model that returns
tool_calls. The list below is the set of routes whose FORCED-tool_choice probe returned a
real tool call, run from inside the cluster against the gateway (record:
tests/data/tool_calling_probe.json, measured 2026-09-01T23:29Z, glm folded in 2026-09-03 via #506; the test above fails if this
list and the record diverge).
claude-opus-5 · claude-sonnet-5 · claude-haiku-4-5 · claude-opus-4-6 ·
claude-sonnet-4-6 · claude-opus-4-5-20251101 · claude-sonnet-4-5-20250929 · gpt-5 ·
o3 · or-gpt-5 · or-gpt-5-mini · or-o3 · or-o4-mini · grok-4.6 · qwen3-5-397b ·
[hf] Qwen3.5 397B · workspace-agent · glm
Routes added after that probe and declared tool-capable at the gateway but not yet in the
committed record: [local] Qwen3.8 27B
(FORCED probe through the proxy 2026-09-03), glimmer. Reasoning-only and prover routes
(mathstral, deepseek-prover-7b, deepseek-r1, [local] Qwen3 235B) answer in prose and
should be called without tools.
Server-side tools run in the chat UI, not through a bare API call
The presets' built-in tools — marimo notebooks, GDSFactory, VVUQ Lean compile, GitHub —
execute inside Open WebUI's chat pipeline. A plain POST /api/chat/completions to
code-agent returns a completion and runs none of them (measured 2026-09-02: tool_ids
with stream: false executes no tool). Use the chat UI, or bring your own tools with the
tools parameter on a model from the list above.
4. Limits¶
- Subscription allowance per account (chat + API together): see Usage & metering.
- Gateway: 64 requests in flight platform-wide, 120 s per request, 2 automatic retries
(
k8s/litellm/config.yaml,general_settings/litellm_settings). No per-user rate limit is configured today. - Uploads, Knowledge collections and notebooks are chat-UI features; the API is text in, text out.