Endpoints
POST /api/agent
Send a message to the AI wealth intelligence agent
POST
POST /api/agent
Agent
Send a conversation to the iNwealth AI agent and receive a streaming response.Request
Conversation history.
Unique session identifier (client-side). Reuse the same ID for a conversation to benefit from Anthropic’s prompt caching.
Country code for the end-user’s tax residence. The agent adapts its answers to local legislation.Supported:
fr, ch, it, be, lu, de, es, pt, gb, mc, gr, ad, nl, us, mu, ma, intlResponse language. Supported:
fr, en, de, es, it, ptEnable Claude’s native extended thinking mode. The agent reasons explicitly before answering — recommended for complex or cross-border questions.
Analysis depth. Controls how deeply the agent analyzes the question.Values:
low, medium, high, max, or null (auto — the agent decides based on complexity).Example request
Response
The response is a streaming SSE (text/event-stream) with five event types:
| Event | Description |
|---|---|
delta | Text fragment (content or thinking) — append to your display |
metadata | Metadata about the response (sources, markers) |
done | End of stream with final message |
error | Error during streaming (rate limit, internal error) |
clarification | Clarifying questions before answering — collect user input (V170) |
extended_thinking is enabled, delta events can also contain thinking data:
Error responses
| Status | Meaning |
|---|---|
200 | OK — SSE stream |
401 | Invalid or revoked API key |
400 | Invalid parameters (e.g. bad effort value) |
422 | Missing required fields |
429 | Daily token quota exceeded |
POST /api/agent

