Chat & completions
Build conversational features with local language models and an OpenAI-compatible chat endpoint.
/v1/chat/completionsLocal inference · 4D integration
Bring local AI to Mac and Windows. One CPU-first inference server for chat, embeddings, reranking, speech, and decisions — with a 4D component to connect it all.
More than a conversation
Load the models your application needs. Call familiar HTTP endpoints from 4D, your terminal, or another client.
Build conversational features with local language models and an OpenAI-compatible chat endpoint.
/v1/chat/completionsTurn text into vectors, add contextualized embeddings, and rank documents for retrieval.
/v1/embeddings · /v1/rerankGive your application a voice with a compatible speech model, served through the local API.
/v1/audio/speechEvaluate choices with dedicated Kev, d1, Laya, or Strands decision models — separately from chat.
/v1/systemoneEach capability requires its own compatible model. API compatibility is endpoint-specific, not a complete implementation of the upstream services. Read the API & model reference →
Two ways in
Start the server from the command line and send HTTP requests. No 4D installation needed.
Explore the CLI → 02 / 4D COMPONENTLet the component download configured models, launch the server in the background, and shut it down when needed.
Integrate with 4D →Compatibility before complexity
This distribution primarily runs inference on CPU cores for broad compatibility. Choose a model and quantization that fit your machine's memory and performance budget.
| Platform | Architecture | What to know |
|---|---|---|
| macOS | Apple Silicon & Intel | Universal runtime ONNX Runtime targets macOS 13.3+. Other bundled dependencies may require a newer system. |
| Windows | x64 & ARM64 | Deploy the matching executable and its runtime libraries together. |
| 4D integration | 4D 20+ | Optional for direct HTTP use. Use the component for application-managed inference. |
| Models | Compatible ONNX exports | Download separately. Keep required tokenizer, configuration, and external data files with the model. |
GenAI 0.12.0 and Extensions 0.14.0 are separate dependencies. Not every ONNX model is interchangeable: chat uses GenAI-compatible exports; other tasks use their own model layouts. Runtime provenance & build details →
A short path to inference
Get a matching build from the releases or build from source. Keep its runtime libraries alongside the executable, then download a compatible chat model. Replace the example path with its complete GenAI model directory.
./onnx-genai -s \
-m /path/to/chat-model \
-h 127.0.0.1 \
-p 8080
On Windows, use onnx-genai.exe with the same flags and your local model path. Leave the server running. In another terminal, wait until model discovery succeeds; starting the process does not mean model loading is complete.
curl http://127.0.0.1:8080/v1/models
Then send a message to the loaded chat model:
curl http://127.0.0.1:8080/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"messages": [
{"role": "user", "content": "What can I build with local AI?"}
],
"max_tokens": 128,
"temperature": 0.7,
"stream": false
}'
The examples bind to 127.0.0.1. Do not expose the listener to a network without deliberately securing access. Model downloads require a connection; review each model's license before deployment.
Build something that stays with you
Connect through AI Kit, explore model options, or build the native engine for your target platform.