SAM + ALICE Integration

Generate images and audio directly from SAM conversations using ALICE as the local generation backend.

Overview

SAM integrates with ALICE through ALICE's OpenAI-compatible REST API. When you ask SAM to "generate an image of a sunset" or "create a song about coding," SAM calls ALICE's API endpoints to perform the generation and returns the results inline in the conversation.

Key benefits:

  • Zero configuration: Works automatically when both are running locally
  • Private by default: No cloud services involved, everything stays on your machine
  • Seamless workflow: No context switching between apps
  • Full parameter control: Access ALICE's generation parameters through SAM

Setup

Prerequisites

  • SAM installed and running (macOS 14.0+)
  • ALICE installed and running (macOS, Linux, or Docker)
  • At least one Stable Diffusion model downloaded in ALICE

Configuration

  1. In SAM, open Settings → Image Generation
  2. Set the Server URL to http://localhost:8080 (or your ALICE URL)
  3. Click Test Connection to verify
  4. Download a model in ALICE's web interface if you haven't already

Once configured, SAM will automatically use ALICE for image and audio generation requests.

Usage

Image Generation

Simply ask SAM to generate an image:

"Create an image of a cyberpunk city at sunset"

SAM will call ALICE's /v1/images/generations endpoint and display the result in the conversation.

Audio Generation

Ask SAM to generate music or sound effects:

"Generate a lo-fi beat for studying"

SAM calls ALICE's /v1/audio/generations endpoint (Stable Audio Open 1.0 or MiniMax Music 3).

Advanced Parameters

You can specify generation parameters in your request:

"Generate an image of a forest, SDXL, 1024x1024, 30 steps, guidance 7.5, LoRA: anime-style"

SAM parses these parameters and passes them to ALICE's API.

API Details

SAM uses these ALICE endpoints:

Endpoint Purpose
POST /v1/images/generations Text-to-image generation
POST /v1/images/edits Image-to-image (img2img)
POST /v1/audio/generations Text-to-audio generation
GET /v1/models List available SD models

Troubleshooting

Issue Solution
Connection failed Verify ALICE is running at http://localhost:8080/health
No models found Download a model in ALICE's web interface (Models tab)
Generation timeout Increase ALICE's timeout in config.yaml; check GPU memory
Wrong model used Specify model name in request; check ALICE's default model setting

See Also