Documentation

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.

headers
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:

  1. Create an account and load credits from the billing panel.
  2. Generate an API key from API Keys.
  3. Call /v1/predict with a model id and symbol.
quickstart.sh
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
modelstringYesModel id from the registry, e.g. brainix-forex-v2.
symbolstringForex/Crypto onlyInstrument pair, e.g. EUR/USD or SOL/USD.
market_idstringPolymarket onlyTarget market identifier on Polymarket.
horizonstringNoPrediction window, e.g. 15m, 1h, 1d. Defaults per model.
webhook_urlstringNoIf set, Brainix POSTs the result here in addition to the synchronous response.

Response schema

Every successful prediction returns HTTP 200 with a consistent envelope:

200 OK
{
  "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:

402 Payment Required
{
  "error": {
    "code": "insufficient_balance",
    "message": "Account balance is $0.00, request cost is $2.00."
  }
}
Status Code Meaning
400invalid_requestMissing or malformed field in the request body.
401invalid_api_keyThe bearer token is missing, revoked, or malformed.
402insufficient_balanceAccount balance is below the cost of the request.
404model_not_foundThe requested model id does not exist in the registry.
429rate_limitedYou exceeded your key's requests-per-second limit.
503model_degradedThe 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:

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).

ModelCoverageMedian latencyPrice
brainix-forex-v228 major/minor pairs8ms$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.

ModelCoverageMedian latencyPrice
solana-tracker-v1SOL and top SPL tokens11ms$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.

ModelCoverageMedian latencyPrice
polymarket-pred-alphaAll active Polymarket markets9ms$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.

ModelStrategyMedian latencyPrice
quant-mean-revert-3Mean reversion14ms$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.