Proxy Interface

This page is aligned with the current proxy implementation and covers model routes plus dashboard query routes.


Base Information

  • Base URL: https://api.xaicontrol.com
  • Auth: Authorization: Bearer sk-Xvs...
export BASE_URL="https://api.xaicontrol.com"
curl ${BASE_URL}/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"hi"}]}'

Compatible Proxy Endpoints

OpenAI-compatible

  • /v1/chat/completions
  • /v2/chat/completions
  • /chat/completions
  • /v1/responses
  • /responses
  • /v1/embeddings
  • /embeddings
  • /v1/images/generations
  • /v1/images/edits
  • /v1/images/variations
  • /v1/audio/transcriptions
  • /v1/audio/translations
  • /v1/realtime/client_secrets
  • /v1/realtime (WebSocket)
  • /v1/moderations
  • /v1/threads
  • /v1/files
  • /v1/models, /models

Claude-compatible

  • /v1/messages
  • /messages

Dashboard Query Endpoints (same domain, GET)

  • /dashboard/status
  • /dashboard/info
  • /dashboard/live
  • /dashboard/bill
  • /dashboard/logs
  • /dashboard/news
  • /dashboard/models

Routing Behavior

1) Model mapping

Model names are resolved using:

  • user-level ModelMapper
  • owner-level ModelMapper

2) Level routing

LevelMapper chooses the key-pool level, then keys are selected by round-robin.

3) Failover

Two layers are supported:

  • ModelFailover (model chain)
  • SwitchOver (level switch)

4) ACL and limits

Requests are checked against:

  • IP allowlist (AllowIPs)
  • resource allowlist (Resources)
  • model allowlist (AllowModels)
  • user/model rate limits (ModelLimits)