AI chat
The AI chat endpoint exposes the same Ultimate AI System that powers the propaideals.co.uk web app — a multi-agent system built on GPT-4.1 that can search 2.1M+ UK properties, run investment analysis, retrieve sold history, and answer property questions in natural language. Required scope:ai:chat
Cost: 5 requests per call (against your monthly request quota), plus 1 AI chat call (against your AI chat quota)
Send a chat message
Request
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
message | string | yes | The user’s natural-language message (max 4,000 chars) |
session_id | string | no | Session identifier for multi-turn conversations. Reuse to maintain context. Auto-generated if omitted. |
context | object | no | Optional structured context (e.g. user’s investor profile) |
top_k | integer | no | Max properties to return (default 5, max 20) |
Response
Multi-turn conversations
Pass the samesession_id on subsequent requests to maintain context. The AI remembers the previous turn and can interpret references like “show me more”, “what about cheaper ones”, or “tell me about the first property”.
Streaming responses
For lower perceived latency, use the streaming endpoint. It returns Server-Sent Events (SSE) as the AI generates its response.Event types
| Event | Payload | Description |
|---|---|---|
token | { text: string } | Next text token of the response |
property | { property: PropertyCard } | A property card the AI found |
progress | { stage: string, message: string } | Status update (e.g. “Searching properties…”) |
done | { session_id, message_id } | Stream complete |
error | { code, message } | Stream-level error |
Show more properties
Request
Cost notes
A single/ultimate-ai/chat call consumes:
- 5 requests from your monthly request quota (vs 1 for non-AI endpoints)
- 1 AI chat call from your AI chat quota
Best practices
- Reuse
session_idacross turns from the same user. Don’t start a new session per message. - Cache responses on the client side keyed by
(session_id, message)— users often re-issue the same query. - Use streaming for any user-facing UI; it dramatically improves perceived latency.
- Set a sensible
top_k. The default is 5; raise to 10–20 only if you need the wider set. - Include
contextwhen you have a user profile — the AI can personalise results without you having to explain the user every turn.