When to use API Request or Function tools
Choose API Request for direct HTTPS APIs and Function for Vapi tool-calls webhooks
Use an API Request tool when your assistant needs to call an ordinary HTTPS API. Use a Function tool when your server implements Vapi’s tool-calls webhook protocol, when the tool must run asynchronously, or when it runs in the browser through the Web SDK.
If you are unsure, start with an API Request tool.
Choose a tool
Compare how they work
Both tool types let the model decide when to call the tool and which model-generated arguments to supply. Validate caller-controlled values at the destination before using them for sensitive actions.
API Request tool example
This tool sends a direct request to an existing order API:
The destination receives a JSON body:
It can return the result directly:
Function tool example
This tool sends a Vapi webhook to infrastructure that you control:
Vapi sends a tool-calls message that includes the tool call and call context. Your server must return a result associated with the incoming tool-call ID:
Related documentation
Call an HTTP endpoint directly from an assistant with a structured request.
Connect an assistant to your own server through Vapi’s tool-calls webhook.
Handle tool calls in the browser through the Web SDK, with no server URL.
Add headers, static fields, Liquid values, and authentication to a request.
Design response contracts and recover from failed tool calls.
Inject server-controlled values and chain data between tool calls.
The complete tool creation API reference.