CamelLayer / Docs

Integration Guide

CamelLayer works with any AI coding tool. Pick your setup below.

Turkish German French Spanish Portuguese Russian Chinese Japanese Korean Arabic

Claude Code

Automatic hook integration. One command install.

# Install
curl -sSL https://camellayer.com/install | bash -s -- YOUR_LICENSE_KEY

# Or manual setup:
export CAMEL_LICENSE_KEY="your_key"
# Add to ~/.claude/settings.json → hooks → UserPromptSubmit

Every non-English prompt is automatically optimized before Claude processes it. First messages include session context for maximum token efficiency.

VS Code / Copilot

Install the CamelLayer extension from the VS Code Marketplace.

Quick Use

# Keyboard shortcut
Cmd+Shift+O  →  Optimize selected text

# Command palette
CamelLayer: Optimize Selection
CamelLayer: Optimize Clipboard
CamelLayer: Set License Key

Copilot Chat Optimization

Add to your VS Code settings.json:

{
  "github.copilot.chat.localeOverride": "en",
  "camellayer.licenseKey": "your_key"
}

Cursor

Add to .cursor/rules in your project root:

When the user writes in a non-English language:
1. Translate their input to English internally before reasoning
2. Think and plan in English
3. Respond in the user's language
4. Keep technical terms in English
5. Be concise to minimize tokens

Windsurf

Add to .windsurfrules in your project root:

When the user writes in a non-English language:
1. Translate their input to English internally before reasoning
2. Think and plan in English
3. Respond in the user's language
4. Keep technical terms in English
5. Be concise to minimize tokens

Gemini CLI

Source the wrapper in your shell profile:

# Add to ~/.zshrc or ~/.bashrc
export CAMEL_LICENSE_KEY="your_key"
source <(curl -sSL https://raw.githubusercontent.com/wazder/camel/main/client/integrations/gemini-cli.sh)

Then use gemini as normal. Prompts are automatically optimized.

OpenAI Codex CLI

# Add to ~/.zshrc or ~/.bashrc
export CAMEL_LICENSE_KEY="your_key"
source <(curl -sSL https://raw.githubusercontent.com/wazder/camel/main/client/integrations/codex-cli.sh)

Claude Desktop (MCP)

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "camellayer": {
      "command": "python3",
      "args": ["-m", "camel.mcp.server"],
      "env": {
        "CAMEL_LICENSE_KEY": "your_key",
        "CAMEL_API_URL": "https://api.camellayer.com"
      }
    }
  }
}

Install the Python package first: pip install camellayer

API Direct

Use the API directly from any tool or script:

curl -X POST https://api.camellayer.com/api/v1/optimize \
  -H "Content-Type: application/json" \
  -H "X-License-Key: YOUR_KEY" \
  -d '{
    "prompt": "your non-English text here",
    "is_first_message": true
  }'

# Response:
{
  "optimized": "English translation",
  "savings_pct": 24.5,
  "detected_language": "tr",
  "system_context": "Work internally in English..."
}