API Request Tool vs Function Tool

Choose API Request for direct HTTP 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, or when the tool must run asynchronously or on the client.

If you are unsure, start with an API Request Tool.

Choose a tool

Your integrationUseWhy
Calls an existing REST APIAPI Request ToolVapi builds and sends a direct HTTP request.
Needs a configurable URL, method, headers, or JSON bodyAPI Request ToolThese are available fields on the tool.
Returns JSON that the assistant should use immediatelyAPI Request ToolThe successful JSON response becomes the tool result.
Receives Vapi call, assistant, artifact, and tool-call contextFunction ToolVapi sends a tool-calls webhook envelope to your server.
Routes several custom tools through one webhookFunction ToolYour server can dispatch calls by tool name and correlate results with toolCallId.
Runs without waiting for a resultFunction ToolFunction Tools support top-level async: true.
Triggers a browser-side action through the Web SDKFunction ToolA Function Tool without a server URL can emit a client-side tool-calls event.
Must translate Vapi tool calls into XML, multipart data, or another custom protocolFunction Tool with an adapterYour webhook can transform the Vapi request before calling the downstream service.
Uses live call controlFunction ToolThe webhook includes call context and message.call.monitor.controlUrl, allowing your server to transfer, hand off, end, speak into, or add messages to the active call.

Compare how they work

BehaviorAPI Request ToolFunction Tool
DestinationA required HTTPS url configured directly on the toolFor server-side execution, a Vapi-aware webhook selected in this order: tool, assistant, phone number, then organization server URL
What receives the callThe destination API receives a direct HTTP requestA server receives an HTTP POST containing a Vapi tool-calls message with tool and call context; a client-side tool emits a Web SDK tool-calls event instead
HTTP methodChoose GET, POST, PUT, PATCH, or DELETEVapi sends a POST request to your Function webhook
Model-generated input schemaTop-level bodyfunction.parameters
Static valuesparameters are added to the request body and override model-generated values.parameters are added to the function arguments and override model-generated values
AuthenticationTop-level credentialIdThe credential on the selected server configuration, such as tool.server.credentialId
Successful responseA 2xx response containing valid JSONFor synchronous tools, HTTP 200 with a string result matched to each toolCallId
Failure responseA non-2xx response or invalid JSON fails the requestFor synchronous tool-specific failures, return HTTP 200 with a string in the matching results[].error
ExecutionSynchronous; the assistant waits for the destination APISynchronous by default; with top-level async: true, the assistant continues without waiting for the webhook response
Web SDK callsSupported; Vapi executes the API requestSupported; Vapi can call a server webhook or emit a client-side event
Performs custom, server-driven Live Call ControlFunction ToolThe webhook includes call context and message.call.monitor.controlUrl, allowing your server to control the active call.

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:

1{
2 "type": "apiRequest",
3 "name": "createOrder",
4 "description": "Creates an order only after the caller confirms the product and quantity.",
5 "method": "POST",
6 "url": "https://api.example.com/orders",
7 "credentialId": "550e8400-e29b-41d4-a716-446655440000",
8 "body": {
9 "type": "object",
10 "properties": {
11 "productId": {
12 "type": "string",
13 "description": "The product confirmed by the caller."
14 },
15 "quantity": {
16 "type": "integer",
17 "minimum": 1,
18 "description": "The confirmed quantity."
19 }
20 },
21 "required": ["productId", "quantity"],
22 "additionalProperties": false
23 },
24 "parameters": [
25 {
26 "key": "source",
27 "value": "voice-assistant"
28 }
29 ],
30 "timeoutSeconds": 10
31}

The destination receives a JSON body:

1{
2 "productId": "coffee-beans",
3 "quantity": 2,
4 "source": "voice-assistant"
5}

It can return the result directly:

1{
2 "success": true,
3 "orderId": "ord_123",
4 "totalDisplay": "$36.00"
5}

Function Tool example

This tool sends a Vapi webhook to infrastructure that you control:

1{
2 "type": "function",
3 "async": false,
4 "function": {
5 "name": "lookupCustomer",
6 "description": "Looks up a customer after confirming their email address.",
7 "strict": true,
8 "parameters": {
9 "type": "object",
10 "properties": {
11 "email": {
12 "type": "string",
13 "description": "The confirmed customer email address."
14 }
15 },
16 "required": ["email"],
17 "additionalProperties": false
18 }
19 },
20 "server": {
21 "url": "https://example.com/vapi/tools",
22 "credentialId": "0000000-0000-0000-0000-00000000000",
23 "timeoutSeconds": 10
24 }
25}

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:

1{
2 "results": [
3 {
4 "toolCallId": "call_abc123",
5 "result": "{\"found\":true,\"customerId\":\"cus_456\"}"
6 }
7 ]
8}