API reference
export LUMOSWITCH_BASE_URL="https://api.lumoswitch.com/v1"
export LUMOSWITCH_API_KEY="the access key shown once at creation"OpenAI requests use Authorization: Bearer $LUMOSWITCH_API_KEY. Configurations may additionally enable unified Anthropic Messages and Gemini generateContent routes; see Protocols and compatibility. The same access key, model allowlist, limits, and accounting apply to every enabled format.
curl "$LUMOSWITCH_BASE_URL/chat/completions" \
-H "Authorization: Bearer $LUMOSWITCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"your-client-facing-model-name","messages":[{"role":"user","content":"Say hello."}]}'stream: true uses Server-Sent Events. With failover, every candidate must support the requested tools, vision, structured output, embeddings, or other model capability.
| HTTP | Meaning |
|---|---|
| 400 | Invalid request for the selected format |
| 401 | Missing, invalid, revoked, or blocked key |
| 403 | Model or policy denied |
| 404 | Unknown client-facing model name or route |
| 429 | Key, team, or provider limit reached |
| 5xx | Lumoswitch Runtime or provider unavailable |