post https://general-runtime.voiceflow.com/knowledge-base/query
This API endpoint allows you to query the Voiceflow Knowledge Base Preview function and retrieve answers to user questions.
All requests made to any Knowledge Base APIs must be validated with a Dialog Manager API Key, prefaced with the word Bearer.
To obtain a Dialog Manager API key, go to the Integration tab on the project you uploaded data sources to and click the "Copy API key" button.
Request Fields
Property | Description & Example |
---|---|
Authorization (header) | Bearer Dialog Manager API Key |
Content-Type (header) | application/json |
question (body parameter) | Required. A string representing the question asked by the user. i.e., { "question": "What is a Voiceflow?" } |
chunkLimit (body parameter) | Optional - Control the amount of chunks used to synthesize the response. In theory, the more chunks retrieved - the more accurate the response and the more tokens consumed. In reality, the "accuracy" tied to chunks is strongly associated with how the KB documents are structured. The default number of chunks we pull is 2, at a max length of 1000 tokens (by default). That's up to 2000 tokens worth of context with the highest similarity match score to the question. If the KB docs are structured so that topics are grouped together, this should be more than enough to accurately answer the question. However, if information is scattered throughly many different KB data sources, then likely more chunks (of smaller size), will increase the accuracy of the response. You can control the max chunk size using the upload or replace KB Management APIs today, using the query parameter - "maxchunkSize"). i.e., { "question": "What is a Voiceflow?", "chunkLimit": 1 } |
Sample Response
{
"output": "Voiceflow is a low-code platform for building conversational agents.",
"chunks": [
{
"score": 0.875982821,
"chunkID": "1a1ba678-516a-11ee-9e19-9616424a06d6",
"documentID": "65005a668f10070007214a2f",
"content": "ProductAgent design platformBuild agents with a powerful low-code toolKnowledge baseTrain agents on your dataShareable prototypesCreate and share agent prototypesDeveloper hand-OffHand-off agent designs to developersNLU integrationsConnect your NLU workflowDocsTemplatesEnterpriseOverviewExplore Voiceflow's Enterprise platformCustomersLearn about Voiceflow's CustomersSecurityLearn about Voiceflow's security featuresContact salesGet in touch with the Voiceflow sales teamPricingLearnDocumentationFind help articles, designer and developer documentation, tutorials and more.View documentationBlogRead tips on collaboration strategies, customer success stories, and expert conversational AI and design insights.Take a lookVideo tutorials100+ hours of product tutorialsTemplatesGet started with free templatesGitHubGet started with code examplesAboutAbout UsLearn about our Company.Our CustomersLearn about our Customers.LoginGet startedFeatures & pricingSimple pricing. Cancel anytime.SandboxGet started for freeNo credit card requiredFree to get startedSingle Editor50 knowledge base sources2 agents100K monthly AI tokensUnlimited viewers1 workspaceSignup for SandboxNo credit card requiredProfessional$50 per month✨ Save 20% with annual billingEverything in Sandbox plus...Single Editor200 knowledge base sources per agent20 agents1M monthly AI tokens (additional tokens: $5/1M)Logic, Code, API blocksExports (PDF, CSV, JSON)Password prototypesCustom agent brandingStart 14-day trial14-day free trial, then pay by credit cardTeams $185 per Editor per month✨ Ideal for agencies & lean teamsEverything in Professional plus...Up to 3 Editors1K knowledge base sources per agentUp to 20 workspacesUnlimited agents10M monthly AI tokensReal-time collaborationDesign for NLU projectsPriority supportGroup training sessionsJoin the WaitlistPayment by credit cardEnterpriseCustom pricingAnnual billing onlyEverything in Teams plus...Unlimited EditorsUnlimited workspacesUnlimited base knowledge sourcesSingle-Sign-On (SSO)Account managementPrivate cloud hostingISO-27001 + additional security and privacy featuresUser permissions1-1 training and onboardingMigration servicesBring your own LLMCustom SLAsCustom contractingContact salesPayment by invoiceTrusted by 100,000+ teams building conversational AI productsCompare PlansSandboxFree for individualsSignupProfessional$50 per monthStart trialTeams$185 per EditorJoin the waitlistEnterpriseCustomContact salesBuild and collaborateA workspace is the homeVoiceflow Pricing",
"source": {
"type": "url",
"name": "voiceflow.com/pricing",
"url": "https://www.voiceflow.com/pricing"
}
}
],
"queryTokens": 772,
"answerTokens": 17,
"totalTokens": 789
}