qbrixqbrix

API Reference

Base URL: https://cloud.qbrix.io

Authentication is required for most endpoints via JWT bearer tokens or API keys (X-API-Key header).

Tip

Install the Python SDK and set up your environment once:

pip install qbrix
from qbrix import Qbrix
 
client = Qbrix(
    api_key="your-api-key",
    base_url="https://cloud.qbrix.io",
)

Authentication

Register & Login

POST/api/auth/registerRegister a new user
curl -X POST $QBRIX_URL/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com", "password": "pass123"}'
POST/api/auth/loginLogin and receive JWT tokens
curl -X POST $QBRIX_URL/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com", "password": "pass123"}'
POST/api/auth/refreshRefresh an access token
curl -X POST $QBRIX_URL/api/auth/refresh \
  -H "Content-Type: application/json" \
  -d '{"refresh_token": "<refresh-token>"}'

Profile

GET/api/auth/profileGet current user profile
PATCH/api/auth/profileUpdate user profile
POST/api/auth/change-passwordChange password
DELETE/api/auth/accountDelete user account

API Keys

POST/api/auth/api-keysCreate an API key
GET/api/auth/api-keysList all API keys
PATCH/api/auth/api-keys/{id}Update API key name
DELETE/api/auth/api-keys/{id}Deactivate an API key
POST/api/auth/api-keys/{id}/rotateRotate an API key
GET/api/auth/api-keys/{id}/usageGet API key usage stats

Admin (requires admin role)

GET/api/auth/usersList all users
PUT/api/auth/users/{id}/roleAssign role to user
PATCH/api/auth/users/{id}/statusUpdate user active status
GET/api/auth/users/statsUser statistics by role
GET/api/auth/rolesList available roles

Workspace

GET/api/auth/workspaceGet workspace details
PATCH/api/auth/workspaceUpdate workspace (admin)
GET/api/auth/workspace/membersList workspace members

Invites

POST/api/auth/workspace/invitesCreate a workspace invite
GET/api/auth/workspace/invitesList pending invites
DELETE/api/auth/workspace/invites/{id}Revoke an invite
GET/api/auth/invites/{token}Validate an invite token
POST/api/auth/invites/{token}/acceptAccept an invite

Pools

POST/api/v1/poolsCreate a new pool with arms
pool = client.pool.create(
    name="my-pool",
    arms=[
        {"name": "variant-a"},
        {"name": "variant-b"},
        {"name": "variant-c"},
    ],
)
GET/api/v1/poolsList all pools (paginated)
page = client.pool.list(limit=100, offset=0)
for pool in page.items:
    print(pool.name)
GET/api/v1/pools/{id}Get pool by ID
pool = client.pool.get("<pool-id>")
PATCH/api/v1/pools/{id}Update pool
DELETE/api/v1/pools/{id}Delete pool
client.pool.delete("<pool-id>")
GET/api/v1/pools/{id}/experimentsList experiments for pool
experiments = client.pool.list_experiments("<pool-id>")

Experiments

POST/api/v1/experimentsCreate a new experiment
experiment = client.experiment.create(
    name="hero-test",
    pool_id="<pool-id>",
    policy="BetaTSPolicy",
)
GET/api/v1/experimentsList experiments (paginated, filterable)
page = client.experiment.list(limit=100, offset=0)
for exp in page.items:
    print(f"{exp.name} ({exp.policy})")
GET/api/v1/experiments/{id}Get experiment by ID
experiment = client.experiment.get("<experiment-id>")
PATCH/api/v1/experiments/{id}Update experiment
experiment = client.experiment.update(
    "<experiment-id>",
    enabled=False,
)
DELETE/api/v1/experiments/{id}Delete experiment

Agent (Selection & Feedback)

POST/api/v1/agent/selectSelect an arm
result = client.agent.select(
    experiment_id="<experiment-id>",
    context={"id": "user-123"},
)

For contextual policies, include a context vector:

from qbrix import Context
 
result = client.agent.select(
    experiment_id="<experiment-id>",
    context=Context(
        id="user-123",
        vector=[0.5, 1.2, -0.3],
        metadata={"country": "US"},
    ),
)
POST/api/v1/agent/feedbackSubmit reward feedback
client.agent.feedback(
    request_id="<request-id>",
    reward=1.0,
)

Feature Gates

POST/api/v1/gates/{experiment_id}Create a feature gate
gate = client.gate.create(
    experiment_id="<experiment-id>",
    enabled=True,
    rollout_percentage=50.0,
)
GET/api/v1/gates/{experiment_id}Get feature gate config
gate = client.gate.get("<experiment-id>")
PUT/api/v1/gates/{experiment_id}Update feature gate
gate = client.gate.update(
    experiment_id="<experiment-id>",
    enabled=True,
    rollout_percentage=100.0,
    rules=[
        {
            "key": "country",
            "operator": "in",
            "value": ["US", "GB", "DE"],
            "arm_id": "<arm-id>",
        },
    ],
)
DELETE/api/v1/gates/{experiment_id}Delete feature gate

Policies

GET/api/v1/policiesList all available policies

Returns all 12 bandit policies with their configurable parameters. See the Policies page for detailed guidance.

Runtime

GET/api/v1/runtime/redis/healthRedis health check
GET/api/v1/runtime/redis/stream/sizeFeedback queue length
GET/api/v1/runtime/motor/healthMotor service health (gRPC)
GET/api/v1/runtime/cortex/healthCortex service health (gRPC)

Health

GET/healthProxy service health check
GET/infoService info and version

Enterprise Endpoints

Info

The following endpoints are available on the Enterprise plan.

Billing

POST/api/v1/ee/billing/checkout/sessionCreate a Stripe checkout session
GET/api/v1/ee/billing/subscriptionGet current subscription
POST/api/v1/ee/billing/subscription/cancelCancel subscription
POST/api/v1/ee/billing/subscription/reactivateReactivate cancelled subscription
GET/api/v1/ee/billing/invoicesList invoices
POST/api/v1/ee/billing/enterprise/contactContact sales for Enterprise plan

Events

GET/api/v1/ee/eventList events (filterable by type, date range)
GET/api/v1/ee/event/selectionList selection events
GET/api/v1/ee/event/selection/{request_id}Get selection detail with matched feedback
GET/api/v1/ee/event/feedbackList feedback events
GET/api/v1/ee/event/auditList audit events

Insights

GET/api/v1/ee/insight/experiment/{id}Experiment statistics overview
GET/api/v1/ee/insight/experiment/{id}/timeseriesSelection timeseries
GET/api/v1/ee/insight/experiment/{id}/timeseries/rewardsReward timeseries
GET/api/v1/ee/insight/experiment/{id}/timeseries/armsPer-arm timeseries
GET/api/v1/ee/insight/experiment/{id}/armsPer-arm statistics
GET/api/v1/ee/insight/experiment/{id}/funnelFeedback funnel (selections → feedback conversion)
GET/api/v1/ee/insight/experiment/{id}/cumulativeCumulative reward over time