Skip to main content

Multi-provider LLM interface — chat, image generation, vision, and TTS across 9+ providers

Project description

Studio Multi-Provider LLM Interface

A Flask-based web interface for interacting with multiple language model providers (Anthropic, OpenAI, Cohere, Mistral, Perplexity, xAI, Gemini) with support for chat, image generation, video generation, and image analysis.

Quick Start

Using the Management Script (Recommended)

# Start the server
./studio.sh start

# Stop the server
./studio.sh stop

# Restart the server
./studio.sh restart

# Check server status
./studio.sh status

# View live logs
./studio.sh logs

Direct Python Launch

# Activate virtual environment
source venv/bin/activate

# Run the app
python app.py

Configuration

Environment Variables

Create a .env file in the project root with your API keys:

# Flask Configuration
FLASK_SECRET_KEY=your-secret-key-here
STUDIO_PORT=5413

# LLM Provider API Keys
ANTHROPIC_API_KEY=your-key-here
OPENAI_API_KEY=your-key-here
COHERE_API_KEY=your-key-here
MISTRAL_API_KEY=your-key-here
PERPLEXITY_API_KEY=your-key-here
XAI_API_KEY=your-key-here
GEMINI_API_KEY=your-key-here

# Optional: Base path for reverse proxy
STUDIO_BASE_PATH=/studio

Password

Default password: friendship

To change, edit PASSWORD in app.py (line 28).

Features

Chat

  • Multi-provider chat interface
  • Conversation history management
  • Model selection per provider
  • Streaming responses

Image Generation

  • Providers: OpenAI (DALL-E), xAI (Aurora)
  • Save generated images
  • Image prompt library

Image Analysis

  • Providers: Anthropic (Claude Vision), OpenAI (GPT-4 Vision)
  • Upload and analyze images
  • Custom analysis prompts

Video Generation

  • Providers: xAI (Grok Video) - when available
  • Text-to-video and image-to-video

Troubleshooting

Port Already in Use

If you see "Port 5413 is already in use":

# Kill existing processes
./studio.sh stop

# Or manually
kill -9 $(lsof -ti :5413)

# Or use a different port
export STUDIO_PORT=5414
./studio.sh start

Provider Initialization Errors

Check the startup logs to see which providers failed to initialize:

./studio.sh logs

Common issues:

  • Missing API keys in .env file
  • Invalid API keys
  • Shared library not found (/home/coolhand/shared/llm_providers)

Import Errors

If you see import errors for the shared library:

# Verify shared library path
ls -la /home/coolhand/shared/llm_providers/

# Check if all provider modules exist
ls /home/coolhand/shared/llm_providers/*_provider.py

Project Structure

studio/
├── app.py                      # Main Flask application
├── studio.sh                   # Management script
├── requirements.txt            # Python dependencies
├── .env                        # Environment variables (create this)
├── templates/
│   ├── index.html             # Main UI
│   └── login.html             # Login page
├── providers/
│   ├── __init__.py            # Provider exports
│   └── studio_adapters.py     # Adapters for shared library
├── prompts.json               # Saved prompts (auto-created)
├── saved_images.json          # Saved images (auto-created)
└── studio.log                 # Application logs

API Endpoints

  • GET / - Main interface
  • GET /login - Login page
  • GET /logout - Logout
  • POST /chat - Send chat message
  • POST /generate-image - Generate image
  • POST /generate-video - Generate video
  • POST /analyze-image - Analyze image
  • POST /save-prompt - Save prompt
  • GET /get-prompts/<type> - Get saved prompts
  • GET /get-saved-images - Get saved images
  • POST /clear-chat - Clear conversation history

Development

Running in Debug Mode

Debug mode is enabled by default when running with python app.py or ./studio.sh start.

To disable debug mode, edit app.py line 434:

app.run(host="0.0.0.0", port=PORT, debug=False)

Adding New Providers

  1. Create provider in shared library: /home/coolhand/shared/llm_providers/
  2. Import in providers/studio_adapters.py
  3. Create adapter class in providers/studio_adapters.py
  4. Export from providers/__init__.py
  5. Initialize in app.py (around line 95)

Accessibility Considerations

  • Semantic HTML structure
  • ARIA labels for interactive elements
  • Keyboard navigation support
  • Clear error messages
  • High contrast UI elements

Security Notes

  • Password authentication required
  • Session-based authentication
  • API keys stored in environment variables
  • Never commit .env file to git

License

MIT License

Author

Lucas "Luke" Steuber

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geepers_studio-1.0.0.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geepers_studio-1.0.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file geepers_studio-1.0.0.tar.gz.

File metadata

  • Download URL: geepers_studio-1.0.0.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for geepers_studio-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f0c7e1cf5916d39ad281a391903f127c32d3d08694ca31e34bcf756faa255d86
MD5 579b5fcad549d15e87d2bcea428b3db4
BLAKE2b-256 f0f5e094b9806534ee5e0b52483b32c2ebb0df7e03f2c4a8e12a2719c45ef07b

See more details on using hashes here.

File details

Details for the file geepers_studio-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: geepers_studio-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for geepers_studio-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 954c3a0521a22dc5a34b6976cec0fcb71f6614119dbe507d902592ecae000684
MD5 fb28c7d9f47c000ed7653b3d373b3a95
BLAKE2b-256 6c1c734f2d3c30c0361c289ecd1647928f045bd6855dd97f447f15f17312b160

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page