Brain

Query the Brain

Send a natural language query to the Brain agent. Supports streaming via SSE when stream=true.

post/v1/chat

Request

  • Base URL: https://api.marketintell.ai
  • URL: https://api.marketintell.ai/v1/chat
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Headers

Idempotency-Keystring

Opt-in idempotency token (max 255 chars). The FIRST request carrying a given key is processed normally and its 2xx response is cached for 24h, scoped to (api_key + method + path + request-body hash). A retry with the SAME key and body replays the cached response and adds Idempotency-Replayed: true. Reusing the same key with a DIFFERENT body returns 422 (idempotency_key_reuse). The cache is per-process and in-memory, so on a multi-replica deploy a retry that lands on a different task re-executes — callers must already tolerate at-least-once delivery.

Request body

messagestring required

Natural language query

session_idstring uuid

Session ID for multi-turn conversations

streamboolean

Enable SSE streaming

domain'crypto' | 'us_equities' | 'india_stocks'

Force a specific domain. When omitted, the planner classifies the query (default: crypto).

mode'auto' | 'deep'

'auto' (default) lets the planner pick the T1/T2/T3 pipeline. 'deep' forces the T3 supervisor (Pro+ only). The legacy value 'fast' is no longer accepted by the API — use 'auto' instead.

portfolio_idstring

Inject a specific portfolio's context. Must be owned by the calling key — cross-owner ids are silently ignored.

include_portfolioboolean

When true (and no portfolio_id supplied), auto-inject the calling key's most-recently-updated portfolio.

include_factsboolean

When true, include the neutral fact projection in fact_projection and reasoning_summary.evidence. Recommended for autonomous agent consumers.

Example request

{
  "message": "Should I long or short BTC?"
}

Response

Brain response with classification and correlation metadata

successboolean

Changes

No recorded changes to this operation across all 1 revision of this API.