Skip to main content
POST
POST /api/agent

Agent

Send a conversation to the iNwealth AI agent and receive a streaming response.

Request

object[]
required
Conversation history.
string
required
Unique session identifier (client-side). Reuse the same ID for a conversation to benefit from Anthropic’s prompt caching.
string
default:"fr"
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, intl
string
default:"fr"
Response language. Supported: fr, en, de, es, it, pt
boolean
default:false
Enable Claude’s native extended thinking mode. The agent reasons explicitly before answering — recommended for complex or cross-border questions.
string
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:
When extended_thinking is enabled, delta events can also contain thinking data:

Error responses