julian
07/01/2025, 10:35 PMChiranjeet Mishra
07/02/2025, 11:00 PMtimeoutSeconds value in your assistant's configuration. Here's an example of how you can set up an API request with a longer timeout:
json
{
"type": "apiRequest",
"function": {
"name": "api_request_tool"
},
"name": "yourToolName",
"url": "https://yourapiendpoint.com/action",
"method": "GET", // or POST depending on your API
"timeoutSeconds": 45 // adjust this value as needed
}
If your endpoint generally takes 15-20 seconds to execute, starting with a timeoutSeconds value of 45 seconds should provide enough buffer to handle the occasional longer response time.
For more details on configuring API requests, you can refer to the [Default Tools documentation](https://docs.vapi.ai/tools/default-tools).
Additionally, ensure that your server is properly handling requests and able to respond within the configured timeout period to prevent errors.