LLM Integration
OpenGPEX integrates with Large Language Model (LLM) services through the AI Bridge — a unified interface for generating and editing images, describing images, and chatting with AI agents.
Overview
The AI Bridge drawer provides three operation modes:
| Mode | API Endpoint | Description |
|---|---|---|
| Generate | /v1/images/generations |
Create new images from text prompts |
| Edit | /v1/images/edits |
Modify an existing image with text instructions |
| Describe | /v1/chat/completions |
Get a text description of the current image |
The Bridge also supports Agents: named endpoint + model configurations for multi-turn chat conversations with the model (see Settings).
Setting Up an Endpoint
The AI Bridge ships with built-in provider presets — OpenAI, Anthropic, Google Gemini, xAI Grok, Qwen (Aliyun DashScope), Ollama (self-hosted), and LocalAI (self-hosted) — and works with any OpenAI-compatible API:
- Open the AI Bridge drawer (right sidebar)
- Open Settings to configure endpoints
- Add an endpoint from a provider preset, or edit the default one:
- Name: Display name for this endpoint
- Base URL: The API base (e.g.,
https://api.openai.com) - API Key: Your authentication key
- Click Fetch Models to retrieve available models from the provider
- Select your preferred model
Multiple Endpoints
You can configure multiple endpoints and switch between them — useful for comparing results or using different providers for different tasks.
URL Validation
The system auto-corrects common URL mistakes:
- Strips
/v1/images/generationsor/v1/images/editssuffixes - Removes trailing
/v1(you only need the base URL) - Validates URL format
Generate Mode
Create new images entirely from text descriptions:
- Switch to Generate mode
- Enter your prompt (what you want to see)
- Optionally enter a negative prompt (what to avoid — depends on provider support)
- Choose size (preset dropdown with 1024×1024, or type any
WxHvalue orauto) - Set seed (-1 for random, or a specific number for reproducibility)
- Click Generate
The generated image is added to the canvas as a new trunk creation.
Edit Mode
Modify your existing canvas content using text instructions:
- Switch to Edit mode
- Choose the input source: the active layer, or the merged (flattened) frame
- Enter a prompt describing the desired edit
- Click Generate
Describe Mode
Get a text description of your image:
- Switch to Describe mode
- Choose the input source: the active layer, or the merged frame
- Enter an instruction (e.g., "Describe this image")
- The model's text reply is shown in the panel — no image is generated
Generation Parameters
| Parameter | Description |
|---|---|
| Prompt | Text description of desired output |
| Negative Prompt | Elements to avoid in generation (hidden when the provider doesn't support it) |
| Size | Output dimensions as WxH (default 1024×1024; free-form input, or auto) |
| Seed | Random seed (-1 = random each time; fixed value = reproducible results) |
| Model | Which AI model to use (fetched from the provider's model list) |
Not all providers support every parameter — controls are hidden automatically when the selected provider declares no support.
Generation History
Every generation is recorded with full metadata:
- Timestamp, endpoint, model, mode
- Prompt and negative prompt
- Seed and size settings
- Success/failure status and duration
View past generations in the History panel to reference or re-use settings.
Privacy & Data Flow
- The AI Bridge sends your image data only to the providers you configure
- No built-in analytics or telemetry on your prompts
- API keys are stored locally in your browser (pluginConfig / localStorage)
- You control which server receives your data
Next Steps
- AI Tools — Client-side AI (Background Removal, Upscale, Segmentation)
- ComfyUI Integration — Node-based AI workflows
- Creations & Frames — Generated images appear as new creations
Last updated: 2026-07-30