A picture generated from a description can stay alongside the messages that prompted it. In AnythingLLM, an administrator connects an image provider so workspace users can generate pictures in chat with /img.
The image provider applies to the whole instance. With LocalAI selected, AnythingLLM sends image requests to your LocalAI server, while each workspace keeps its own text model selection.
Start with an administrator account, an existing AnythingLLM workspace, and a LocalAI server with an image model installed.
Steps to configure image generation in AnythingLLM:
- Click the Open settings wrench at the bottom of the workspace sidebar.

- Expand AI Providers in the Instance Settings sidebar if the group is collapsed.

- Open Image Generation under AI Providers.

- Select LocalAI from the Image Generation Provider menu.

- Enter your LocalAI API URL, including /v1, in LocalAI Base URL.
The URL must be reachable from AnythingLLM. When AnythingLLM can reach LocalAI on its own loopback interface, the URL is http://localhost:8080/v1. The API Key field can stay blank if your LocalAI server allows requests without a key.
- Select an installed image model such as sd-1.5-ggml from Model.
An empty model list can mean the URL is unreachable from AnythingLLM or LocalAI has no image model installed.
- Set Image Dimensions to 512×512 for sd-1.5-ggml.

- Click Save changes.

- Confirm that the saved LocalAI settings match your selections.
The form shows the saved base URL, model and dimensions. The Save changes button disappears.
- Click the AnythingLLM logo at the top of the settings sidebar to return to the workspace list.

- Open an existing workspace, such as Design Studio, from the chat sidebar.

- Send /img An orange fox on a snowy hill in the workspace chat with Enter.
The chat shows Generating your image… while LocalAI works. On a CPU, generation can take several minutes.
- Check that the generated image appears below the /img message.

- Reload the current conversation in your browser.

- Confirm that the same image still appears below the original /img message after the reload.
