Documentation

Everything you need to integrate and use Promptrix

API Documentation

Getting Started

The Promptrix API allows you to optimize prompts programmatically. Base URL: https://api.promptrix.co

Authentication

curl -X POST https://api.promptrix.co/optimize \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "your prompt here"}'

Response Format

{
  "original": "your prompt",
  "optimized": "enhanced version",
  "improvements": ["clarity", "specificity"],
  "confidence": 0.95
}

API Key Management

API keys are required for programmatic access to the Promptrix API. You can manage your keys from your account settings.

Getting Your API Key:

  1. Log in to your Promptrix account
  2. Navigate to Account → API Keys
  3. Click "Generate New Key"
  4. Copy and securely store your key (it won't be shown again)

API Key Limits by Tier:

  • Free: Up to 2 API keys
  • Pro: Up to 5 API keys
  • Business: Up to 10 API keys

Key Management:

  • Rotate keys regularly for security
  • Revoke compromised keys immediately from account settings
  • Name your keys to track usage across different applications
  • Never commit API keys to version control

CLI Tool

Installation

npm install -g promptrix-cli

Usage

# Optimize a prompt
promptrix "write a function to sort array"

# Pipe input
echo "explain quantum computing" | promptrix

# With options
promptrix --context=code --format=json "your prompt"

Configuration

# Set API key
promptrix config set apiKey YOUR_API_KEY

# Set API endpoint
promptrix config set endpoint https://api.promptrix.co

Browser Extension

Installation

  1. Download from Chrome Web Store or Firefox Add-ons
  2. Click "Add to Browser"
  3. Pin the extension for easy access

How to Use

  1. Navigate to ChatGPT, Claude, or any AI chat interface
  2. Type your prompt in the input field
  3. Click the Promptrix icon or use keyboard shortcut (Ctrl+Shift+P)
  4. Review the optimized prompt and apply it

Settings

  • Right-click the extension icon and select "Options"
  • Configure API key, optimization preferences, and shortcuts
  • Choose which websites to enable automatic optimization

VS Code Extension

Installation

  1. Open Visual Studio Code
  2. Go to Extensions (Ctrl+Shift+X or Cmd+Shift+X)
  3. Search for "Promptrix"
  4. Click "Install"
  5. Or visit the VS Code Marketplace

How to Use

  1. Select text in your editor containing a prompt
  2. Right-click and choose "Optimize with Promptrix"
  3. Or use Command Palette (Ctrl+Shift+P) and search for "Promptrix"
  4. Review the optimized prompt in the sidebar
  5. Apply changes or copy to clipboard

Settings

  • Open VS Code Settings (Ctrl+,)
  • Search for "Promptrix"
  • Configure API key, optimization preferences, and keyboard shortcuts
  • Enable/disable automatic optimization suggestions

MCP Server

Installation

npm install -g promptrix-mcp

Setup for Claude Desktop

Add the following to your Claude Desktop configuration file:

{
  "mcpServers": {
    "promptrix": {
      "command": "promptrix-mcp",
      "env": {
        "PROMPTRIX_API_KEY": "your_api_key_here"
      }
    }
  }
}

Usage

Once configured, the Promptrix MCP server provides tools for:

  • Optimizing prompts directly in Claude Desktop
  • Accessing prompt history and templates
  • Analyzing prompt quality in real-time
  • Batch optimization for multiple prompts

Best Practices

Prompt Optimization Tips

  • Be specific about the desired output format and length
  • Provide context when relevant (domain, audience, constraints)
  • Use examples to clarify complex requirements
  • Break down complex tasks into smaller steps
  • Review and iterate on optimized prompts for best results

Supported AI Platforms

  • ChatGPT (OpenAI)
  • Claude (Anthropic)
  • Google AI (Gemini)
  • Grok (xAI)
  • Perplexity
  • Any text-based AI interface

Multi-Method Optimization

Combine multiple optimization techniques simultaneously for more comprehensive prompt improvements. Different subscription tiers provide access to different numbers of concurrent optimization methods.

Tier-Based Access

  • Free: 1 optimization method at a time
  • Pro: Up to 2 methods simultaneously
  • Business: Up to 3 methods simultaneously

Using Multi-Method Optimization

Web Interface:

  • Select multiple optimization methods from the dropdown
  • Methods are applied sequentially for best results
  • View individual improvements from each method

CLI:

# Apply multiple methods
promptrix --methods "clarity,specificity" "your prompt"

# Sequential chaining
promptrix --methods "role-based,examples,constraints" "your prompt"

Browser Extension:

  • Click the extension icon and select "Advanced Options"
  • Choose multiple methods from the available list
  • Apply optimizations in sequence

Benefits

  • More comprehensive prompt improvements
  • Address multiple aspects simultaneously (clarity, specificity, structure)
  • Better results for complex use cases
  • Sequential chaining builds on previous optimizations

Template Library

Access 100+ pre-built prompt templates across 8 categories to jumpstart your prompt optimization. Templates are professionally crafted and optimized for specific use cases.

Template Categories

  • Engineering: Code review, debugging, architecture, documentation
  • Product: PRDs, competitive analysis, user research, feature specs
  • Sales: Outreach, follow-ups, proposals, objection handling
  • Marketing: Content creation, campaign planning, social media
  • HR: Job descriptions, interview guides, performance reviews
  • Medical: Clinical documentation, patient education, case analysis
  • Research: Literature review, data analysis, academic writing
  • Creative: Content writing, storytelling, brainstorming

Template Tiers

  • Basic Templates (All Tiers): Essential templates for common use cases
  • Premium Templates (Pro & Business): Advanced, specialized templates for complex scenarios
  • Custom Templates (Pro & Business): Create and save your own templates for reuse

How to Use Templates

Web Interface:

  1. Navigate to the Templates page from the main menu
  2. Browse by category or search for specific templates
  3. Click a template to preview and customize it
  4. Apply the template and further optimize as needed

CLI:

# List available templates
promptrix templates list

# Use a specific template
promptrix templates use "code-review"

# Create custom template (Pro/Business)
promptrix templates create "my-template"

Browser Extension & VS Code:

  • Access templates via the extension menu
  • Select from your frequently used templates
  • Sync custom templates across devices

Advanced Configuration

Environment Variables

# API Key (required)
PROMPTRIX_API_KEY=your_api_key_here

# Custom endpoint (optional)
PROMPTRIX_API_URL=https://api.promptrix.co

# Optimization preferences
PROMPTRIX_CONTEXT=code|creative|general
PROMPTRIX_PROVIDER=anthropic|openai|google

Rate Limits

Free tier: 5 optimizations per day (resets daily)
Pro tier: 1,000 optimizations per month (~33/day, resets monthly)
Business tier: 10,000 optimizations per month (~333/day, resets monthly)

Need help? Contact us at support@promptrix.co

← Back to Home
Documentation | Promptrix