# Connect blindGram to a Custom AI Service

Connect blindGram Assistant to any custom, self-hosted, local (Ollama, vLLM, LocalAI), or proxy AI endpoint. Learn how to configure base URLs, custom model IDs, and authentication.

blindGram supports any service implementing the standard OpenAI-compatible `/chat/completions` API format. This allows you to connect private enterprise endpoints, local offline AI servers running on your home network, or custom reverse proxies.

## Supported Custom Gateways

You can connect blindGram to:
- **Local AI frameworks:** [Ollama](https://ollama.com/), [vLLM](https://github.com/vllm-project/vllm), [LocalAI](https://localai.io/), or [llama.cpp server].
- **Third-party aggregators:** Groq, Together AI, DeepInfra, Mistral AI, Fireworks, or self-hosted proxy endpoints.
- **Enterprise gateways:** Company-internal AI endpoints with custom security rules.

## Step 1: Prepare your endpoint URL

Identify the base URL of your OpenAI-compatible service:
- If using **Ollama** on your local network: `http://192.168.1.50:11434/v1`
- If using **vLLM** or **LocalAI**: `http://YOUR-SERVER-IP:8000/v1`
- If using an online aggregator or proxy: `https://api.your-service.com/v1`

> **Note on Android Networking:** If connecting to a local computer on your Wi-Fi network, use the computer's local IP address (e.g., `192.168.1.X`), not `localhost` or `127.0.0.1`.

## Step 2: Configure blindGram Assistant

1. Open **blindGram** on your Android device.
2. Navigate to **Settings** > **blindGram Area** > **Assistant** > **AI**.
3. Under **The service**:
   - Tap **Provider** and choose **Custom**.
   - A new row labeled **Provider address** will appear immediately below Provider.
   - Tap **Provider address** and enter the full base URL (e.g., `https://api.example.com/v1`).
   - Tap **API key** and paste your authentication token (or type any dummy text like `none` if your self-hosted server does not require authentication).
   - Tap **Model** and enter the exact model identifier (e.g., `llama3.2-vision`, `mistral-small`, `qwen2.5-coder`).
   - Tap **Save** to confirm.

## Step 3: Configure speech recognition (Optional)

If your custom endpoint also implements the `/audio/transcriptions` endpoint (such as a local Whisper server), you can configure the **Speech model** row to upload voice notes directly to your custom server. Otherwise, leave it unset to use the offline speech engine built into your phone.

## Step 4: Turn on AI features

Enable your desired features:
- **Describe image:** In **Describe image**, enable **Detailed description** (make sure your custom model supports vision inputs, such as `llama3.2-vision` or `llava`).
- **Voice summary:** In **Voice summary**, enable **Summarize with AI**.
- **Text summary:** In **Text summary**, enable **Summarize messages**.
- **Ask AI:** In **Ask about messages**, enable **Ask AI about any message**.

## Troubleshooting Common Problems

### Problem: "Connection refused" or "Network Error"
- **Cause:** Android cannot reach the server address.
- **Solution:**
  1. Ensure your phone and server are on the same Wi-Fi network.
  2. Verify that your server firewall allows incoming connections on the specified port.
  3. Use the computer's actual LAN IP address (such as `http://192.168.1.100:11434/v1`), never `localhost`.

### Problem: Image descriptions return errors
- **Cause:** The selected model does not support multimodal vision inputs.
- **Solution:** Ensure your custom endpoint is running a vision-capable model (for example, `llama3.2-vision`, `bakllava`, or `qwen-vl`).

### Problem: 404 Not Found on requests
- **Cause:** Missing or extra `/v1` suffix in the provider address.
- **Solution:** Most OpenAI-compatible servers expect `/v1` at the end of the base URL (e.g., `http://192.168.1.100:11434/v1`).

## Frequently Asked Questions

### Can I use blindGram completely offline with a local model?
Yes. By running Ollama or LocalAI on a computer in your local network and pointing blindGram Custom Provider to its LAN IP, all AI summaries and descriptions stay strictly inside your local home network.

### Where are past answers kept?
All generated results are saved for one week in [AI Conversations](/docs/assistant/ai/conversations/).
