CryptoGamer
09/12/2025, 11:41 AMChiranjeet Mishra
09/12/2025, 5:30 PMcurl --location 'https://api.vapi.ai/tool/' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer <YOUR_API_KEY>' \--data '{ "type": "query", "function": { "name": "product-query" }, "knowledgeBases": [ { "provider": "google", "name": "product-kb", "description": "Use this knowledge base when the user asks or queries about the product or services", "fileIds": [ "YOUR_FILE_ID_1", "YOUR_FILE_ID_2" ] } ]}'
Key points:
1. Use "type": "query" in your request
2. Include knowledgeBases array with your configuration
3. Make sure you've already uploaded your files and have their fileIds
4. Currently only supports Google as a provider with the gemini-1.5-flash model
Remember to first upload your files using the file endpoint before creating the query tool.