Skip to main content
Open WebUI is a feature-rich self-hosted AI platform that supports completely offline operation. Through Laozhang API, you can integrate various mainstream large language models into Open WebUI.

Quick Deployment

Docker Quick Start

Docker Compose Deployment

Configure Laozhang API

Method 1: Environment Variable Configuration

Set environment variables during deployment:

Method 2: Interface Configuration

  1. Access Open WebUI management interface
  2. Go to Settings > Connections
  3. Configure in OpenAI API section:
    • API Base URL: https://api2.laozhang.ai/v1
    • API Key: Enter your Laozhang API key
  4. Click save configuration
Configuration Key Points
  • API Base URL needs to include the /v1 suffix
  • API Key can be obtained from Laozhang API Console
  • Using environment variables is recommended for easier management and updates

Supported Models

Open WebUI supports the following model series through Laozhang API:

Core Features

RAG (Retrieval Augmented Generation)

Open WebUI supports document upload and knowledge base features:
  1. Document Upload
    • Supports PDF, Word, Markdown and other formats
    • Automatic vectorization storage
    • Supports multilingual documents
  2. Knowledge Base Management
    • Create specialized knowledge bases
    • Document classification and tagging
    • Intelligent retrieval matching

OpenAI Compatible API

Open WebUI provides a complete OpenAI-compatible API:

Tool Integration

Supports external tools and plugins:
  • Web search
  • Code execution
  • Image generation
  • Document processing

Advanced Configuration

Multi-Model Configuration

Configure multiple model sources in docker-compose.yml:

User Permission Management

Data Persistence

API Integration Examples

Python Integration

JavaScript Integration

Troubleshooting

Common Issues

Connection Failed
  • Check if API Base URL is correct: https://api2.laozhang.ai/v1
  • Verify API Key validity
  • Confirm firewall settings
Model Unavailable
  • Check account balance
  • Confirm model is in service scope
  • View Laozhang API service status
Upload Failed
  • Check file format support
  • Confirm storage space is sufficient
  • Verify file size limits

Debug Logging

Enable debug mode:
View detailed logs:

Best Practices

Performance Optimization

  1. Model Selection
    • Daily conversation uses GPT-4.1 Mini
    • Complex tasks use GPT-5.5
    • Long text processing uses Claude Sonnet 4.6
  2. Caching Strategy
    • Enable conversation caching
    • Set reasonable cache expiration time
    • Regularly clean unused cache
  3. Resource Management
    • Monitor memory usage
    • Set reasonable concurrency limits
    • Regularly backup user data

Security Configuration

Monitoring and Alerts

Integrate monitoring system:
Need more help? Please check Open WebUI Official Documentation or visit Laozhang API Official Website.