API Documentation

Two endpoints. Layer 1 (single) and Layer 2 (fleet).

Authentication

Authorization: Bearer trpt_your_api_key

Get your key in Settings. Free tier: 2 req/hour without key.

POST/api/v1/optimizeLive
import requests

r = requests.post("https://trimpt.com/api/v1/optimize",
    headers={"Authorization": "Bearer trpt_YOUR_KEY"},
    json={
        "prompt": "You are a customer support agent for CloudMetrics...",
        "test_queries": ["How do I install the agent?", "I want a refund"]
    })

data = r.json()
print(f"Status: {data['status']}")
print(f"Reduction: -{data['reduction_percent']}%")
print(f"Judge: {data['judge_score']}/10")
print(f"Optimized: {data['optimized_prompt']}")

Response

{
  "success": true,
  "status": "OK",
  "optimized_prompt": "CloudMetrics support. Handle: pricing...",
  "reduction_percent": 46,
  "judge_score": 7.3,
  "quality": "PASSED",
  "complexity": "MEDIUM",
  "floor_words": 38,
  "engine_version": "v1.0"
}
POST/api/v1/optimize-fleetLiveTeam+
import requests

r = requests.post("https://trimpt.com/api/v1/optimize-fleet",
    headers={"Authorization": "Bearer trpt_YOUR_KEY"},
    json={"agents": [
        {"name": "support", "prompt": "You are a support agent..."},
        {"name": "billing", "prompt": "You are a billing agent..."}
    ]})
data = r.json()
print(f"Reduction: -{data['reductionPercent']}%")

Response

{
  "success": true,
  "sharedGenome": {"original": "...", "compressed": "...", "words": 39},
  "agents": [{"name": "support", "compressedWords": 91, "quality": "PASSED"}],
  "reductionPercent": 34,
  "estimatedCacheSavings": 57
}

Rate Limits

Free2/hour, 3 opt/month
Builder $2950/hour, 10 agents
Team $79200/hour, 25 agents, Fleet
Scale $1991000/hour, 100 agents, SLA