Authentication
All requests must include an API key. Generate one from the Account panel on the main app, then paste it here to make the examples copy-ready.
Tiers & Quotas
Access policy and credit system overview.
Credit System
Credits are purchased via Stripe and applied server-side. The docs intentionally do not expose any enterprise Azure credit endpoints.
Core Endpoints
/api/v1/chat/completionsOpenAI-compatible completions endpoint. Automatically handles routing, memory, and credits.
curl https://swarmconnect.site/api/v1/chat/completions \
-H "Authorization: Bearer sk-sc-your-live-key" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{"role": "user", "content": "Hello"}],
"stream": true
}'/api/usageReturns your current daily usage and remaining requests (per-user if signed in, otherwise per-IP).
/api/v1/memoryChat persistence layer used by the web UI. Programmatic usage is optional.
/api/payments/create-checkout-sessionCreate a checkout redirect for $1, $5, or $20 credit packs.
curl https://swarmconnect.site/api/payments/create-checkout-session \
-H "Content-Type: application/json" \
-d '{"amount": 5}'/api/v1/pricingReturns average request pricing per model (40% markup over Azure token cost).
/api/metricsServer-level provider telemetry (primarily for admins/operators). For user limits, use /api/usage.