Generate images · Apps and integrations · Image guide · REST API · Service documentation · Discord
What is it? You can make images and text with open models for free, without an expensive computer, and no account or setup is needed. The Horde has no ads and does not sell your data. It is run by a non-profit and paid for by donations.
How do I start?
- Images: open the image generator in your browser, type a prompt, optionally select a style, and click generate. There are guided tutorials as well to get started.
- Text and chat: use KoboldAI Lite in your browser, or another app from the list of integrations.
- Faster results: register for a free API key and enter it in any app. Registered users get better queue priority than anonymous ones. Contribute your GPU (Become a worker) to earn kudos. The kudos you earn is equal to the amount of work your GPU contributes. You can always redeem them for as many requests as you generated, allowing you to "bank" compute.
- Your own software: use the REST API or the OpenAI-compatible endpoint.
The AI Horde is a free, community-run service for AI image generation and text generation. Volunteers run workers on their own GPUs, and the Horde sends each request to a worker that can serve it. The idea is the same as Folding@home or SETI@home: people share spare compute so that others can use it.
Anyone can use the AI Horde for free, even anonymously. The Horde uses only open-source models and software, and this repository is the server that runs it. Our mission page explains why the project exists and what it commits to, and the motivations document goes into more detail.
Priority in the queue is decided by kudos. Workers earn kudos for the jobs they complete and can spend them to move their own requests forward, or leave them unspent. Kudos cannot be bought or sold. Trading them is against the Terms of Service. Users with more kudos get faster service, but everyone gets served, and kudos do not expire.
The AI Horde is run by Haidra, a volunteer-run, registered non-profit in Luxembourg. It is paid for entirely by donations. Volunteers donate GPU time to run the generations, and financial donations pay for the servers, storage and bandwidth. If the Horde is useful to you, please consider supporting Haidra or running a worker.
The AI Horde has received funding from NLnet through the NGI0 Core fund. See all sponsors and credits.
- AI-Horde: Community-Powered AI Generation
The AI Horde is a distributed inference service. The server queues requests, matches them to volunteer workers, collects the results and keeps the kudos accounts. Workers can join and leave at any time, and the Horde routes work to whichever workers are online and able to serve it.
- Image generation: text-to-image, img2img, inpainting, ControlNet, LoRAs, textual inversions and post-processing, across Stable Diffusion, SDXL, Flux and other open model families.
- Alchemy: image interrogation, captioning, upscaling and other post-processing on existing images.
- Text generation: prompt completion through the native API and chat completions through the OpenAI-compatible endpoint, with streaming, tool calls, structured output, reasoning and image inputs where the worker supports them.
- Styles: shareable generation presets with a published parameter policy. Frontends can apply them without reimplementing the rules.
- Kudos accounting: an event-sourced ledger with reservations, so every charge and payment is recorded and can be audited.
- Moderation tools: content filters, evidence records and review queues for the volunteer moderators.
The public service lets people without powerful GPUs use open models through the compute shared by the community. You can generate images directly on the website at aihorde.net/generate/image, with no account required. The image generation guide walks through a first image and explains each setting. The model reference lists the models known to the Horde by category, with search.
Many apps, bots, games and plugins are built on the Horde. The list of integrations covers frontends for images and text, Discord and fediverse bots, editor plugins and developer tools such as the Python SDK.
Third-party websites, games and apps can use the REST API directly. Live status is on the status page, and performance statistics are on our Grafana instance.
The Horde has an OpenAI-compatible endpoint at https://oai.aihorde.net/v1. It supports POST /v1/chat/completions (streamed and non-streamed) and GET /v1/models, so most OpenAI client libraries and chat frontends work with it after changing the base URL. Send a Horde API key as the bearer token, or use the anonymous key 0000000000.
curl https://oai.aihorde.net/v1/chat/completions \
-H "Authorization: Bearer 0000000000" \
-H "Content-Type: application/json" \
-d '{"model": "<a model id from /v1/models>", "messages": [{"role": "user", "content": "Hello"}]}'The interactive API documentation lists the supported request keys and the differences from OpenAI, and the chat front reference covers them in full. The endpoint runs as its own process (python -m horde.oai) in front of the native chat API. To get started, see your first chat completion and send chat completions. Worker operators can read serve your first chat job.
The Horde server can also be deployed privately, for a team or an organization that wants to pool its own GPUs. Container images are published to the GitHub Container Registry, and the Docker readme describes a full deployment with Docker Compose. A private horde does not share workers with the public one, so it needs its own.
- Python 3.12 or 3.13, with dependencies managed by uv
- Flask and Flask-RESTX for the native REST API, served by Waitress
- FastAPI and Uvicorn for the OpenAI-compatible chat endpoint
- PostgreSQL for the main database and the kudos ledger
- Redis for caching, rate limits, locks and chat streams
- S3-compatible object storage (Cloudflare R2 on the public service) for images and large payloads
- Docker images and a Docker Compose file for the full stack
- OpenTelemetry instrumentation for tracing and metrics
- Service documentation (published from docs/): tutorials, how-to guides, reference and explanation pages for developers, integrators and operators of this server, and the architecture decision records.
- Horde concepts: what the Horde is, workers, the request and job lifecycle and kudos.
- Image generation guide on the website, for people making images.
- FAQ on the website.
- Return codes for API errors.
You can use any service built on the AI Horde with a registered account or anonymously. To try it right away, generate an image on the website or pick an app from the list of integrations.
Note: The only information we store from your OAuth2 account is its unique ID, and we do not use it for any other purpose. See our privacy policy for details.
- Visit AI Horde Registration.
- Log in with one of the supported OAuth2 services.
- Choose your username and receive your API key.
- Benefits:
- Higher starting priority in the generation queues
- You can change your username or reset your API key
- Your kudos balance is kept and tracked
- You can recover access through the OAuth2 service
- Minimum kudos balance of 25
- Visit AI Horde Registration.
- This is the default when you do not log in with an OAuth2 service (Google, GitHub, Discord, etc).
- Important: if you lose your API key, the account cannot be recovered.
- You cannot change your username or reset your API key.
- You still earn and keep kudos.
- You still get better priority than anonymous users.
- Use the API key
0000000000. - Lowest priority in the generation queues.
- No kudos tracking.
- No registration needed.
- Anonymous use may be restricted when the Horde is under high load.
Registering lets you take part in the kudos system. Kudos decide your place in the queue: the more you have, the sooner your requests are processed. You can earn kudos by:
- Running a worker that processes other users' requests, and keeping it online
- Receiving monthly kudos as a thank-you for a subscription to Haidra (kudos still cannot be bought or sold)
- Taking part in the kudos economy on the official Discord by logging in with the bot. Use the command
/loginin any channel, click the blue button and enter your API key in the popup.
The kudos system rewards contribution. It does not gate access, and every user, anonymous ones included, can use the service's core features. The developer's blog post on the kudos economy explains the reasoning.
Register first, then run one of the workers in this section with your API key. The website has a worker guide.
The officially supported image worker is horde-worker-reGen.
- KoboldCpp has a built-in Horde worker, including chat jobs.
- AI-Horde-Worker connects an inference backend to the Horde.
- Any OpenAI-compatible backend can serve chat jobs. See write a minimal chat worker and serve chat jobs.
Join the #horde channel on the KoboldAI Discord server to learn more about text workers.
To build a bot, app or script on the AI Horde, read the integration readme. It covers the request workflow, the endpoints for each generation type, shared keys and error handling. For Python, the horde-sdk handles the request lifecycle for you. Chat clients can use the OpenAI-compatible endpoint, and frontend authors can follow add chat to a frontend.
See CONTRIBUTING.md for the development setup, tests, code style and documentation conventions. Changes are listed in the changelog.
Questions and feedback are welcome on Discord, Mastodon and Lemmy. Project news is posted at aihorde.net/news.
The AI Horde server is free software under the GNU Affero General Public License v3.0 or later. Licensing follows the REUSE specification, and the license texts are in LICENSES/.