Handle API Request Tool latency and retries
API Request Tools wait for the destination API to respond before the assistant continues. Configure a timeout for every tool, use messages to keep the caller informed, and enable retries only when repeating the request cannot create an unwanted side effect.
Prerequisites
- An existing API Request Tool
- For cURL requests, a Vapi API key and the tool ID
Choose a timeout
timeoutSeconds controls how long the tool waits for an API request. It defaults to 20 seconds and accepts values from 1 to 300 seconds.
Choose a timeout that accommodates the API’s normal response time without leaving the caller waiting unnecessarily. A longer timeout does not fix an unreliable endpoint, and retries can increase the time before the tool returns a final result.
The Dashboard currently exposes tool messages but not timeoutSeconds or backoffPlan. Use the API to change timeout or retry behavior. If these fields are omitted, the timeout defaults to 20 seconds and the request is not retried.
To observe timeout, delayed-message, and retry behavior before production, use a non-production endpoint you control that can intentionally delay responses or return selected failure statuses. Do not test retries against an endpoint that creates real orders or other side effects.
Protect the coffee-order request
Creating an order changes server state. Keep automatic retries disabled unless the order API supports an idempotency key or another form of duplicate protection.
The following configuration applies a 20-second timeout to the coffee-order quickstart, explicitly disables retries, and adds messages for the caller.
Dashboard
cURL
Configure tool messages
Expand Messages. Set Request Start to Custom, then add the remaining message stages with Add Message:
Do not add Request Complete. The model can then use the API response to read the server-calculated total and order number to the caller.



If you omit backoffPlan, the request is not retried. Setting maxRetries to 0 makes that choice explicit in the example.
Decide whether to retry
Retries are most useful for temporary failures on requests that are safe to repeat.
Do not enable retries only because an endpoint sometimes fails. First decide whether repeating the request can duplicate work or create another side effect.
Configure retries for a safe request
A backoff plan controls how Vapi spaces retry attempts after a non-success response:
fixedwaits the same amount between attempts.exponentialincreases the delay after each attempt.maxRetriesis the number of retries after the original request and accepts values from 0 to 10.baseDelaySecondsaccepts values from 0 to 10 seconds.excludedStatusCodeslists response codes that must not be retried. Without exclusions, non-2xx responses are retryable.
The cURL request below uses the Create Tool endpoint to create a separate checkServiceStatus GET tool. It makes one original request and allows at most two retries. Replace https://api.example.com/status with a status endpoint you control.
The Dashboard can configure this tool’s name, description, URL, and method, but not its backoff plan. The following cURL request creates the complete tool through the API:
Keep the retry limit small for voice calls. Every additional attempt can extend the silence or filler time before the assistant receives a final result.
Keep the caller informed
Tool messages control what the caller hears while a request is running and after it finishes.
For request-complete and request-failed, the default assistant role speaks the configured content instead of asking the model to respond. Use the system role when the response should account for tool results or conversation context.
For the complete field definitions, see the Create Tool and Update Tool API references. To diagnose failed tool calls, see Custom tools troubleshooting.