API Documentation

Base URL: https://tsung-cp.a0985344368.workers.dev

Authentication

Authorization: Bearer YOUR_API_KEY

Endpoints

POST /leverage/call — Smart LLM Routing

{
  "prompt": "Analyze the competitive landscape of...",
  "task_type": "general",
  "max_tokens": 2000
}

Routes to the optimal LLM provider based on task type and complexity.

POST /leverage/race — Fastest Response

{
  "prompt": "Quick question...",
  "providers": ["groq", "cerebras", "deepseek"]
}

Races multiple providers, returns the fastest response.

POST /leverage/council — Multi-Model Consensus

{
  "prompt": "Should we invest in...",
  "council_size": 3
}

Gets independent responses from 3+ models and synthesizes a consensus.

POST /swarm/analyze — Swarm Analysis

{
  "task": "Review this architecture...",
  "type": "code-review",
  "context": "Additional context..."
}

Multi-LLM swarm with TriCollision consensus scoring.

Rate Limits

PlanRequests/monthRate limit
Starter5,00010 req/min
Pro10,00030 req/min
Business50,000100 req/min
EnterpriseCustomCustom

Response Format

{
  "success": true,
  "content": "AI response...",
  "provider": "deepseek",
  "tokens": 1234,
  "latency_ms": 850
}

Error Codes

401 — Invalid or missing API key

429 — Rate limit exceeded

500 — Provider error (automatic retry with failover)

← Back to Home