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/me

A 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/messages

Upload 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/messages

Start 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/result

Tools & references

ResourceURL
Interactive API explorerapi.hubrix.ai
OpenAPI spec (JSON)api.hubrix.ai/openapi.json
OpenAPI spec (YAML)api.hubrix.ai/openapi.yaml
Postman collectionapi.hubrix.ai/postman.json

Rate limits

PlanRequests per minute
Trial100
Starter500
Professional2,000
EnterpriseCustom

Rate-limited responses return HTTP 429 with a Retry-After header.

HTTP status codes

CodeMeaning
200Success
201Created
202Accepted (async job started)
204No content (DELETE)
400Bad request — check the detail field
401Not authenticated — missing or expired token
403Forbidden — feature not included in your plan
404Resource not found
422Validation error — request body failed schema validation
429Rate limited — slow down and retry after Retry-After seconds
500Server error — contact support if persistent

Base URL

All endpoints are relative to:

https://app.hubrix.ai/api/v1/

Was this helpful?