API Overview
Brivionix provides a fully OpenAI-compatible API. Use any OpenAI SDK or client to call it directly.
Base Information
| Item | Value |
|---|---|
| Base URL | https://brivionix.com |
| API Path Prefix | /v1 |
| Full API URL | https://brivionix.com/v1 |
| Authentication | Bearer Token |
| Request Format | JSON (application/json) |
| Response Format | JSON or SSE (streaming) |
Authentication
Include your API Key in the Authorization header:
bash
Authorization: Bearer sk-your-api-keyCreate and manage API Keys in the Brivionix Console.
Available Endpoints
| Endpoint | Method | Description |
|---|---|---|
/v1/chat/completions | POST | Chat completions (primary) |
/v1/models | GET | List available models |
/v1/images/generations | POST | Image generation |
/v1/embeddings | POST | Text embeddings |
/v1/audio/transcriptions | POST | Speech to text |
/v1/audio/speech | POST | Text to speech |
/v1/rerank | POST | Document re-ranking |
/v1/realtime | GET | Real-time conversation (WebSocket) |
Quick Test
bash
curl https://brivionix.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-api-key" \
-d '{"model": "gpt-5.4-mini", "messages": [{"role": "user", "content": "Hello!"}]}'Error Codes
| HTTP Code | Meaning | Action |
|---|---|---|
200 | Success | — |
400 | Bad request | Check request body format |
401 | Unauthorized | Check API Key |
403 | Forbidden | Check token permissions for the model |
429 | Rate limited | Reduce request frequency, add retry logic |
500 | Server error | Retry later |
503 | Service unavailable | Upstream provider issue, retry later |
Rate Limiting
When you receive a 429 status, implement exponential backoff:
python
import time
from openai import OpenAI, RateLimitError
client = OpenAI(
api_key="sk-your-api-key",
base_url="https://brivionix.com/v1",
)
def chat_with_retry(messages, max_retries=3):
for i in range(max_retries):
try:
return client.chat.completions.create(
model="gpt-5.4-mini",
messages=messages,
)
except RateLimitError:
wait = 2 ** i
print(f"Rate limited, retrying in {wait}s...")
time.sleep(wait)
raise Exception("Max retries exceeded")Next Steps
- Chat Completions → — The primary API endpoint
- Supported Models → — All available models
- Get API Key → — Create your token
