Pen π»
03/30/2025, 9:03 PMVapi Support Bot
03/30/2025, 9:05 PMcurl --location 'https://api.vapi.ai/file' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--form 'file=@"<PATH_TO_YOUR_FILE>"'
## Step 3: Create a knowledge base using Trieve
Due to the migration, the recommended method is to:
1. Create a dataset in Trieve and upload your KB files directly to Trieve
2. Generate a new Trieve API key and paste it into the credential provider in Vapi
3. Import your KB to Vapi by making a POST request to the Vapi API knowledge-base route
## Step 4: Make the API call to create the knowledge base
Make a POST request to https://api.vapi.ai/knowledge-base
with a JSON payload like this:
json
{
"name": "name your kb file",
"provider": "trieve",
"searchPlan": {
"scoreThreshold": 0.2,
"searchType": "semantic"
},
"createPlan": {
"type": "import",
"providerId": "<Your Trieve Dataset ID>"
}
}
For a more detailed breakdown, you can check out [this documentation on integrating with Trieve](https://docs.vapi.ai/knowledge-base/integrating-with-trieve).Vapi Support Bot
03/30/2025, 9:05 PM