> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vapi.ai/llms.txt.
> For full documentation content, see https://docs.vapi.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vapi.ai/_mcp/server.

# Multilingual support agent

> Build a multilingual voice AI customer support agent with automatic language detection, native voices, and comprehensive tools for international customer service

## Overview

Build a dynamic customer support agent for GlobalTech International that automatically detects and responds in the customer's language (English, Spanish, or French) during conversation, with seamless language switching and real-time adaptation.

**What You'll Build:**

* Assistant with automatic multilingual transcription
* Dynamic voice adaptation for detected languages
* Real-time language switching during conversations
* Phone number setup for seamless international support
* Advanced prompting for cultural context awareness

**Alternative Approach**: For a more structured multilingual experience with explicit language selection, see our [Squad-based multilingual support](../../squads/examples/multilingual-support) that guides customers through language selection and dedicated conversation paths.

## Prerequisites

* A [Vapi account](https://dashboard.vapi.ai/).

## Scenario

We will be creating a dynamic multilingual customer support agent for GlobalTech International, a technology company serving customers across North America, Europe, and Latin America. Unlike structured language selection, this agent automatically detects the customer's language from their speech and can switch languages mid-conversation, providing a truly seamless multilingual experience.

***

## 1. Create a Multilingual Knowledge Base

Download customers.csv

Download products.csv

Download support\_articles.csv

1. Navigate to **Files** in your [Vapi Dashboard](https://dashboard.vapi.ai/)
2. Click **Choose file** and upload all three CSV files
3. Note the file IDs for use in creating multilingual tools

```typescript
import { VapiClient } from "@vapi-ai/server-sdk";
import fs from 'fs';

const vapi = new VapiClient({ token: "YOUR_VAPI_API_KEY" });

async function uploadMultilingualFiles() {
  try {
    // Upload customers file
    const customersFile = await vapi.files.create({
      file: fs.createReadStream("customers.csv")
    });

    // Upload products file
    const productsFile = await vapi.files.create({
      file: fs.createReadStream("products.csv")
    });

    // Upload support articles file
    const supportFile = await vapi.files.create({
      file: fs.createReadStream("support_articles.csv")
    });

    console.log(`Customers file ID: ${customersFile.id}`);
    console.log(`Products file ID: ${productsFile.id}`);
    console.log(`Support articles file ID: ${supportFile.id}`);

    return {
      customersFileId: customersFile.id,
      productsFileId: productsFile.id,
      supportFileId: supportFile.id
    };
  } catch (error) {
    console.error('Error uploading files:', error);
    throw error;
  }
}

// Upload all multilingual support files
const fileIds = await uploadMultilingualFiles();
```

```python
import requests

def upload_multilingual_file(file_path):
    """Upload a CSV file for multilingual support data"""
    url = "https://api.vapi.ai/file"
    headers = {"Authorization": f"Bearer {YOUR_VAPI_API_KEY}"}
    
    try:
        with open(file_path, 'rb') as file:
            files = {'file': file}
            response = requests.post(url, headers=headers, files=files)
            response.raise_for_status()
            return response.json()
    except requests.exceptions.RequestException as error:
        print(f"Error uploading {file_path}: {error}")
        raise

# Upload all required files
customers_file = upload_multilingual_file("customers.csv")
products_file = upload_multilingual_file("products.csv")
support_file = upload_multilingual_file("support_articles.csv")

print(f"Customers file ID: {customers_file['id']}")
print(f"Products file ID: {products_file['id']}")
print(f"Support articles file ID: {support_file['id']}")
```

```bash
# Upload customers.csv
curl -X POST https://api.vapi.ai/file \
     -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
     -F "file=@customers.csv"

# Upload products.csv
curl -X POST https://api.vapi.ai/file \
     -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
     -F "file=@products.csv"

# Upload support_articles.csv
curl -X POST https://api.vapi.ai/file \
     -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
     -F "file=@support_articles.csv"
```

***

## 2. Create a Multilingual Assistant

Go to [dashboard.vapi.ai](https://dashboard.vapi.ai) and click `Assistants` in the left sidebar.

* Click `Create Assistant`.
* Select `Blank Template` as your starting point.
* Change assistant name to `GlobalTech Support Agent`.

```typescript
import { VapiClient } from "@vapi-ai/server-sdk";

const vapi = new VapiClient({ token: "YOUR_VAPI_API_KEY" });

const systemPrompt = `You are Maria, a multilingual customer support representative for GlobalTech International. You help customers in English, Spanish, and French with product information, account support, and technical troubleshooting.

LANGUAGE CAPABILITIES:
- English: Primary language for North American customers
- Spanish: For customers in Spain, Mexico, and Latin America
- French: For customers in France, Canada, and francophone regions

CULTURAL GUIDELINES:
- English: Direct, friendly, professional tone
- Spanish: Warm, respectful, use formal "usted" initially, then adapt to customer preference
- French: Polite, formal, use proper greeting conventions ("Bonjour/Bonsoir")

Always respond in the same language the customer is using. If they switch languages, switch with them seamlessly.`;

const assistant = await vapi.assistants.create({
  name: "GlobalTech Support Agent",
  firstMessage: "Hello! I'm Maria from GlobalTech International. I can help you in English, Spanish, or French. How may I assist you today?",
  model: {
    provider: "openai",
    model: "gpt-4o",
    messages: [
      {
        role: "system",
        content: systemPrompt
      }
    ]
  }
});

console.log(`Assistant created with ID: ${assistant.id}`);
```

```python
import requests

url = "https://api.vapi.ai/assistant"
headers = {
    "Authorization": f"Bearer {YOUR_VAPI_API_KEY}",
    "Content-Type": "application/json"
}

system_prompt = """You are Maria, a multilingual customer support representative for GlobalTech International. You help customers in English, Spanish, and French with product information, account support, and technical troubleshooting.

LANGUAGE CAPABILITIES:
- English: Primary language for North American customers
- Spanish: For customers in Spain, Mexico, and Latin America
- French: For customers in France, Canada, and francophone regions

CULTURAL GUIDELINES:
- English: Direct, friendly, professional tone
- Spanish: Warm, respectful, use formal "usted" initially, then adapt to customer preference
- French: Polite, formal, use proper greeting conventions ("Bonjour/Bonsoir")

Always respond in the same language the customer is using. If they switch languages, switch with them seamlessly."""

data = {
    "name": "GlobalTech Support Agent",
    "firstMessage": "Hello! I'm Maria from GlobalTech International. I can help you in English, Spanish, or French. How may I assist you today?",
    "model": {
        "provider": "openai",
        "model": "gpt-4o",
        "messages": [
            {
                "role": "system",
                "content": system_prompt
            }
        ]
    }
}

response = requests.post(url, headers=headers, json=data)
assistant = response.json()
print(f"Assistant created with ID: {assistant['id']}")
```

```bash
curl -X POST https://api.vapi.ai/assistant \
     -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "name": "GlobalTech Support Agent",
       "firstMessage": "Hello! I'\''m Maria from GlobalTech International. I can help you in English, Spanish, or French. How may I assist you today?",
       "model": {
         "provider": "openai",
         "model": "gpt-4o",
         "messages": [
           {
             "role": "system",
             "content": "You are Maria, a multilingual customer support representative for GlobalTech International..."
           }
         ]
       }
     }'
```

***

## 3. Configure Multilingual Transcription

1. In your assistant configuration, find the **Transcriber** section
2. **Provider**: Select `Deepgram` (recommended for speed and accuracy)
3. **Model**: Choose `Nova 2` or `Nova 3`
4. **Language**: Select `Multi` (enables automatic language detection)
5. **Alternative**: Use `Google` provider with `Multilingual` language setting

```typescript
// Option 1: Deepgram Multi (recommended)
const deepgramTranscriber = {
  provider: "deepgram",
  model: "nova-2", // or "nova-3"
  language: "multi"
};

// Option 2: Google Multilingual
const googleTranscriber = {
  provider: "google",
  model: "latest",
  language: "multilingual"
};

// Update assistant with transcriber
await vapi.assistants.update("YOUR_ASSISTANT_ID", {
  transcriber: deepgramTranscriber
});
```

```python
# Option 1: Deepgram Multi (recommended)
deepgram_transcriber = {
    "provider": "deepgram",
    "model": "nova-2",  # or "nova-3"
    "language": "multi"
}

# Option 2: Google Multilingual
google_transcriber = {
    "provider": "google",
    "model": "latest",
    "language": "multilingual"
}

# Update assistant with transcriber
url = f"https://api.vapi.ai/assistant/{YOUR_ASSISTANT_ID}"
headers = {
    "Authorization": f"Bearer {YOUR_VAPI_API_KEY}",
    "Content-Type": "application/json"
}

data = {"transcriber": deepgram_transcriber}
response = requests.patch(url, headers=headers, json=data)
```

```bash
# Option 1: Deepgram Multi
curl -X PATCH https://api.vapi.ai/assistant/YOUR_ASSISTANT_ID \
     -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "transcriber": {
         "provider": "deepgram",
         "model": "nova-2",
         "language": "multi"
       }
     }'

# Option 2: Google Multilingual
curl -X PATCH https://api.vapi.ai/assistant/YOUR_ASSISTANT_ID \
     -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "transcriber": {
         "provider": "google",
         "model": "latest",
         "language": "multilingual"
       }
     }'
```

***

## 4. Configure Multilingual Voice Synthesis

1. In the **Voice** section of your assistant:
2. **Provider**: Select `Azure` (best multilingual coverage)
3. **Voice**: Choose primary voice `en-US-AriaNeural` (English)
4. **Add fallback voices**:
   * Spanish: `es-ES-ElviraNeural` (Spain) or `es-MX-DaliaNeural` (Mexico)
   * French: `fr-FR-DeniseNeural` (France) or `fr-CA-SylvieNeural` (Canada)
5. **Alternative providers**: ElevenLabs, OpenAI, or PlayHT all support multiple languages

```typescript
// Multi-language voice configuration
const multilingualVoice = {
  provider: "azure",
  voiceId: "en-US-AriaNeural", // Primary English voice
  fallbackPlan: {
    voices: [
      {
        provider: "azure",
        voiceId: "es-ES-ElviraNeural" // Spanish (Spain)
      },
      {
        provider: "azure",
        voiceId: "fr-FR-DeniseNeural" // French (France)
      },
      {
        provider: "azure",
        voiceId: "es-MX-DaliaNeural" // Spanish (Mexico)
      },
      {
        provider: "azure",
        voiceId: "fr-CA-SylvieNeural" // French (Canada)
      }
    ]
  }
};

// Alternative: ElevenLabs multilingual
const elevenLabsVoice = {
  provider: "11labs",
  voiceId: "multilingual-v2" // Supports multiple languages
};

await vapi.assistants.update("YOUR_ASSISTANT_ID", {
  voice: multilingualVoice
});
```

```python
# Multi-language voice configuration
multilingual_voice = {
    "provider": "azure",
    "voiceId": "en-US-AriaNeural",  # Primary English voice
    "fallbackPlan": {
        "voices": [
            {
                "provider": "azure",
                "voiceId": "es-ES-ElviraNeural"  # Spanish (Spain)
            },
            {
                "provider": "azure",
                "voiceId": "fr-FR-DeniseNeural"  # French (France)
            },
            {
                "provider": "azure",
                "voiceId": "es-MX-DaliaNeural"  # Spanish (Mexico)
            },
            {
                "provider": "azure",
                "voiceId": "fr-CA-SylvieNeural"  # French (Canada)
            }
        ]
    }
}

# Update assistant with voice configuration
url = f"https://api.vapi.ai/assistant/{YOUR_ASSISTANT_ID}"
headers = {
    "Authorization": f"Bearer {YOUR_VAPI_API_KEY}",
    "Content-Type": "application/json"
}

data = {"voice": multilingual_voice}
response = requests.patch(url, headers=headers, json=data)
```

```bash
curl -X PATCH https://api.vapi.ai/assistant/YOUR_ASSISTANT_ID \
     -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "voice": {
         "provider": "azure",
         "voiceId": "en-US-AriaNeural",
         "fallbackPlan": {
           "voices": [
             {
               "provider": "azure",
               "voiceId": "es-ES-ElviraNeural"
             },
             {
               "provider": "azure",
               "voiceId": "fr-FR-DeniseNeural"
             }
           ]
         }
       }
     }'
```

***

## 5. Configure System Prompt

First, create this comprehensive system prompt:

```txt title="System Prompt" maxLines=15
# GlobalTech International - Multilingual Support Agent

## Identity & Role
You are **Maria**, a multilingual customer support representative for GlobalTech International. You are fluent in English, Spanish, and French, and you help customers with product information, account support, and technical troubleshooting.

## Language Capabilities & Cultural Guidelines

### English (Primary)
- **Tone**: Direct, friendly, professional
- **Style**: Conversational but efficient
- **Approach**: Solution-focused, provide clear steps

### Spanish 
- **Tone**: Warm, respectful, patient
- **Formality**: Use formal "usted" initially, then adapt to customer preference
- **Approach**: Take time to build rapport, be thorough in explanations

### French
- **Tone**: Polite, courteous, professional
- **Formality**: Use proper greeting conventions ("Bonjour/Bonsoir")
- **Approach**: Structured responses, respectful of formality

## Core Responsibilities
1. **Product Information**: Help customers understand our technology solutions
2. **Account Support**: Assist with account access, billing, and subscription questions
3. **Technical Troubleshooting**: Guide customers through technical issues step-by-step
4. **Escalation**: Transfer to specialized teams when needed

## Language Behavior
- **Auto-detect**: Automatically respond in the customer's language
- **Language Switching**: If customer switches languages, switch with them seamlessly
- **Mixed Languages**: If customer uses multiple languages, respond in their primary language
- **Unsupported Languages**: If customer speaks another language, politely explain you support English, Spanish, and French

## Available Tools
- **Customer Lookup**: Search customer database by email, phone, or account ID
- **Product Information**: Access product catalog and specifications
- **Support Articles**: Find relevant troubleshooting guides in customer's language

Keep responses concise (under 50 words) while being thorough and helpful.
```

Then update your assistant:

Copy the system prompt above and paste it into the `System Prompt` field in your assistant configuration.

```typescript
import { VapiClient } from "@vapi-ai/server-sdk";

const vapi = new VapiClient({ token: "YOUR_VAPI_API_KEY" });

const systemPrompt = `# GlobalTech International - Multilingual Support Agent

## Identity & Role
You are **Maria**, a multilingual customer support representative for GlobalTech International. You are fluent in English, Spanish, and French, and you help customers with product information, account support, and technical troubleshooting.

## Language Capabilities & Cultural Guidelines

### English (Primary)
- **Tone**: Direct, friendly, professional
- **Style**: Conversational but efficient
- **Approach**: Solution-focused, provide clear steps

### Spanish 
- **Tone**: Warm, respectful, patient
- **Formality**: Use formal "usted" initially, then adapt to customer preference
- **Approach**: Take time to build rapport, be thorough in explanations

### French
- **Tone**: Polite, courteous, professional
- **Formality**: Use proper greeting conventions ("Bonjour/Bonsoir")
- **Approach**: Structured responses, respectful of formality

## Core Responsibilities
1. **Product Information**: Help customers understand our technology solutions
2. **Account Support**: Assist with account access, billing, and subscription questions
3. **Technical Troubleshooting**: Guide customers through technical issues step-by-step
4. **Escalation**: Transfer to specialized teams when needed

## Language Behavior
- **Auto-detect**: Automatically respond in the customer's language
- **Language Switching**: If customer switches languages, switch with them seamlessly
- **Mixed Languages**: If customer uses multiple languages, respond in their primary language
- **Unsupported Languages**: If customer speaks another language, politely explain you support English, Spanish, and French

## Available Tools
- **Customer Lookup**: Search customer database by email, phone, or account ID
- **Product Information**: Access product catalog and specifications
- **Support Articles**: Find relevant troubleshooting guides in customer's language

Keep responses concise (under 50 words) while being thorough and helpful.`;

const updatedAssistant = await vapi.assistants.update("YOUR_ASSISTANT_ID", {
  model: {
    provider: "openai",
    model: "gpt-4o",
    messages: [
      {
        role: "system",
        content: systemPrompt
      }
    ]
  }
});

console.log("System prompt updated successfully");
```

```python
import requests

url = f"https://api.vapi.ai/assistant/{YOUR_ASSISTANT_ID}"
headers = {
    "Authorization": f"Bearer {YOUR_VAPI_API_KEY}",
    "Content-Type": "application/json"
}

system_prompt = """# GlobalTech International - Multilingual Support Agent

## Identity & Role
You are **Maria**, a multilingual customer support representative for GlobalTech International. You are fluent in English, Spanish, and French, and you help customers with product information, account support, and technical troubleshooting.

## Language Capabilities & Cultural Guidelines

### English (Primary)
- **Tone**: Direct, friendly, professional
- **Style**: Conversational but efficient
- **Approach**: Solution-focused, provide clear steps

### Spanish 
- **Tone**: Warm, respectful, patient
- **Formality**: Use formal "usted" initially, then adapt to customer preference
- **Approach**: Take time to build rapport, be thorough in explanations

### French
- **Tone**: Polite, courteous, professional
- **Formality**: Use proper greeting conventions ("Bonjour/Bonsoir")
- **Approach**: Structured responses, respectful of formality

## Core Responsibilities
1. **Product Information**: Help customers understand our technology solutions
2. **Account Support**: Assist with account access, billing, and subscription questions
3. **Technical Troubleshooting**: Guide customers through technical issues step-by-step
4. **Escalation**: Transfer to specialized teams when needed

## Language Behavior
- **Auto-detect**: Automatically respond in the customer's language
- **Language Switching**: If customer switches languages, switch with them seamlessly
- **Mixed Languages**: If customer uses multiple languages, respond in their primary language
- **Unsupported Languages**: If customer speaks another language, politely explain you support English, Spanish, and French

## Available Tools
- **Customer Lookup**: Search customer database by email, phone, or account ID
- **Product Information**: Access product catalog and specifications
- **Support Articles**: Find relevant troubleshooting guides in customer's language

Keep responses concise (under 50 words) while being thorough and helpful."""

data = {
    "model": {
        "provider": "openai",
        "model": "gpt-4o",
        "messages": [
            {
                "role": "system",
                "content": system_prompt
            }
        ]
    }
}

response = requests.patch(url, headers=headers, json=data)
assistant = response.json()
print("System prompt updated successfully")
```

```bash
curl -X PATCH https://api.vapi.ai/assistant/YOUR_ASSISTANT_ID \
     -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "model": {
         "provider": "openai",
         "model": "gpt-4o",
         "messages": [
           {
             "role": "system",
             "content": "# GlobalTech International - Multilingual Support Agent..."
           }
         ]
       }
     }'
```

***

## 6. Add Multilingual Tools

Open your [dashboard.vapi.ai](https://dashboard.vapi.ai) and click `Tools` in the left sidebar.

* Click `Create Tool`.
* Select `Function` as your tool type.
* Change tool name to `lookup_customer`.
* Add function description:

  ```txt title="Function Description" wordWrap
  Look up customer information by email, phone number, or account ID. Returns customer details including preferred language, account status, and support history.
  ```
* Add knowledge base:
  * Name: `customers`
  * Description: `Customer database with multilingual support preferences`
  * File IDs: `<File ID of your customers.csv file>`

- Click `Create Tool`.
- Select `Function` as your tool type.
- Change tool name to `get_product_info`.
- Add function description:

  ```txt title="Function Description" wordWrap
  Get detailed product information including specifications, pricing, and availability. Supports queries in English, Spanish, and French.
  ```
- Add knowledge base:
  * Name: `products`
  * Description: `Product catalog with multilingual descriptions`
  * File IDs: `<File ID of your products.csv file>`

* Click `Create Tool`.
* Select `Function` as your tool type.
* Change tool name to `search_support_articles`.
* Add function description:

  ```txt title="Function Description" wordWrap
  Search technical support articles and troubleshooting guides. Returns relevant articles in the customer's preferred language.
  ```
* Add knowledge base:
  * Name: `support_articles`
  * Description: `Multilingual support documentation and troubleshooting guides`
  * File IDs: `<File ID of your support_articles.csv file>`

- Click `Assistants` in the left sidebar.
- Select your `GlobalTech Support Agent`.
- Scroll down to the `Tools` section and expand it.
- Add all three tools: `lookup_customer`, `get_product_info`, and `search_support_articles`.
- Click `Publish` to save your changes.

```typescript
import { VapiClient } from "@vapi-ai/server-sdk";

const vapi = new VapiClient({ token: "YOUR_VAPI_API_KEY" });

// Create customer lookup tool
const customerLookupTool = await vapi.tools.create({
  type: "function",
  function: {
    name: "lookup_customer",
    description: "Look up customer information by email, phone number, or account ID. Returns customer details including preferred language, account status, and support history."
  },
  knowledgeBases: [
    {
      name: "customers",
      description: "Customer database with multilingual support preferences",
      fileIds: ["YOUR_CUSTOMERS_FILE_ID"]
    }
  ]
});

// Create product information tool
const productInfoTool = await vapi.tools.create({
  type: "function",
  function: {
    name: "get_product_info",
    description: "Get detailed product information including specifications, pricing, and availability. Supports queries in English, Spanish, and French."
  },
  knowledgeBases: [
    {
      name: "products",
      description: "Product catalog with multilingual descriptions",
      fileIds: ["YOUR_PRODUCTS_FILE_ID"]
    }
  ]
});

// Create support articles tool
const supportArticlesTool = await vapi.tools.create({
  type: "function",
  function: {
    name: "search_support_articles",
    description: "Search technical support articles and troubleshooting guides. Returns relevant articles in the customer's preferred language."
  },
  knowledgeBases: [
    {
      name: "support_articles",
      description: "Multilingual support documentation and troubleshooting guides",
      fileIds: ["YOUR_SUPPORT_ARTICLES_FILE_ID"]
    }
  ]
});

// Add all tools to the assistant
const updatedAssistant = await vapi.assistants.update("YOUR_ASSISTANT_ID", {
  model: {
    toolIds: [
      customerLookupTool.id,
      productInfoTool.id,
      supportArticlesTool.id
    ]
  }
});

console.log("All multilingual tools added to assistant successfully!");
```

```python
import requests

def create_multilingual_tool(name, description, knowledge_base_name, knowledge_base_description, file_id):
    """Create a multilingual tool with knowledge base"""
    url = "https://api.vapi.ai/tool"
    headers = {
        "Authorization": f"Bearer {YOUR_VAPI_API_KEY}",
        "Content-Type": "application/json"
    }
    
    data = {
        "type": "function",
        "function": {
            "name": name,
            "description": description
        },
        "knowledgeBases": [
            {
                "name": knowledge_base_name,
                "description": knowledge_base_description,
                "fileIds": [file_id]
            }
        ]
    }
    
    response = requests.post(url, headers=headers, json=data)
    return response.json()

# Create customer lookup tool
customer_lookup_tool = create_multilingual_tool(
    "lookup_customer",
    "Look up customer information by email, phone number, or account ID. Returns customer details including preferred language, account status, and support history.",
    "customers",
    "Customer database with multilingual support preferences",
    "YOUR_CUSTOMERS_FILE_ID"
)

# Create product information tool
product_info_tool = create_multilingual_tool(
    "get_product_info",
    "Get detailed product information including specifications, pricing, and availability. Supports queries in English, Spanish, and French.",
    "products",
    "Product catalog with multilingual descriptions",
    "YOUR_PRODUCTS_FILE_ID"
)

# Create support articles tool
support_articles_tool = create_multilingual_tool(
    "search_support_articles",
    "Search technical support articles and troubleshooting guides. Returns relevant articles in the customer'\''s preferred language.",
    "support_articles",
    "Multilingual support documentation and troubleshooting guides",
    "YOUR_SUPPORT_ARTICLES_FILE_ID"
)

# Add all tools to the assistant
def update_assistant_with_tools(assistant_id, tool_ids):
    url = f"https://api.vapi.ai/assistant/{assistant_id}"
    headers = {
        "Authorization": f"Bearer {YOUR_VAPI_API_KEY}",
        "Content-Type": "application/json"
    }
    
    data = {
        "model": {
            "toolIds": tool_ids
        }
    }
    
    response = requests.patch(url, headers=headers, json=data)
    return response.json()

tool_ids = [
    customer_lookup_tool['id'],
    product_info_tool['id'],
    support_articles_tool['id']
]

updated_assistant = update_assistant_with_tools("YOUR_ASSISTANT_ID", tool_ids)
print("All multilingual tools added to assistant successfully!")
```

```bash
# Create customer lookup tool
curl -X POST https://api.vapi.ai/tool \
     -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "type": "function",
       "function": {
         "name": "lookup_customer",
         "description": "Look up customer information by email, phone number, or account ID. Returns customer details including preferred language, account status, and support history."
       },
       "knowledgeBases": [
         {
           "name": "customers",
           "description": "Customer database with multilingual support preferences",
           "fileIds": ["YOUR_CUSTOMERS_FILE_ID"]
         }
       ]
     }'

# Create product information tool
curl -X POST https://api.vapi.ai/tool \
     -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "type": "function",
       "function": {
         "name": "get_product_info",
         "description": "Get detailed product information including specifications, pricing, and availability. Supports queries in English, Spanish, and French."
       },
       "knowledgeBases": [
         {
           "name": "products",
           "description": "Product catalog with multilingual descriptions",
           "fileIds": ["YOUR_PRODUCTS_FILE_ID"]
         }
       ]
     }'

# Create support articles tool
curl -X POST https://api.vapi.ai/tool \
     -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "type": "function",
       "function": {
         "name": "search_support_articles",
         "description": "Search technical support articles and troubleshooting guides. Returns relevant articles in the customer'\''s preferred language."
       },
       "knowledgeBases": [
         {
           "name": "support_articles",
           "description": "Multilingual support documentation and troubleshooting guides",
           "fileIds": ["YOUR_SUPPORT_ARTICLES_FILE_ID"]
         }
       ]
     }'

# Add all tools to the assistant
curl -X PATCH https://api.vapi.ai/assistant/YOUR_ASSISTANT_ID \
     -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "model": {
         "toolIds": ["CUSTOMER_LOOKUP_TOOL_ID", "PRODUCT_INFO_TOOL_ID", "SUPPORT_ARTICLES_TOOL_ID"]
       }
     }'
```

***

## 7. Set Up Phone Number

Open your [dashboard.vapi.ai](https://dashboard.vapi.ai) and click `Phone Numbers` in the left sidebar.

* Click `Create Phone Number`.
* Choose `Free Vapi Number` to get started.
* Select your preferred area code (e.g., `212` for New York).

- Set the `Phone Number Name` to `GlobalTech International Support`.
- Under `Inbound Settings`, find `Assistant` dropdown and select `GlobalTech Support Agent`.
- **Optional**: Configure advanced settings:
  * Enable call recording for quality assurance
  * Set up voicemail detection
  * Configure business hours if needed
- Changes are saved automatically.

```typescript
import { VapiClient } from "@vapi-ai/server-sdk";

const vapi = new VapiClient({ token: "YOUR_VAPI_API_KEY" });

const phoneNumber = await vapi.phoneNumbers.create({
  name: "GlobalTech International Support",
  assistantId: "YOUR_ASSISTANT_ID",
  inboundSettings: {
    recordingEnabled: true,
    voicemailDetectionEnabled: true,
    maxCallDurationMinutes: 30
  }
});

console.log(`Multilingual support phone number created: ${phoneNumber.number}`);
```

```python
import requests

def create_multilingual_phone_number(assistant_id):
    """Create phone number for multilingual support"""
    url = "https://api.vapi.ai/phone-number"
    headers = {
        "Authorization": f"Bearer {YOUR_VAPI_API_KEY}",
        "Content-Type": "application/json"
    }
    
    data = {
        "name": "GlobalTech International Support",
        "assistantId": assistant_id,
        "inboundSettings": {
            "recordingEnabled": True,
            "voicemailDetectionEnabled": True,
            "maxCallDurationMinutes": 30
        }
    }
    
    response = requests.post(url, headers=headers, json=data)
    return response.json()

# Create multilingual support phone number
phone_number = create_multilingual_phone_number("YOUR_ASSISTANT_ID")
print(f"Multilingual support phone number created: {phone_number['number']}")
```

```bash
# Create multilingual support phone number
curl -X POST https://api.vapi.ai/phone-number \
     -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "name": "GlobalTech International Support",
       "assistantId": "YOUR_ASSISTANT_ID",
       "inboundSettings": {
         "recordingEnabled": true,
         "voicemailDetectionEnabled": true,
         "maxCallDurationMinutes": 30
       }
     }'
```

***

## Alternative: Squad-Based Language Selection

For a more structured approach with explicit language selection, see our comprehensive [Squad-based multilingual support](../../squads/examples/multilingual-support) guide. This approach lets customers choose their language at the start of the call, then routes them to dedicated conversation paths optimized for each language.

```typescript
const languageSelectionWorkflow = await vapi.workflows.create({
  name: "GlobalTech Multilingual Workflow",
  nodes: [
    {
      id: "language_selection",
      type: "conversation",
      firstMessage: "Hello! Hola! Bonjour! Welcome to GlobalTech International. Please say 'English', 'Español', or 'Français' to continue in your preferred language.",
      systemPrompt: "Listen for the customer's language preference and extract it.",
      extractVariables: [
        {
          name: "preferred_language",
          type: "string",
          description: "Customer's preferred language",
          enum: ["english", "spanish", "french"]
        }
      ]
    },
    {
      id: "english_support",
      type: "conversation",
      condition: "preferred_language == 'english'",
      firstMessage: "Thank you for choosing English. I'm Maria, your support representative. How can I help you today?",
      systemPrompt: "You are Maria, GlobalTech's English support agent. Be direct, friendly, and professional.",
      voice: {
        provider: "azure",
        voiceId: "en-US-AriaNeural"
      }
    },
    {
      id: "spanish_support",
      type: "conversation",
      condition: "preferred_language == 'spanish'",
      firstMessage: "Gracias por elegir español. Soy María, su representante de soporte. ¿Cómo puedo ayudarle hoy?",
      systemPrompt: "Eres María, agente de soporte en español de GlobalTech. Sé cálida, respetuosa y usa 'usted' inicialmente.",
      voice: {
        provider: "azure",
        voiceId: "es-ES-ElviraNeural"
      }
    },
    {
      id: "french_support",
      type: "conversation",
      condition: "preferred_language == 'french'",
      firstMessage: "Merci d'avoir choisi le français. Je suis Maria, votre représentante du support. Comment puis-je vous aider aujourd'hui?",
      systemPrompt: "Vous êtes Maria, agent de support français de GlobalTech. Soyez polie, courtoise et formelle.",
      voice: {
        provider: "azure",
        voiceId: "fr-FR-DeniseNeural"
      }
    }
  ]
});
```

* **Clearer language selection**: Customers explicitly choose their language
* **Dedicated language paths**: Each language has its own conversation flow
* **Optimized voices**: Language-specific voices for better quality
* **Easier maintenance**: Separate prompts and logic for each language
* **Better analytics**: Track language preferences and usage patterns

## Provider Support Summary

**Speech-to-Text (Transcription):**

* **Gladia**: Solaria, automatic language detection and code-switching.
* **Deepgram**: Nova 2, Nova 3 with "Multi" language setting
* **Google**: Latest models with "Multilingual" language setting
* **All other providers**: Single language only, no automatic detection

**Text-to-Speech (Voice Synthesis):**

* **Azure**: 400+ voices across 140+ languages (recommended for coverage)
* **ElevenLabs**: 30+ languages with premium quality
* **OpenAI**: 50+ languages with consistent quality
* **PlayHT**: 80+ languages, cost-effective
* **All providers**: Support multiple languages natively

**Language Models:**

* **All major LLMs** (GPT-4o, Claude, Gemini, Llama, etc.): Native multilingual support

## Next Steps

Just like that, you've built a dynamic multilingual customer support agent that automatically detects and responds in the customer's language with seamless mid-conversation language switching.

Consider reading the following guides to further enhance your multilingual implementation:

* [**Squad-based Multilingual Support**](../../squads/examples/multilingual-support) - Compare with structured language selection approach
* [**Multilingual Configuration Guide**](../../../customization/multilingual) - Learn about all multilingual configuration options
* [**Custom Tools**](../../../tools/custom-tools) - Build advanced multilingual tools and integrations

Need help with multilingual implementation? Chat with the team on our [Discord](https://discord.com/invite/pUFNcf2WmH) or mention us on [X/Twitter](https://x.com/Vapi_AI).