Docs Setup & Configuration

Setup & Configuration

Complete guide to setting up Plexor Labs for intelligent LLM routing. Learn how to create your account, generate API keys, configure routing modes, and optimize your AI workflows for cost and performance.

Account Creation

Getting started with Plexor Labs? Labs takes just a few minutes. During the research phase, all features are completely free with no credit card required.

Visit plexor.dev

Navigate to plexor.dev in your browser. Click the "Get Started" or "Sign Up" button to begin the registration process.

Create Your Account

Sign up using your email address or authenticate with GitHub for faster onboarding. GitHub authentication automatically links your developer identity and enables additional features.

Verify Your Email

If you signed up with email, check your inbox for a verification link. Click the link to activate your account. The link expires after 24 hours.

Access Your Dashboard

Once verified, you'll be redirected to your dashboard where you can generate API keys, view usage statistics, and configure your routing preferences.

Research Phase Benefits
During the research phase, you get unlimited access to all routing modes and features at no cost. This allows you to fully evaluate Plexor Labs' capabilities before any commercial commitment.

API Key Generation

API keys authenticate your requests to Plexor Labs' gateway. You can create multiple keys for different environments (development, staging, production) or applications.

Creating Your First API Key

Navigate to API Keys

From your dashboard, click on "API Keys" in the sidebar or navigate directly to /api-keys.

Create New Key

Click the "Create API Key" button. Enter a descriptive name for your key (e.g., "Production App", "Development", "CI/CD Pipeline").

Copy and Secure Your Key

Your API key will be displayed once. Copy it immediately and store it securely. You will not be able to view the full key again. If lost, you'll need to create a new key.

Important
API keys are shown only once at creation time. Store them immediately in a secure location such as a password manager or secrets management system.

Using Your API Key

Include your API key in the Authorization header of every request:

HTTP Header
Authorization: Bearer plx_your_api_key_here
cURL Example
curl -X POST https://api.plexor.dev/gateway/anthropic/v1/messages \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer plx_your_api_key_here" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 1024,
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'

Routing Modes

Plexor Labs' intelligent routing system analyzes your requests and routes them to the optimal LLM provider based on your selected mode. Each mode offers a different balance between cost savings and response quality.

eco Maximum Cost Savings

Routes requests to the cheapest capable model that can handle the task. Plexor Labs analyzes the complexity of your prompt and selects the most cost-effective provider. Ideal for high-volume, lower-complexity tasks where cost optimization is the priority.

Cost Savings
Up to 90%
Best For
Drafts, summaries, simple Q&A
Typical Providers
DeepSeek, Mistral, Gemini Flash
Response Quality
Good for most tasks
balanced Cost & Quality Balance (Default)

The recommended mode for most applications. Plexor Labs intelligently routes based on request complexity - simple requests go to cost-effective models while complex reasoning tasks are routed to premium models. This provides the best overall value.

Cost Savings
40-70%
Best For
General applications, mixed workloads
Routing Logic
Complexity-based selection
Response Quality
Optimized per request
quality Premium Response Quality

Prioritizes response quality over cost savings. Routes to premium models (Claude Opus, GPT-4) for complex reasoning, code generation, and tasks requiring high accuracy. Still provides some optimization by avoiding unnecessary premium routing for trivial requests.

Cost Savings
10-30%
Best For
Complex code, analysis, reasoning
Typical Providers
Claude Opus, GPT-4, Claude Sonnet
Response Quality
Highest available
passthrough Direct Pass-through

Disables all routing optimization and sends requests directly to the specified model and provider. Use this mode for benchmarking, testing, or when you need guaranteed use of a specific model. No cost optimization is applied.

Cost Savings
None (full price)
Best For
Testing, benchmarks, specific model needs
Routing
Direct to specified model
Response Quality
Exactly as requested

Setting Your Routing Mode

You can set the routing mode in three ways:

1. Per-Request Header

HTTP Header
X-Plexor-Mode: eco

2. Account Default (Dashboard)

Set your default routing mode in the dashboard settings. This applies to all requests that don't specify a mode header.

3. Environment Variable (Claude Code)

Shell
export PLEXOR_MODE=balanced

Provider Preferences

Beyond routing modes, you can configure provider preferences to control which LLM providers Plexor Labs uses for your requests.

Available Providers

Provider Models Strengths
anthropic Claude Opus, Sonnet, Haiku Complex reasoning, code, safety
openai GPT-4o, GPT-4, GPT-3.5 General purpose, function calling
deepseek DeepSeek Chat, Coder Cost-effective, strong coding
mistral Mistral Large, Medium, Small Fast, multilingual, efficient
gemini Gemini Pro, Flash Multimodal, fast responses

Forcing a Specific Provider

Use the X-Plexor-Provider header to route requests to a specific provider:

Force DeepSeek Provider
curl -X POST https://api.plexor.dev/gateway/anthropic/v1/messages \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Plexor-Provider: deepseek" \
  -d '{"model": "claude-sonnet-4-20250514", "max_tokens": 1024, "messages": [...]}'

Provider Exclusions

You can exclude specific providers from routing decisions using the dashboard settings or the X-Plexor-Exclude-Providers header:

Exclude Providers
X-Plexor-Exclude-Providers: openai,gemini

Usage Tracking & Billing

Plexor Labs provides detailed usage tracking and transparent billing. During the research phase, all usage is free, but tracking is still available to help you understand your consumption patterns.

Usage Metrics

Plexor Labs tracks the following metrics for each request:

  • Input Tokens: Number of tokens in your prompt
  • Output Tokens: Number of tokens in the response
  • Cost (USD): Actual cost charged to you
  • Savings (USD): Amount saved compared to direct API pricing
  • Latency (ms): Response time from request to completion
  • Provider Used: Which LLM provider handled the request
  • Model Used: Specific model that generated the response

Viewing Usage Statistics

Access your usage statistics through the Dashboard or via the API:

Usage API Endpoint
curl https://api.plexor.dev/api/users/me/usage \
  -H "Authorization: Bearer YOUR_API_KEY"

Billing Tiers

Research Phase
During the research phase, all Plexor Labs features are free. We're gathering feedback and usage patterns to build the best possible product. Commercial pricing will be announced before the end of the research phase.

Security Best Practices

Protecting your API keys and data is critical. Follow these best practices to secure your Plexor Labs integration.

Store Keys Securely

Never commit API keys to version control. Use environment variables, secrets managers (AWS Secrets Manager, HashiCorp Vault), or encrypted configuration files.

Use Separate Keys

Create separate API keys for development, staging, and production environments. This limits exposure if a key is compromised.

Rotate Keys Regularly

Rotate API keys periodically (e.g., every 90 days) and immediately if you suspect a key has been compromised. Delete unused keys.

Monitor Usage

Regularly review your usage dashboard for unusual activity. Set up alerts for unexpected usage spikes that might indicate unauthorized access.

Never Expose Keys Client-Side
Never include API keys in frontend JavaScript, mobile app bundles, or any code that runs on user devices. API calls should always be made from your backend servers.

Revoking Compromised Keys

If you believe an API key has been compromised:

  1. Navigate to API Keys in your dashboard
  2. Find the compromised key and click "Revoke"
  3. Create a new API key immediately
  4. Update your applications with the new key
  5. Review recent usage for any unauthorized activity

Rate Limits & Quotas

Plexor Labs implements rate limits to ensure fair usage and system stability. Rate limits apply per API key.

Limit Type Research Phase Description
Requests per minute 60 RPM Maximum requests per minute per API key
Requests per day 10,000 RPD Maximum requests per 24-hour period
Tokens per minute 100,000 TPM Maximum input + output tokens per minute
Max request size 200KB Maximum size of a single request body
Concurrent requests 10 Maximum simultaneous requests per API key

Rate Limit Headers

Plexor Labs returns rate limit information in response headers:

Response Headers
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1704067200

Handling Rate Limits

When you exceed rate limits, Plexor Labs returns a 429 Too Many Requests response. Implement exponential backoff in your application:

Python - Exponential Backoff
import time
import random

def make_request_with_retry(request_fn, max_retries=5):
    for attempt in range(max_retries):
        response = request_fn()
        if response.status_code != 429:
            return response

        # Exponential backoff with jitter
        wait_time = (2 ** attempt) + random.uniform(0, 1)
        time.sleep(wait_time)

    raise Exception("Max retries exceeded")

Dashboard Features

The Plexor Labs dashboard provides comprehensive visibility into your API usage, costs, and savings.

Usage Analytics

Real-time charts showing request volume, token usage, and costs over time. Filter by date range, provider, or routing mode.

Cost Savings Tracker

See exactly how much you're saving compared to direct API costs. Track cumulative savings and per-request optimization metrics.

API Key Management

Create, revoke, and manage API keys. View per-key usage statistics and set key-specific rate limits or restrictions.

Configuration Settings

Configure default routing mode, provider preferences, and account settings. Set up webhooks and integrations.

Accessing the Dashboard

Visit /dashboard after logging in to access all dashboard features. The dashboard is accessible from any device with a modern web browser.

Frequently Asked Questions

Plexor Labs analyzes the complexity and requirements of each request and routes it to the most cost-effective model that can handle the task. Simple queries that don't require advanced reasoning are routed to cheaper models like DeepSeek or Mistral, while complex tasks are sent to premium models when needed.

This intelligent routing can reduce costs by 40-90% compared to always using premium models, without sacrificing quality for tasks that need it.

Yes! Plexor Labs' gateway is fully compatible with both Anthropic's Messages API and OpenAI's Chat Completions API. You only need to change the base URL and authentication header - no other code changes required.

For Anthropic SDK users, change the base URL to https://api.plexor.dev/gateway/anthropic. For OpenAI SDK users, use https://api.plexor.dev/gateway/openai.

Plexor Labs includes automatic failover. If the selected provider is unavailable or returning errors, requests are automatically rerouted to an alternative provider that can handle the same task. This provides higher availability than using a single provider directly.

Yes. Plexor Labs does not store your prompts or responses beyond what's needed for routing (typically a few seconds). All data in transit is encrypted with TLS 1.3. We don't use your data for training or any purpose other than completing your requests.

Plexor Labs inherits the security policies of the underlying providers (Anthropic, OpenAI, etc.) for data handling.

Yes! Plexor Labs has first-class support for Claude Code. See our Claude Code Integration guide for detailed setup instructions. You can configure Plexor Labs as the default provider for all your Claude Code sessions.

Balanced mode (the default) routes simple requests to cheaper models and complex requests to premium models. It's ideal for mixed workloads where you want good results without overpaying for simple tasks.

Quality mode has a higher threshold for routing to cheaper models. It prefers premium models (Claude Opus, GPT-4) for most requests, only using cheaper models for very trivial queries. Use this when response quality is your top priority.

The research phase will continue while we gather feedback and usage patterns to refine our product. We will provide at least 30 days notice before transitioning to commercial pricing. All users will be notified via email with details about pricing tiers and any changes.

Yes! If you need higher rate limits for your use case, contact us at support@plexor.dev with details about your application and expected usage. We're happy to accommodate legitimate high-volume use cases.

Next Steps

Now that you've set up your Plexor Labs account, explore these resources to get the most out of intelligent LLM routing: