Skip to main content
POST
AI Chat
You are viewing the standard endpoint which returns a complete JSON response.

Multi-turn conversations

Pass the conversationId from a previous response to continue the conversation. For independent questions, omit conversationId to start fresh.

Filtering, boosting, and source fields

Three optional fields let you narrow and shape the content the model uses when generating an answer. All three work on both the standard and streaming endpoints.

Tagging requests for analytics

The optional tags field labels the context a question was asked from. Tags are stored on the analytics events for the request and do not change the answer. They work on both the standard and streaming endpoints. If you built AI Mode yourself, see Tagging AI Mode requests for the tag that makes its requests count as AI Mode.
A request is never rejected because of its tags. Instead, the tags are sanitized:
  • Each tag is lower-cased, and characters other than a–z, 0–9 and _ are removed. This also removes surrounding whitespace.
  • Each tag is cut to 32 characters.
  • Empty tags, duplicate tags and entries that are not strings are dropped.
  • Only the first 5 tags are kept.
  • A tags value that is not an array is ignored.

Authorizations

Authorization
string
header
required

SiteKey authentication. Pass the full value including the SiteKey prefix: SiteKey <base64(customerId:engineId:searchKey)>. Example: SiteKey dGVzdDoxMjM0NTY3Ojk4NzY1.

Path Parameters

customerId
integer
required

Your Cludo account ID.

engineId
integer
required

Search engine ID.

Body

application/json
question
string
required

End-user question in natural language. Grounding content is retrieved from your indexed pages.

conversationId
string<uuid>

Reuse the same id from a previous AI Chat response to continue a thread; omit or use a new id to start fresh (streaming responses expose ids in headers too).

language
string

ISO-639-1 or simple locale code for answer language (e.g. en, da).

answerLength
enum<string>

comprehensive for longer explanations; concise for short answers.

Available options:
comprehensive,
concise
customPrompt
string

Extra system-style instructions (tone, disclaimers, formatting). Use sparingly; overrides can affect safety and quality.

includeCitations
boolean

For non-streaming AI Chat, when true, the JSON response includes citations with title, url, and snippet for each source used, and url is left empty. When false (default), citations is omitted and url holds a single primary source link instead. For streaming AI Chat, when true, inline Markdown citation links are included in the streamed text. When false (default), the streamed text has no inline citations and a single primary source URL is surfaced separately. Server default: False.

filters
object

Restrict the grounding content used to answer the question. Each key is an indexed field name mapped to allowed values (e.g. {"Category": ["Guides"]}). The reserved keys range, date, and geo_distance express numeric, date, and geo-distance filters — see the Search endpoint's Filter value formats for the full grammar.

Example:
valueBoost
object[]

Field boost configurations that influence the ranking of search results used as context for the answer. Each entry names an indexed field and a list of boost rules, where each rule pairs a numeric boost multiplier with the values that trigger it.

sourceFields
string[]

Document fields to use as grounding context when generating the answer. Defaults to ["Title", "Content"] when omitted. Extend this list to include additional indexed fields (e.g. "Summary", "Description") so the model can draw on richer content.

Example:
tags
string[]

Labels naming the context the question was asked from, recorded on the analytics events for the request. If you built AI Mode yourself, see the AI Mode section of the AI Integration Guide for the tag to send. Tags never cause a request to be rejected. Instead they are sanitized: each tag is lower-cased, characters other than a–z, 0–9 and _ are removed, and the result is cut to 32 characters. Empty tags, duplicates and entries that are not strings are dropped, and only the first 5 tags are kept. A value that is not an array is ignored.

Maximum array length: 5
Maximum string length: 32
Example:

Response

Successful AI Chat response.

value
object