Quickstart


Run open models for chat, images, speech and video on your own machines. The API speaks the OpenAI and Anthropic formats. Your team gets chats, files and documents on top, and the assistant can write and run code. No GPU needed for the engine, and a GPU makes it faster.
Install and start LocalAI
Follow the desktop app guide to start the server on Linux, macOS, or Windows 10 or 11.
On Android, see the Android client guide for APK availability. The app connects to a LocalAI server on another machine.
Alternative: install with a script
On Linux or a Mac with Apple Silicon, run the install script, then start LocalAI:
The script installs the local-ai program and does not start it. The command local-ai starts the server with no model. You should see the log line LocalAI is started and running with the address :8080. If the script says the folder is not on your PATH, run the export line it prints.
On Windows, use the PowerShell script irm https://localai.io/install.ps1 | iex. See Install on Windows.
Alternative: use Docker Compose
On an Intel Mac, or when you prefer a container, use Docker Compose instead:
The compose file keeps models, backends, settings and data in named volumes, so they stay when you recreate or upgrade the container.
See the install guide for the other ways to install.
For a GPU in a container, use the image that matches your hardware:
| Hardware | Docker image |
|---|---|
| CPU only | localai/localai:latest |
| NVIDIA, CUDA 12 | localai/localai:latest-gpu-nvidia-cuda-12 |
| NVIDIA, CUDA 13 | localai/localai:latest-gpu-nvidia-cuda-13 |
| AMD (ROCm) | localai/localai:latest-gpu-hipblas |
| Intel GPU | localai/localai:latest-gpu-intel |
| Vulkan | localai/localai:latest-gpu-vulkan |
To use a GPU, change image in docker-compose.yaml to the tag for your hardware, and remove the # from the block for your GPU. With docker run, add --gpus all for NVIDIA, or the --device flags for AMD, Intel and Vulkan. NVIDIA Jetson images and the full flag list are in Container images.
Chat in the web interface
Open http://localhost:8080 in your browser.
- On a fresh install, accept the model that the first-run card recommends. LocalAI downloads it when you agree. Or open Models, then Explore, search for
gemma-4-e2b-it-qat-q4_0and choose Install. It’s a small Google Gemma 4 model that runs on a CPU and reads images. The download is 4.3 GB in total: 3.35 GB for the model and 0.99 GB for the image projector. The first-run card shows 3.1 GB because it counts the model file only, in binary units. - Open Chats, select the model from the model list, type a message and send it.
On a CPU the first reply takes longer because the model has to load.
Use the globe button in the navigation to choose 简体中文 (Simplified Chinese). The selection is saved in this browser and also applies to the built-in Studio, Talk, Voice, Face, Fine-tuning and Quantization add-on pages. Model names, API paths and configuration keys keep their original spelling; model responses and messages returned by external services are not translated by this setting.
Use the API
Any OpenAI SDK or client works when you point it at http://localhost:8080. This request uses the model you just installed:
The text of the reply is in choices[0].message.content. If you turned on API keys (see below), add -H "Authorization: Bearer <your-key>" to the request.
LocalAI also speaks the Anthropic Messages API and the Open Responses API. Try it out has an example for each endpoint.
Install models from the command line
Name a model after run and LocalAI downloads it before it starts the API:
The first two names come from the model gallery. The third one points at a file on Hugging Face. To list the gallery or install a model without starting the server:
ollama://, oci:// and a URL of a model configuration file work the same way. Set up models lists every form. LocalAI checks your GPU when you install a model and downloads the matching backend (GPU acceleration). For all options, see the CLI reference or run local-ai --help.
Build an agent
An agent is a chat with fixed instructions and a fixed set of tools and files. It’s part of LocalAI, so you need no extra install. On a server with accounts, an administrator switches saved agents on first.
- Install a model that supports tool calling. The gallery entry of
gemma-4-e2b-it-qat-q4_0turns on automatic tool-call parsing, so it’s a good first try. If the agent never calls a tool, switch to a larger model. - Open Agents in the sidebar and choose New agent.
- Give it a name and instructions, then choose Create agent.
- Choose Chat on the agent’s row.
Build your first agent has the full walkthrough.
Before you expose it
LocalAI listens on port 8080 on all interfaces, and authentication is off. Protect the API before you expose it beyond your own machine:
- API keys. Run with
LOCALAI_API_KEY=your-key. API keys give full admin access with no role separation. - User authentication. Run with
LOCALAI_AUTH=truefor admin and user roles, OAuth login, per-user API keys and usage tracking. See Authentication and authorization.