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.dev

Authentication

curl -X POST https://api.promptrix.dev/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
}

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.dev

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

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)
  • Any text-based AI interface

Advanced Configuration

Environment Variables

# API Key (required)
PROMPTRIX_API_KEY=your_api_key_here

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

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

Rate Limits

Free tier: 100 optimizations/month
Pro tier: 1,000 optimizations/month
Enterprise: Unlimited with dedicated support

Need help? Contact us at kpupik@gmail.com

← Back to Home