curl --request POST \
--url https://general-runtime.voiceflow.com/knowledge-base/query \
--header 'Content-Type: application/json' \
--header 'authorization: <api-key>' \
--data '
{
"question": "<string>",
"projectID": "<string>",
"instruction": "<string>",
"chunkLimit": 15,
"synthesis": true,
"filters": {},
"internalFilters": [
{
"key": "<string>",
"value": "<string>"
}
],
"projectEnvironmentIDOrAlias": "<string>",
"versionVariant": "published"
}
'{
"model": "<string>",
"output": "<string>",
"duration": 123,
"tokens": 123,
"queryTokens": 123,
"answerTokens": 123,
"cacheWriteTokens": 123,
"queryCachedTokens": 123,
"queryRemainderTokens": 123,
"inputMultiplier": 123,
"cacheMultiplier": 123,
"outputMultiplier": 123,
"cacheWriteMultiplier": 123,
"base": {
"queryTokens": 123,
"answerTokens": 123,
"cacheWriteTokens": 123,
"queryCachedTokens": 123
},
"chunks": [
{
"score": 123,
"chunkID": "<string>",
"documentID": "<string>",
"content": "<string>",
"source": {
"name": "<string>",
"url": "<string>",
"lastSuccessUpdate": "<string>",
"accessTokenID": 123,
"integrationExternalID": "<string>"
},
"metadata": {},
"internalMetadata": [
{
"key": "<string>",
"values": [
"<string>"
]
}
]
}
]
}Query the knowledge base and retrieve answers to user questions. Send a question and receive a synthesized answer or relevant document chunks from the knowledge base.
curl --request POST \
--url https://general-runtime.voiceflow.com/knowledge-base/query \
--header 'Content-Type: application/json' \
--header 'authorization: <api-key>' \
--data '
{
"question": "<string>",
"projectID": "<string>",
"instruction": "<string>",
"chunkLimit": 15,
"synthesis": true,
"filters": {},
"internalFilters": [
{
"key": "<string>",
"value": "<string>"
}
],
"projectEnvironmentIDOrAlias": "<string>",
"versionVariant": "published"
}
'{
"model": "<string>",
"output": "<string>",
"duration": 123,
"tokens": 123,
"queryTokens": 123,
"answerTokens": 123,
"cacheWriteTokens": 123,
"queryCachedTokens": 123,
"queryRemainderTokens": 123,
"inputMultiplier": 123,
"cacheMultiplier": 123,
"outputMultiplier": 123,
"cacheWriteMultiplier": 123,
"base": {
"queryTokens": 123,
"answerTokens": 123,
"cacheWriteTokens": 123,
"queryCachedTokens": 123
},
"chunks": [
{
"score": 123,
"chunkID": "<string>",
"documentID": "<string>",
"content": "<string>",
"source": {
"name": "<string>",
"url": "<string>",
"lastSuccessUpdate": "<string>",
"accessTokenID": 123,
"integrationExternalID": "<string>"
},
"metadata": {},
"internalMetadata": [
{
"key": "<string>",
"values": [
"<string>"
]
}
]
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.voiceflow.com/llms.txt
Use this file to discover all available pages before exploring further.
Voiceflow API key
1 < x < 30The alias of the environment to target (ie. main). You can find this in the environments page of your agent.
💡 Tip: Learn more about Environments.
draft, published completion Hide child attributes
Hide child attributes
url daily, weekly, monthly, never zendesk, shopify Was this page helpful?