Models and OpenAI compatibility
GET /v1/models lists the local models installed on this Mac, by display name. POST /v1/chat/completions runs one of them. Both need only the models scope.
curl -s http://127.0.0.1:8780/v1/models \
-H "Authorization: Bearer $OLIX_API_TOKEN"{"object":"list","data":[{"id":"blink 1.1","object":"model","created":0,"owned_by":"olix","olix_id":"olx-1","resident":false},{"id":"flux","object":"model","created":0,"owned_by":"olix","olix_id":"olx-3","resident":false}]}
The model is named by display name (blink 1.1, flux) or by id (olx-1, olx-3); olix_id shows the id and resident says whether the engine has it loaded right now. Only models in the Mac's install manifest are listed. A name that is not installed is 404 model_not_found.
curl -s http://127.0.0.1:8780/v1/chat/completions \
-H "Authorization: Bearer $OLIX_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"model": "blink 1.1", "messages": [{"role": "user", "content": "Name a colour."}]}'{"id":"chatcmpl-olixmw507q2x1","object":"chat.completion","created":1793971336,"model":"blink 1.1","choices":[{"index":0,"finish_reason":"stop","message":{"role":"assistant","content":"stand-in completion for: Name a colour."}}],"usage":{"prompt_tokens":4,"completion_tokens":7,"total_tokens":11,"prompt_tokens_details":{"cached_tokens":0}}}
What is supported
messages(system, developer, user, assistant, tool),stream,max_tokens/max_completion_tokens,temperature,top_p,top_k,presence_penalty,toolsandtool_choicepassthrough (the model may return tool calls; you run them).- Usage is the engine's own count of prompt and output tokens.
- This is the model's own answer. The olix tool loop (files, shell, web) does not run here; that is
POST /v1/turns.
Memory and refusals
This is a 16 GB-class Mac that is often busy. The engine admits a model only if it fits in the memory the Mac can spare. If it does not, you get 503 model_memory with the engine's own reason, and no other model is substituted: the response says exactly what could not run. Requests from the API run at background priority, so they yield to the owner's own use of olix.
The OpenAI SDK
Set base_url to http://127.0.0.1:8780/v1 and api_key to your token. A worked, executed example is in the Quickstart.