Skip to main content

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

Release files for geepers-studio 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geepers-studio 1.0.0
File Size Uploaded
geepers_studio-1.0.0.tar.gz 19.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for geepers-studio 1.0.0
File Interpreter ABI Platform
geepers_studio-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size:37.2 kB

Release files / geepers_studio-1.0.0.tar.gz

Download URL geepers_studio-1.0.0.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f0c7e1cf5916d39ad281a391903f127c32d3d08694ca31e34bcf756faa255d86
BLAKE2b-256 checksum
How to use checksums
f0f5e094b9806534ee5e0b52483b32c2ebb0df7e03f2c4a8e12a2719c45ef07b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / geepers_studio-1.0.0-py3-none-any.whl

Download URL geepers_studio-1.0.0-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
954c3a0521a22dc5a34b6976cec0fcb71f6614119dbe507d902592ecae000684
BLAKE2b-256 checksum
How to use checksums
6c1c734f2d3c30c0361c289ecd1647928f045bd6855dd97f447f15f17312b160
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page