Skip to content

Similarity

POST
/api/v1/ai/similarity
x-api-key
required
string

Your API key from account settings.

object
accountId
required
websiteId
required

The website ID you trained the AI on.

string
query
required

The query you want to base the similarity search on.

string
segmentId

The segment to search within.

string
maxResults
integer
default: 5

Array of similar content pages, ranked by relevance.

Array<object>
object
source

URL of the matched source page.

string format: uri
title
string
isPublic
boolean
default: true
Example
[
{
"source": "https://unless.zendesk.com/agent/tickets/2",
"title": "Test ticket (#2)",
"isPublic": false
},
{
"source": "faq",
"title": "What is the answer to everything and all?",
"isPublic": false
}
]

Invalid request parameters.