OPENAI-COMPATIBLE CLOUD PROXY SPECIFICATION
Cloud Proxy API Reference
Direct OpenAI-compatible endpoints with real-time token metering, sub-15ms reverse proxy routing, and zero master key leakage. Use with curl, Python, or standard OpenAI SDKs.
POST
Streaming SSE Supported
/v1/chat/completions
Routes requests directly to frontier models (Claude 3.5 Sonnet, GPT-4o, DeepSeek Coder, etc.) through our sovereign reverse proxy. Master API keys are never exposed to developer machines.
# Example curl request using local client proxy token:
curl -X POST https://legecycli.onrender.com/v1/chat/completions \
-H "Authorization: Bearer cp_live_your_token_here" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-3.5-sonnet",
"messages": [{"role": "user", "content": "Refactor this auth handler"}],
"stream": true
}'
GET
JSON Response
/api/user/balance
Returns current available credits, active terminal CLI sessions, and estimated token equivalents.
{
"credits": 250,
"approx_tokens": 1250000,
"tier": "pro_engineer",
"status": "active"
}
"credits": 250,
"approx_tokens": 1250000,
"tier": "pro_engineer",
"status": "active"
}
GET
JSON Array
/v1/models
Lists all currently routed models available on the reverse proxy with context sizes and current token rates.