API Reference

API Reference

This section documents the main XAI Router endpoints implemented in the current codebase.


Documentation Map


Quick Examples

Mode & Domain

export BASE_URL="https://api.xairouter.com"      # SaaS single-tenant
# export BASE_URL="https://api.xaicontrol.com"   # BYOK multi-tenant

Standard auth header

Authorization: Bearer sk-Xvs...

Call proxy endpoint

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":"hello"}]}'

Check current account status

curl ${BASE_URL}/dashboard/status \
  -H "Authorization: Bearer $API_KEY"