GET
/
related-documents
curl --location 'https://document-query.pyqai.com/related-documents?account_id=ExampleAccountId&index_name=ExampleIndexName&input_sequence=ExampleQueryt&num_docs=ExampleNumDocs' \
--header 'Authorization: ExampleToken' \
--data ''
{
    "response": [
        [
            {
                "page_content": "Some relevant information.",
                "metadata": {
                    "source": "DocumentSource1"
                }
            },
            0.85
        ],
        [
            {
                "page_content": "Some relevant information",
                "metadata": {
                    "source": "DocumentSource2"
                }
            },
            0.75
        ]
    ]
}

Query Parameters

account_id
int
required

This is your account ID.

input_sequence
string
required

This is the query we use to search for related documents.

num_docs
int
required

Number of related documents you want to receive.

index_name
string

This is the name of the index you want to search for the specifed document. This parameter is optional - if left blank will use auto indexing.

Headers

Authorization
string
required

This is your API token associated with your account.

Response

response
list

Contains a list of the more relevant samples from however many files were specified, as well as a score for how closely the content matches the query.