What is Claude Code + Plexor Labs? Labs?
Claude Code is Anthropic's official command-line interface for AI-assisted software development. It provides a powerful terminal-based experience for code generation, debugging, refactoring, and more.
Plexor Labs is an intelligent LLM routing proxy that sits between Claude Code and various AI providers. When you route Claude Code through Plexor Labs, your requests are automatically analyzed and sent to the most cost-effective provider capable of handling them, without sacrificing quality for complex tasks.
Key Benefits
- Cost Savings - Save 60-80% on typical Claude Code usage by routing simple queries to cheaper models
- Quality Preservation - Complex reasoning, multi-file edits, and architecture decisions still go to Claude
- Seamless Integration - Works transparently with your existing Claude Code workflow
- Real-time Analytics - Track your savings and usage patterns in real-time
- Provider Flexibility - Access to multiple providers (Claude, DeepSeek, OpenAI, Mistral, Gemini) through one interface
Installation and Setup
Setting up Plexor Labs with Claude Code takes just a few minutes. The Plexor Labs skill is built into Claude Code and provides slash commands for authentication and configuration.
Create a Plexor Labs Account
Visit plexor.dev and create a free account. During the research phase, all features are completely free with no credit card required.
Get Your API Key
Log in to your Plexor Labs dashboard and navigate to the API Keys section. Click "Create API Key" to generate a new key. Copy it to your clipboard - you'll need it in the next step.
Authenticate in Claude Code
Open Claude Code in your terminal and run the /plexor-login command.
When prompted, paste your API key. This configures Plexor Labs as your API proxy.
Verify Connection
Run /plexor-status to verify your connection is active. You should see
your account information and current routing mode displayed.
# In Claude Code terminal /plexor-login # Enter your API key when prompted: plx_xxxxxxxxxxxxxxxx # Verify connection /plexor-status # Optionally set your preferred mode /plexor-mode balanced
/plexor-login once unless you want to change accounts.
Slash Commands Reference
Plexor Labs adds the following slash commands to Claude Code for authentication, configuration, and monitoring.
All commands are prefixed with /plexor- for easy discovery.
Authentication Commands
Authenticate with Plexor Labs? Labs using your API key. This command prompts you to enter your API key and configures Claude Code to route all requests through the Plexor Labs proxy. Your credentials are stored securely in your local Claude Code configuration.
Log out from Plexor Labs and clear your stored credentials. After logging out, Claude Code will send requests directly to Anthropic's API (requires a valid Anthropic API key).
Monitoring Commands
Display your current Plexor Labs optimization statistics and session information. Shows total requests, tokens used, cost savings, provider breakdown, and current configuration settings.
Configuration Commands
Set your preferred routing mode to control the balance between cost savings and response quality. The mode determines how aggressively Plexor Labs routes requests to cheaper providers.
Force all requests to use a specific LLM provider, bypassing intelligent routing. Useful for testing, benchmarking, or when you have specific provider requirements.
Enable or disable the Plexor Labs proxy. When disabled, requests go directly to Anthropic's API. Useful for quick A/B testing or temporarily bypassing Plexor Labs without logging out.
Open the interactive settings configuration menu. Allows you to configure advanced options including custom API URL, mode preferences, and provider settings in one place.
Quick Reference
# Authentication /plexor-login # Authenticate with your API key /plexor-logout # Log out and clear credentials # Monitoring /plexor-status # Show stats, savings, and config # Routing Mode /plexor-mode eco # Maximum cost savings /plexor-mode balanced # Balance cost and quality (default) /plexor-mode quality # Prioritize response quality /plexor-mode passthrough # Direct to Claude, no routing # Provider Override /plexor-provider auto # Intelligent routing (default) /plexor-provider claude # Force Anthropic Claude /plexor-provider deepseek # Force DeepSeek /plexor-provider openai # Force OpenAI GPT /plexor-provider mistral # Force Mistral AI /plexor-provider gemini # Force Google Gemini # Enable/Disable /plexor-enabled true # Enable Plexor Labs proxy /plexor-enabled false # Bypass Plexor Labs, direct to Anthropic # Settings /plexor-settings # Open settings menu
How Proxy Routing Works
When you use Claude Code with Plexor Labs? Labs enabled, every request passes through Plexor Labs' intelligent routing engine before reaching an LLM provider. Here's how the routing decision is made:
Request Analysis
Each request is analyzed in real-time to determine its complexity and requirements. The analysis considers:
- Query complexity - Simple questions vs. complex reasoning tasks
- Code context - Single file operations vs. multi-file architectural changes
- Token requirements - Short responses vs. lengthy code generation
- Historical patterns - Your usage patterns and preferences
- Current mode - Your selected routing mode (eco, balanced, quality)
Routing Decision Matrix
| Request Type | Eco Mode | Balanced Mode | Quality Mode |
|---|---|---|---|
| Simple questions, formatting | DeepSeek / Mistral | DeepSeek / Mistral | Claude Haiku |
| Basic code generation | DeepSeek | DeepSeek / Claude Haiku | Claude Sonnet |
| Code review, debugging | DeepSeek | Claude Sonnet | Claude Sonnet |
| Complex reasoning, architecture | Claude Sonnet | Claude Sonnet / Opus | Claude Opus |
| Multi-file refactoring | Claude Sonnet | Claude Opus | Claude Opus |
Response Handling
Regardless of which provider handles your request, responses are returned in a consistent format compatible with the Anthropic Messages API. Plexor Labs adds metadata to each response showing:
- Which provider actually handled the request
- The specific model used
- Actual cost for this request
- Latency information
- The routing mode that was active
Cost Savings and Examples
Real-world savings depend on your usage patterns. Here are typical examples showing cost differences between direct Anthropic API usage and Plexor Labs-routed requests.
Example: Typical Development Session
A 4-hour development session with Claude Code might include:
# Request distribution in a typical session: Simple questions, explanations: 40% -> Routed to DeepSeek Basic code generation: 25% -> Routed to DeepSeek Code review, debugging: 20% -> Routed to Claude Sonnet Complex reasoning, architecture: 15% -> Routed to Claude Opus # Cost comparison (estimated): Direct Anthropic API: $12.50 Plexor Labs (balanced mode): $3.75 Savings: $8.75 (70%)
Savings by Mode
| Mode | Typical Savings | Best For |
|---|---|---|
eco |
70-85% | Learning, exploration, prototyping, simple tasks |
balanced |
60-75% | General development, most production work |
quality |
30-50% | Critical code, complex architecture, sensitive work |
passthrough |
0% | Benchmarking, when you specifically need Claude |
Tracking Your Savings
Use /plexor-status regularly to monitor your actual savings. The command shows:
Plexor Labs Status ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Connection: Connected Account: warren@example.com Mode: balanced Provider: auto Proxy: enabled Session Statistics ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Requests: 127 Input tokens: 245,832 Output tokens: 89,421 Cost Analysis ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Actual cost: $2.34 Anthropic cost: $8.91 Savings: $6.57 (74%) Provider Breakdown ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ DeepSeek: 68 requests (54%) Claude Sonnet: 42 requests (33%) Claude Opus: 17 requests (13%)
Troubleshooting
Common issues and solutions when using Plexor Labs with Claude Code.
Authentication Issues
API Key Not Accepted
If your API key is rejected during /plexor-login:
- Verify you're using a Plexor Labs API key (starts with
plx_), not an Anthropic key - Check the key hasn't been revoked in your API Keys dashboard
- Ensure you copied the complete key without extra spaces
- Try generating a new API key if the issue persists
Connection Timeouts
If you're experiencing connection issues:
- Check your internet connection
- Verify that
api.plexor.devis accessible from your network - Check if a corporate firewall might be blocking the connection
- Try using
/plexor-settingsto verify the API URL is correct
Routing Issues
Requests Not Being Optimized
If all requests seem to go to Claude:
- Run
/plexor-statusto verify proxy is enabled - Check your mode isn't set to
passthrough - Verify provider isn't forced to
claude
# Reset to balanced mode with auto routing
/plexor-mode balanced
/plexor-provider auto
/plexor-enabled true
Quality Concerns
If you notice reduced quality in responses:
- Switch from
ecotobalancedmode - For critical work, use
qualityorpassthroughmode - Force a specific provider with
/plexor-provider claudefor important tasks
Performance Issues
Increased Latency
Plexor Labs adds minimal latency (typically <100ms) for routing decisions. If you notice significant delays:
- Check your network connection to
api.plexor.dev - The selected provider might be experiencing issues - try a different provider
- Use
/plexor-statusto see latency statistics
Getting Help
If you continue to experience issues:
- Check the Dashboard for service status
- Review your usage logs for error details
- Contact support through the dashboard with your session ID
/plexor-mode quality or /plexor-mode passthrough to ensure
Claude handles the request directly.
Next Steps
- Dashboard - Monitor your usage and savings in real-time
- HTTP API Reference - Use Plexor Labs in custom applications
- MCP Server Setup - Connect Plexor Labs to Claude Desktop
- API Keys - Manage your authentication credentials