API Quickstart
The Hubrix REST API gives you programmatic access to every feature in the platform: chat, agents, document RAG, deep research, bulk processing, workflows, and more.
Authentication
All API requests require a Bearer token. You can generate API keys in Settings → API Keys.
export HUBRIX_API_KEY="your-api-key-here"
export HUBRIX_BASE="https://app.hubrix.ai/api/v1"Verify your key works:
curl -H "Authorization: Bearer $HUBRIX_API_KEY" \
$HUBRIX_BASE/auth/meA successful response returns your user profile and active workspace.
Your first chat session
# 1. Create a session
SESSION=$(curl -s -X POST \
-H "Authorization: Bearer $HUBRIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "My first chat", "model_id": "claude-sonnet-4-6", "provider": "anthropic"}' \
$HUBRIX_BASE/chat/sessions | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
echo "Session: $SESSION"
# 2. Send a message (streaming SSE response)
curl -s -X POST \
-H "Authorization: Bearer $HUBRIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content": "Summarise the key benefits of RAG in three bullet points."}' \
$HUBRIX_BASE/chat/sessions/$SESSION/messagesUpload a document for RAG
# Upload a PDF — indexing is asynchronous
DOC=$(curl -s -X POST \
-H "Authorization: Bearer $HUBRIX_API_KEY" \
-F "file=@report.pdf" \
-F "title=Q1 Report" \
$HUBRIX_BASE/documents/upload | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
# Poll until ready
until [ "$(curl -s -H "Authorization: Bearer $HUBRIX_API_KEY" \
$HUBRIX_BASE/documents/$DOC | python3 -c "import sys,json; print(json.load(sys.stdin)['status'])")" = "ready" ]; do
echo "Indexing…"; sleep 3
done
# Use the document as context in chat
curl -s -X POST \
-H "Authorization: Bearer $HUBRIX_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"content\": \"What were the top risks mentioned in this report?\", \"document_ids\": [\"$DOC\"]}" \
$HUBRIX_BASE/chat/sessions/$SESSION/messagesStart a deep research report
# Depth 1 = quick overview, 2 = standard, 3 = comprehensive
JOB=$(curl -s -X POST \
-H "Authorization: Bearer $HUBRIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "Impact of AI on supply chain management in 2025", "depth": 2}' \
$HUBRIX_BASE/research/start | python3 -c "import sys,json; print(json.load(sys.stdin)['job_id'])")
# Stream progress (Server-Sent Events)
curl -s -H "Authorization: Bearer $HUBRIX_API_KEY" \
$HUBRIX_BASE/research/$JOB/stream
# Fetch the completed report
curl -s -H "Authorization: Bearer $HUBRIX_API_KEY" \
$HUBRIX_BASE/research/$JOB/resultTools & references
| Resource | URL |
|---|---|
| Interactive API explorer | api.hubrix.ai |
| OpenAPI spec (JSON) | api.hubrix.ai/openapi.json |
| OpenAPI spec (YAML) | api.hubrix.ai/openapi.yaml |
| Postman collection | api.hubrix.ai/postman.json |
Rate limits
| Plan | Requests per minute |
|---|---|
| Trial | 100 |
| Starter | 500 |
| Professional | 2,000 |
| Enterprise | Custom |
Rate-limited responses return HTTP 429 with a Retry-After header.
HTTP status codes
| Code | Meaning |
|---|---|
200 | Success |
201 | Created |
202 | Accepted (async job started) |
204 | No content (DELETE) |
400 | Bad request — check the detail field |
401 | Not authenticated — missing or expired token |
403 | Forbidden — feature not included in your plan |
404 | Resource not found |
422 | Validation error — request body failed schema validation |
429 | Rate limited — slow down and retry after Retry-After seconds |
500 | Server error — contact support if persistent |
Base URL
All endpoints are relative to:
https://app.hubrix.ai/api/v1/
Was this helpful?