Brainix API Reference
Brainix exposes a single unified HTTP endpoint for every trading intelligence model on the platform —
Forex, Crypto, Polymarket, and quantitative strategy models. Instead of integrating a different SDK per
provider, you send one request shape to /v1/predict and swap the
model field to switch markets. Responses, error codes, authentication,
and billing all work identically across every model in the registry.
This reference covers everything you need to go from a fresh account to a production trading bot: how to authenticate, the exact request/response contract, rate limits, error handling, webhooks, and how usage is billed against your account balance.
Authentication
Every request to the Brainix API must include an Authorization
header carrying a bearer token — your API key. Keys are generated from your
dashboard and are scoped to your
account balance; requests are declined once your available credit reaches zero.
Authorization: Bearer bx_live_9f83a1c7de5b4e2a9f11c4d2a
Content-Type: application/json
Keys prefixed bx_live_ execute against live markets and deduct
real balance. Keys prefixed bx_test_ run against a sandbox model
that returns deterministic sample payloads and never bill your account — use these while integrating.
Never expose a live key in client-side code; issue it only from your trading server or bot process.
Quickstart
Three steps to your first prediction:
- Create an account and load credits from the billing panel.
- Generate an API key from API Keys.
- Call
/v1/predictwith a model id and symbol.
curl https://api.brainixlabs.com/v1/predict \
-H "Authorization: Bearer BRAINIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "brainix-forex-v2",
"symbol": "EUR/USD",
"horizon": "15m"
}'
Making requests
All predictions go through a single endpoint: POST https://api.brainixlabs.com/v1/predict.
The body is always JSON and accepts the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model id from the registry, e.g. brainix-forex-v2. |
| symbol | string | Forex/Crypto only | Instrument pair, e.g. EUR/USD or SOL/USD. |
| market_id | string | Polymarket only | Target market identifier on Polymarket. |
| horizon | string | No | Prediction window, e.g. 15m, 1h, 1d. Defaults per model. |
| webhook_url | string | No | If set, Brainix POSTs the result here in addition to the synchronous response. |
Response schema
Every successful prediction returns HTTP 200 with a consistent envelope:
{
"model": "brainix-forex-v2",
"symbol": "EUR/USD",
"signal": "LONG",
"confidence": 0.87,
"horizon": "15m",
"latency_ms": 9,
"cost": 2.00,
"request_id": "req_8f1a2c9e"
}
signal— directional bias: LONG, SHORT, or FLAT.confidence— model confidence between 0 and 1.cost— amount in USD deducted from your balance for this call.request_id— unique id, echoed in webhooks and useful when contacting support.
Error handling
Errors return a non-2xx status code with a JSON body describing what went wrong:
{
"error": {
"code": "insufficient_balance",
"message": "Account balance is $0.00, request cost is $2.00."
}
}
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | Missing or malformed field in the request body. |
| 401 | invalid_api_key | The bearer token is missing, revoked, or malformed. |
| 402 | insufficient_balance | Account balance is below the cost of the request. |
| 404 | model_not_found | The requested model id does not exist in the registry. |
| 429 | rate_limited | You exceeded your key's requests-per-second limit. |
| 503 | model_degraded | The model is temporarily degraded; retry with backoff. |
Rate limits
Rate limits are enforced per API key, not per account, so you can isolate bots from one another. Pay-as-you-go keys default to a generous per-second limit suitable for most automated strategies; Institutional plans get dedicated, negotiated limits. The current limit and remaining quota are always returned as response headers:
X-RateLimit-Limit: 50
X-RateLimit-Remaining: 47
X-RateLimit-Reset: 1728835200
When you exceed your limit, the API returns 429 rate_limited. Back
off and retry after X-RateLimit-Reset (a Unix timestamp). Bursting
is not permitted — sustained excess traffic on a key may trigger a temporary suspension.
Webhooks
Pass a webhook_url in any request to also receive the result as an
asynchronous HTTP POST — useful for long-horizon predictions or fan-out to multiple bot instances. Payloads
are signed with an HMAC-SHA256 signature in the X-Brainix-Signature
header so you can verify authenticity before acting on the payload.
Forex models
Forex models predict short and medium-term directional bias on major, minor, and cross currency pairs.
Pass a symbol such as EUR/USD and an
optional horizon (15m,
1h, 1d).
| Model | Coverage | Median latency | Price |
|---|---|---|---|
| brainix-forex-v2 | 28 major/minor pairs | 8ms | $2.00 / request |
Crypto models
Crypto models track on-chain flow, order-book imbalance, and cross-exchange spread to produce directional
signals for major tokens. Use the same symbol/horizon
contract as Forex.
| Model | Coverage | Median latency | Price |
|---|---|---|---|
| solana-tracker-v1 | SOL and top SPL tokens | 11ms | $2.00 / request |
Polymarket models
Polymarket models estimate resolution probability for open prediction markets. Pass a
market_id instead of a symbol; the response's
confidence field represents the model's estimated probability
of a "Yes" resolution.
| Model | Coverage | Median latency | Price |
|---|---|---|---|
| polymarket-pred-alpha | All active Polymarket markets | 9ms | $2.00 / request |
Quant strategy models
Quant strategy models expose signals derived from classic systematic strategies (mean-reversion, momentum, stat-arb) re-scored against live market state. These are billed per executed trade signal rather than per raw request.
| Model | Strategy | Median latency | Price |
|---|---|---|---|
| quant-mean-revert-3 | Mean reversion | 14ms | $1.20 / trade |
Billing & credits
Brainix is pay-as-you-go with no subscriptions and no minimum deposit. Add credits from your
billing panel; each
successful prediction deducts its listed price from your balance immediately. Requests are rejected with
402 insufficient_balance once your balance can't cover the next
call — set a spend limit per key from the dashboard to cap exposure per bot.
Institutional accounts can negotiate custom pricing, dedicated inference clusters, and invoiced billing — contact [email protected].
Security
All traffic is served over TLS 1.2+. API keys are stored hashed and can be revoked instantly from the dashboard. We recommend rotating keys periodically, scoping each key to a single bot or environment, and enabling two-factor authentication on your account under Settings. Webhook payloads are signed with HMAC-SHA256 so you can verify they originated from Brainix before your bot acts on them.
Status & SLAs
Live model status is shown on the model registry — each row reports Operational or Degraded in real time. Institutional plans include a contractual uptime SLA with credits for downtime beyond the agreed threshold; details are shared during onboarding.