โ† Back to Agent Hub

๐Ÿ”— Open WebUI Integration

Open WebUI Local LLM Self-Hosted Tool Integration

Connect your self-hosted Open WebUI instance to Agent Media Tools and give your local LLM access to 40+ real-world tools โ€” image processing, PDF manipulation, QR codes, and more.

๐Ÿ› ๏ธ Method 1: Custom Tool Functions

1
Open Open WebUI Settings

Go to Workspace โ†’ Tools โ†’ Add Tool

2
Add a tool definition

Paste this as a new tool function:

"""
Title: Agent Media Tools
Version: 1.0
Description: Access 40+ tools: resize/convert/crop images, merge/split PDFs, QR codes, pastebin, webhooks, dev tools.
"""

import requests
import json

BASE = "https://agentmediatools.com"

def resize_image(url: str, width: int, height: int = None, format: str = "webp", quality: int = 80) -> str:
    """Resize an image to specific dimensions."""
    response = requests.post(f"{BASE}/api/resize-image", data={
        "image_url": url, "width": width, "height": height,
        "format": format, "quality": quality
    })
    return response.text

def convert_image(url: str, format: str = "webp", quality: int = 85) -> str:
    """Convert an image between formats."""
    response = requests.post(f"{BASE}/api/convert-image", data={
        "image_url": url, "format": format, "quality": quality
    })
    return response.text

def generate_qrcode(text: str, size: int = 300) -> str:
    """Generate a QR code from text or URL."""
    response = requests.post(f"{BASE}/api/qrcode", json={"text": text, "size": size})
    data = response.json()
    return data.get("dataUrl", "Error generating QR code")

def create_paste(content: str, syntax: str = "text", title: str = "") -> str:
    """Create a text paste and return the shareable URL."""
    response = requests.post(f"{BASE}/api/paste", json={
        "content": content, "syntax": syntax, "title": title
    })
    data = response.json()
    return data.get("url", "Error creating paste")

def lookup_ip(ip: str = "") -> str:
    """Look up IP geolocation data."""
    params = {"ip": ip} if ip else {}
    response = requests.get(f"{BASE}/api/ip", params=params)
    return response.text

def generate_uuid() -> str:
    """Generate a random UUID v4."""
    response = requests.get(f"{BASE}/api/uuid")
    return response.text

def generate_password(length: int = 20, symbols: bool = True) -> str:
    """Generate a secure random password."""
    response = requests.get(f"{BASE}/api/password", params={
        "length": length, "symbols": str(symbols).lower()
    })
    return response.text

def analyze_image(url: str) -> str:
    """Analyze an image and return metadata (dimensions, format, size)."""
    response = requests.post(f"{BASE}/api/analyze-image", data={"image_url": url})
    return response.text

def convert_timestamp(value: str) -> str:
    """Convert between Unix timestamp and human-readable date. Use 'now' for current time."""
    response = requests.get(f"{BASE}/api/timestamp", params={"value": value})
    return response.text
3
Save & Use

Now your local LLM can call these functions. Try: "Generate a QR code for my website" or "Resize this image to 800px."

๐ŸŒ Method 2: OpenAI-Compatible API

Open WebUI can use Agent Media Tools as an OpenAI-compatible API endpoint for tool calling. Add this as a custom OpenAI API connection:

API URL: https://agentmediatools.com
API Key: (optional for free tier)
Model: amt-tools
Note: This exposes all tool endpoints for function calling.

๐Ÿ“– Method 3: Use with System Prompt

Add this to your Open WebUI system prompt / model instructions:

You have access to Agent Media Tools (https://agentmediatools.com) โ€” a free API for image, PDF, and text processing.
For image tools, make POST requests with the image URL.
For data tools, use GET requests with query parameters.
Full tool catalog: https://agentmediatools.com/api/tools
Agent docs: https://agentmediatools.com/llms.txt
OpenAPI spec: https://agentmediatools.com/openapi.json

๐Ÿ’ก What You Can Do