Β΄API guide
One endpoint, every model.
Alexa implements the OpenAI chat completions API. Point any OpenAI SDK or compatible tool at the base URL below and authenticate with a key from the Sanctum.
Base URL
https://www.alexalabshq.xyz/api/v1OpenAI-compatible
curl https://www.alexalabshq.xyz/api/v1/chat/completions \
-H "Authorization: Bearer $ALEXA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "anthropic/claude-sonnet-5.5", "messages": [{"role": "user", "content": "Know thyself."}]}'Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /api/v1/chat/completions | Chat completion, streaming or not. Accepts tools, response_format and reasoning. |
| GET | /api/v1/models | Model ids available to your key. |
Errors
| 401 | The key is missing, malformed or revoked. |
| 402 | The wallet is out of balance and holder credit, or has reached its daily limit. |
| 400 | The model id is unknown or the request body is invalid. |
| 502 | The upstream model provider failed. Retrying usually works. |
Errors use the OpenAI shape: { "error": { "message", "type" } }.