LocalAI: Self-Hosted, Open Source AI Alternative to OpenAI
This repository profile is provided by osrepos.com, an open source repository discovery platform.
Summary
LocalAI is a free, open-source alternative to OpenAI, Claude, and similar services, designed for self-hosted, local-first AI inference. It provides a drop-in REST API compatible with OpenAI specifications, enabling users to run large language models, generate images, and process audio on consumer-grade hardware, often without requiring a dedicated GPU. This project supports a wide array of models and offers features like P2P inference and agentic capabilities.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
LocalAI is a powerful, free, and open-source project that serves as a self-hosted, local-first alternative to commercial AI APIs like OpenAI and Claude. It offers a drop-in REST API compatible with OpenAI's specifications, allowing you to run various AI models directly on your own hardware. LocalAI is designed to operate efficiently on consumer-grade machines, often without the need for a dedicated GPU, making advanced AI capabilities accessible to everyone. Built primarily in Go, it supports a wide range of tasks including text generation, image generation, audio processing (text-to-audio, audio-to-text), video generation, voice cloning, and even distributed, P2P, and decentralized inference.
Installation
Getting started with LocalAI is straightforward, with options for macOS and containerized environments like Docker.
macOS Download
For macOS users, a .dmg installer is available. Note that it might require a workaround for unsigned applications:
After installation, you might need to run this command in your terminal:
sudo xattr -d com.apple.quarantine /Applications/LocalAI.app
Containers (Docker, Podman, etc.)
LocalAI provides various Docker images for different hardware configurations. For a CPU-only setup, you can use:
docker run -ti --name local-ai -p 8080:8080 localai/localai:latest
For NVIDIA, AMD, or Intel GPUs, specific images are available. Refer to the official documentation for detailed commands and the latest images for your hardware.
For more comprehensive installation guides, including GPU acceleration and Kubernetes deployment, visit the official Getting Started documentation.
Examples
Once LocalAI is running, you can easily load and interact with various models. LocalAI supports models from its own gallery, Hugging Face, Ollama, and OCI registries.
Here are some examples of how to run models:
# From the model gallery (see available models at https://models.localai.io)
local-ai run llama-3.2-1b-instruct:q4_k_m
# Start LocalAI with a model directly from Hugging Face
local-ai run huggingface://TheBloke/phi-2-GGUF/phi-2.Q8_0.gguf
# Install and run a model from the Ollama OCI registry
local-ai run ollama://gemma:2b
# Run a model from a configuration file
local-ai run https://gist.githubusercontent.com/.../phi-2.yaml
# Install and run a model from a standard OCI registry (e.g., Docker Hub)
local-ai run oci://localai/phi-2:latest
LocalAI features automatic backend detection, which identifies your system's GPU capabilities and downloads the appropriate backend for the model you choose.
Why Use LocalAI?
LocalAI offers compelling advantages for developers and users looking for flexible and private AI solutions:
- Open Source and Free: Licensed under MIT, LocalAI is completely free to use and modify, fostering community contributions and transparency.
- Privacy and Control: By running AI models locally, your data remains on your hardware, ensuring maximum privacy and control over your sensitive information.
- Cost-Effective: Eliminate recurring API costs associated with cloud-based AI services. Run models as much as you need without worrying about usage fees.
- Broad Model Compatibility: Supports a vast array of models for text generation (LLMs), image generation (Stable Diffusion, Diffusers), audio processing (Whisper, Coqui TTS), vision, object detection, and more.
- Hardware Flexibility: Designed to run on consumer-grade hardware, including CPUs, and supports various GPUs (NVIDIA, AMD, Intel, Apple Metal, Vulkan), making it accessible even without high-end specialized hardware.
- OpenAI API Compatibility: Its API is a drop-in replacement for OpenAI, simplifying integration into existing applications and workflows.
- Advanced Features: Includes innovative capabilities like P2P and distributed inference for collaborative AI, Model Context Protocol (MCP) for agentic capabilities, and built-in autonomous AI agents.
- Integrated WebUI: Comes with a user-friendly web interface for easy interaction and model management.
Links
- GitHub Repository: https://github.com/mudler/LocalAI
- Official Documentation: https://localai.io/
- Model Gallery: https://models.localai.io/
- Discord Community: https://discord.gg/uJAeKSAGDy
Related repositories
Similar repositories that may be relevant next.

OpenPencil: The AI-Native, Open-Source Figma Alternative Design Editor
June 21, 2026
OpenPencil is an innovative AI-native design editor, serving as a powerful open-source alternative to Figma. It supports .fig files, integrates AI for design creation, and provides a fully programmable toolkit with a headless Vue SDK. This project emphasizes real-time collaboration and local data control, making it a compelling choice for designers and developers seeking flexibility and ownership.
REAL Video Enhancer: AI-Powered Video Interpolation, Upscaling, and Denoising
June 19, 2026
REAL Video Enhancer is a powerful open-source application designed to enhance video quality across Linux, Windows, and macOS. It leverages AI models for advanced video processing tasks such as frame interpolation, upscaling, decompression, and denoising. This tool provides a modern alternative to older software, making high-quality video enhancement accessible to a wider audience.

Open-LLM-VTuber: Your Offline, Cross-Platform AI Companion with Live2D
June 14, 2026
Open-LLM-VTuber is an innovative open-source project that brings a customizable, voice-interactive AI companion to your desktop. It supports real-time voice interaction, visual perception, and dynamic Live2D avatars, all running completely offline across Windows, macOS, and Linux. This project allows users to create a personalized AI companion with extensive model support and advanced interaction features, ensuring privacy and flexibility.

Claude Ads: AI-Powered Paid Advertising Audit for Claude Code
June 14, 2026
Claude Ads is an AI-powered skill for Claude Code designed to automate comprehensive paid advertising audits. It performs over 250 checks across major ad platforms, providing a weighted health score, prioritized action plans, and AI creative generation. This tool drastically reduces the time and cost associated with manual ad account analysis.
Source repository
Open the original repository on GitHub.