diff --git a/fern/assistants/examples/multilingual-agent.mdx b/fern/assistants/examples/multilingual-agent.mdx
new file mode 100644
index 00000000..0726fffe
--- /dev/null
+++ b/fern/assistants/examples/multilingual-agent.mdx
@@ -0,0 +1,1184 @@
+---
+title: Multilingual support agent
+subtitle: Build a global support agent that handles English, Spanish, and French customer inquiries with automatic language detection and native voice quality
+slug: assistants/examples/multilingual-agent
+description: 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 [Workflow-based multilingual support](../../workflows/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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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: ``
+
+
+ - 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: ``
+
+
+ - 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: ``
+
+
+ - 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: Workflow-Based Language Selection
+
+For a more structured approach with explicit language selection, see our comprehensive [Workflow-based multilingual support](../../workflows/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):**
+- **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:
+
+* [**Workflow-based Multilingual Support**](../../workflows/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).
+
diff --git a/fern/customization/multilingual.mdx b/fern/customization/multilingual.mdx
index ab396480..07dc4c28 100644
--- a/fern/customization/multilingual.mdx
+++ b/fern/customization/multilingual.mdx
@@ -1,32 +1,522 @@
---
-title: Multilingual
-subtitle: Set up multilingual support for your assistant
+title: Multilingual support
+subtitle: Enable voice assistants to speak multiple languages fluently
slug: customization/multilingual
+description: Configure multilingual voice AI agents with automatic language detection, cross-language conversation, and localized voices
---
## Overview
-We support dozens of providers, giving you access to their available models for multilingual support.
+Configure your voice assistant to communicate in multiple languages with automatic language detection, native voice quality, and cultural context awareness.
-Certain providers, like google and deepgram, have multilingual transcriber models that can transcribe audio in any language.
+**In this guide, you'll learn to:**
+- Set up automatic language detection for speech recognition
+- Configure multilingual voice synthesis
+- Design language-aware system prompts
+- Test and optimize multilingual performance
-## Transcribers (Speech-to-Text)
+
+**Multilingual Support:** Multiple providers support automatic language detection. **Deepgram** (Nova 2, Nova 3 with "Multi" setting) and **Google STT** (with "Multilingual" setting) both offer automatic language detection for seamless multilingual conversations.
+
-In the dashboard's assistant tab, click on "transcriber" to view all of the available providers, languages and models for each. Each model offers different language options.
+## Configure automatic language detection
-## Voice (Text-to-Speech)
+Set up your transcriber to automatically detect and process multiple languages.
-Each provider includes a voice tag in the name of their voice. For example, Azure offers the `es-ES-ElviraNeural` voice for Spanish. Go to voice tab in the assistants page to see all of the available models.
+
+
+ 1. Navigate to **Assistants** in your [Vapi Dashboard](https://dashboard.vapi.ai/)
+ 2. Create a new assistant or edit an existing one
+ 3. In the **Transcriber** section:
+ - **Provider**: Select `Deepgram` (recommended) or `Google`
+ - **Model**: For Deepgram, choose `Nova 2` or `Nova 3`; for Google, choose `Latest`
+ - **Language**: Set to `Multi` (Deepgram) or `Multilingual` (Google)
+ 4. **Other providers**: Single language only, no automatic detection
+ 5. Click **Save** to apply the configuration
+
+
+ ```typescript
+ import { VapiClient } from "@vapi-ai/server-sdk";
-### Example: Setting Up a Spanish Voice Assistant
+ const vapi = new VapiClient({ token: "YOUR_VAPI_API_KEY" });
-```json
-{
- "voice": {
- "provider": "azure",
- "voiceId": "es-ES-ElviraNeural"
- }
-}
-```
+ // Recommended: Deepgram for multilingual support
+ const assistant = await vapi.assistants.create({
+ name: "Multilingual Assistant",
+ transcriber: {
+ provider: "deepgram",
+ model: "nova-2", // or "nova-3"
+ language: "multi"
+ }
+ });
-In this example, the voice `es-ES-ElviraNeural` from Azure supports Spanish. Replace `es-ES-ElviraNeural` with any other voice ID that supports your desired language.
+ // Alternative: Google for multilingual support
+ const googleMultilingual = {
+ provider: "google",
+ model: "latest",
+ language: "multilingual"
+ };
+ ```
+
+
+ ```python
+ from vapi import Vapi
+ import os
+
+ client = Vapi(token=os.getenv("VAPI_API_KEY"))
+
+ # Recommended: Deepgram for multilingual support
+ assistant = client.assistants.create(
+ name="Multilingual Assistant",
+ transcriber={
+ "provider": "deepgram",
+ "model": "nova-2", # or "nova-3"
+ "language": "multi"
+ }
+ )
+
+ # Alternative: Google for multilingual support
+ google_multilingual = {
+ "provider": "google",
+ "model": "latest",
+ "language": "multilingual"
+ }
+ ```
+
+
+ ```bash
+ # Recommended: Deepgram for multilingual support
+ curl -X POST "https://api.vapi.ai/assistant" \
+ -H "Authorization: Bearer $VAPI_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "name": "Multilingual Assistant",
+ "transcriber": {
+ "provider": "deepgram",
+ "model": "nova-2",
+ "language": "multi"
+ }
+ }'
+
+ # Alternative: Google for multilingual support
+ curl -X POST "https://api.vapi.ai/assistant" \
+ -H "Authorization: Bearer $VAPI_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "transcriber": {
+ "provider": "google",
+ "model": "latest",
+ "language": "multilingual"
+ }
+ }'
+ ```
+
+
+
+
+**Provider Performance:** **Deepgram** offers the best balance of speed and multilingual accuracy. **Google** provides broader language support but may be slower. Both providers support automatic language detection within conversations.
+
+
+## Set up multilingual voices
+
+Configure your assistant to use appropriate voices for each detected language.
+
+
+
+ 1. In the **Voice** section of your assistant:
+ - **Provider**: Select `Azure` (best multilingual coverage)
+ - **Voice**: Choose `multilingual-auto` for automatic voice selection
+ 2. **Alternative**: Configure specific voices for each language:
+ - Select a primary voice (e.g., `en-US-AriaNeural`)
+ - Click **Add Fallback Voices**
+ - Add voices for other languages:
+ - Spanish: `es-ES-ElviraNeural`
+ - French: `fr-FR-DeniseNeural`
+ - German: `de-DE-KatjaNeural`
+ 3. Click **Save** to apply the voice configuration
+
+
+ ```typescript
+ // Option 1: Automatic voice selection (recommended)
+ const voice = {
+ provider: "azure",
+ voiceId: "multilingual-auto"
+ };
+
+ // Option 2: Specific voices with fallbacks
+ const voiceWithFallbacks = {
+ provider: "azure",
+ voiceId: "en-US-AriaNeural", // Primary voice
+ fallbackPlan: {
+ voices: [
+ { provider: "azure", voiceId: "es-ES-ElviraNeural" },
+ { provider: "azure", voiceId: "fr-FR-DeniseNeural" },
+ { provider: "azure", voiceId: "de-DE-KatjaNeural" }
+ ]
+ }
+ };
+
+ await vapi.assistants.update(assistantId, { voice });
+ ```
+
+
+ ```python
+ # Option 1: Automatic voice selection (recommended)
+ voice = {
+ "provider": "azure",
+ "voiceId": "multilingual-auto"
+ }
+
+ # Option 2: Specific voices with fallbacks
+ voice_with_fallbacks = {
+ "provider": "azure",
+ "voiceId": "en-US-AriaNeural", # Primary voice
+ "fallbackPlan": {
+ "voices": [
+ {"provider": "azure", "voiceId": "es-ES-ElviraNeural"},
+ {"provider": "azure", "voiceId": "fr-FR-DeniseNeural"},
+ {"provider": "azure", "voiceId": "de-DE-KatjaNeural"}
+ ]
+ }
+ }
+
+ client.assistants.update(assistant_id, voice=voice)
+ ```
+
+
+ ```bash
+ curl -X PATCH "https://api.vapi.ai/assistant/YOUR_ASSISTANT_ID" \
+ -H "Authorization: Bearer $VAPI_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "voice": {
+ "provider": "azure",
+ "voiceId": "multilingual-auto"
+ }
+ }'
+ ```
+
+
+
+
+**Voice Provider Support:** Unlike transcription, all major voice providers (Azure, ElevenLabs, OpenAI, etc.) support multiple languages. Azure offers the most comprehensive coverage with 400+ voices across 140+ languages.
+
+
+## Configure language-aware prompts
+
+Create system prompts that explicitly list supported languages and handle multiple languages gracefully.
+
+
+
+ 1. In the **Model** section, update your system prompt to explicitly list supported languages:
+ ```
+ You are a helpful assistant that can communicate in English, Spanish, and French.
+
+ Language Instructions:
+ - You can speak and understand: English, Spanish, and French
+ - Automatically detect and respond in the user's language
+ - Switch languages seamlessly when the user changes languages
+ - Maintain consistent personality across all languages
+ - Use culturally appropriate greetings and formality levels
+
+ If a user speaks a language other than English, Spanish, or French, politely explain that you only support these three languages and ask them to continue in one of them.
+ ```
+ 2. Click **Save** to apply the prompt changes
+
+
+ ```typescript
+ const systemPrompt = `You are a helpful assistant that can communicate in English, Spanish, and French.
+
+Language Instructions:
+- You can speak and understand: English, Spanish, and French
+- Automatically detect and respond in the user's language
+- Switch languages seamlessly when the user changes languages
+- Maintain consistent personality across all languages
+- Use culturally appropriate greetings and formality levels
+
+If a user speaks a language other than English, Spanish, or French, politely explain that you only support these three languages and ask them to continue in one of them.`;
+
+ const model = {
+ provider: "openai",
+ model: "gpt-4",
+ messages: [
+ {
+ role: "system",
+ content: systemPrompt
+ }
+ ]
+ };
+
+ await vapi.assistants.update(assistantId, { model });
+ ```
+
+
+ ```python
+ system_prompt = """You are a helpful assistant that can communicate in English, Spanish, and French.
+
+Language Instructions:
+- You can speak and understand: English, Spanish, and French
+- Automatically detect and respond in the user's language
+- Switch languages seamlessly when the user changes languages
+- Maintain consistent personality across all languages
+- Use culturally appropriate greetings and formality levels
+
+If a user speaks a language other than English, Spanish, or French, politely explain that you only support these three languages and ask them to continue in one of them."""
+
+ model = {
+ "provider": "openai",
+ "model": "gpt-4",
+ "messages": [
+ {
+ "role": "system",
+ "content": system_prompt
+ }
+ ]
+ }
+
+ client.assistants.update(assistant_id, model=model)
+ ```
+
+
+ ```bash
+ curl -X PATCH "https://api.vapi.ai/assistant/YOUR_ASSISTANT_ID" \
+ -H "Authorization: Bearer $VAPI_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "model": {
+ "provider": "openai",
+ "model": "gpt-4",
+ "messages": [
+ {
+ "role": "system",
+ "content": "You are a helpful assistant that can communicate in English, Spanish, and French..."
+ }
+ ]
+ }
+ }'
+ ```
+
+
+
+
+**Critical for Multilingual Success:** You must explicitly list the supported languages in your system prompt. Assistants struggle to understand they can speak multiple languages without this explicit instruction.
+
+
+## Add multilingual greetings
+
+Configure greeting messages that work across multiple languages.
+
+
+
+ 1. In the **First Message** field, enter a multilingual greeting:
+ ```
+ Hello! I can assist you in English, Spanish, or French. How can I help you today?
+ ```
+ 2. **Optional**: For more personalized greetings, use the **Advanced Message Configuration**:
+ - Enable **Language-Specific Messages**
+ - Add greetings for each target language
+ 3. Click **Save** to apply the greeting
+
+
+ ```typescript
+ // Simple multilingual greeting
+ const firstMessage = "Hello! I can assist you in English, Spanish, or French. How can I help you today?";
+
+ // Language-specific greetings (advanced)
+ const multilingualGreeting = {
+ contents: [
+ {
+ type: "text",
+ text: "Hello! How can I help you today?",
+ language: "en"
+ },
+ {
+ type: "text",
+ text: "¡Hola! ¿Cómo puedo ayudarte hoy?",
+ language: "es"
+ },
+ {
+ type: "text",
+ text: "Bonjour! Comment puis-je vous aider?",
+ language: "fr"
+ }
+ ]
+ };
+
+ await vapi.assistants.update(assistantId, { firstMessage });
+ ```
+
+
+ ```python
+ # Simple multilingual greeting
+ first_message = "Hello! I can assist you in English, Spanish, or French. How can I help you today?"
+
+ # Language-specific greetings (advanced)
+ multilingual_greeting = {
+ "contents": [
+ {
+ "type": "text",
+ "text": "Hello! How can I help you today?",
+ "language": "en"
+ },
+ {
+ "type": "text",
+ "text": "¡Hola! ¿Cómo puedo ayudarte hoy?",
+ "language": "es"
+ },
+ {
+ "type": "text",
+ "text": "Bonjour! Comment puis-je vous aider?",
+ "language": "fr"
+ }
+ ]
+ }
+
+ client.assistants.update(assistant_id, first_message=first_message)
+ ```
+
+
+ ```bash
+ curl -X PATCH "https://api.vapi.ai/assistant/YOUR_ASSISTANT_ID" \
+ -H "Authorization: Bearer $VAPI_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "firstMessage": "Hello! I can assist you in English, Spanish, or French. How can I help you today?"
+ }'
+ ```
+
+
+
+## Test your multilingual assistant
+
+Validate your configuration with different languages and scenarios.
+
+
+
+ 1. Use the **Test Assistant** feature in your dashboard
+ 2. Test these scenarios:
+ - Start conversations in different languages
+ - Switch languages mid-conversation
+ - Use mixed-language input
+ 3. Monitor the **Call Analytics** for:
+ - Language detection accuracy
+ - Voice quality consistency
+ - Response appropriateness
+ 4. Adjust configuration based on test results
+
+
+ ```typescript
+ // Create test call
+ const testCall = await vapi.calls.create({
+ assistantId: "your-multilingual-assistant-id",
+ customer: {
+ number: "+1234567890"
+ }
+ });
+
+ // Monitor call events
+ vapi.on('call-end', (event) => {
+ console.log('Language detection results:', event.transcript);
+ console.log('Call summary:', event.summary);
+ });
+ ```
+
+
+ ```python
+ # Create test call
+ test_call = client.calls.create(
+ assistant_id="your-multilingual-assistant-id",
+ customer={
+ "number": "+1234567890"
+ }
+ )
+
+ # Retrieve call details for analysis
+ call_details = client.calls.get(test_call.id)
+ print(f"Language detection: {call_details.transcript}")
+ ```
+
+
+ ```bash
+ # Create test call
+ curl -X POST "https://api.vapi.ai/call" \
+ -H "Authorization: Bearer $VAPI_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "assistantId": "your-multilingual-assistant-id",
+ "customer": {
+ "number": "+1234567890"
+ }
+ }'
+ ```
+
+
+
+## Provider capabilities (Accurate as of testing)
+
+### Speech Recognition (Transcription)
+
+| Provider | Multilingual Support | Languages | Notes |
+|----------|---------------------|-----------|-------|
+| **Deepgram** | ✅ Full auto-detection | 100+ | **Recommended**: Nova 2/Nova 3 with "Multi" language setting |
+| **Google STT** | ✅ Full auto-detection | 125+ | Latest models with "Multilingual" language setting |
+| **Assembly AI** | ❌ English only | English | No multilingual support |
+| **Azure STT** | ❌ Single language | 100+ | Many languages, but no auto-detection |
+| **OpenAI Whisper** | ❌ Single language | 90+ | Many languages, but no auto-detection |
+| **Gladia** | ❌ Single language | 80+ | Many languages, but no auto-detection |
+| **Speechmatics** | ❌ Single language | 50+ | Many languages, but no auto-detection |
+| **Talkscriber** | ❌ Single language | 40+ | Many languages, but no auto-detection |
+
+### Voice Synthesis (Text-to-Speech)
+
+| Provider | Languages | Multilingual Voice Selection | Best For |
+|----------|-----------|------------------------------|----------|
+| **Azure** | 140+ | ✅ Automatic | Maximum language coverage |
+| **ElevenLabs** | 30+ | ✅ Automatic | Premium voice quality |
+| **OpenAI TTS** | 50+ | ✅ Automatic | Consistent quality across languages |
+| **PlayHT** | 80+ | ✅ Automatic | Cost-effective scaling |
+
+## Common challenges and solutions
+
+
+
+ **Solutions:**
+ - Use Deepgram (Nova 2/Nova 3 with "Multi") or Google STT (with "Multilingual")
+ - Ensure high-quality audio input for better detection accuracy
+ - Test with native speakers of target languages
+ - Consider provider-specific language combinations for optimal results
+
+
+
+ **Solutions:**
+ - **Explicitly list all supported languages** in your system prompt
+ - Include language capabilities in the assistant's instructions
+ - Test the prompt with multilingual conversations
+ - Avoid generic "multilingual" statements without specifics
+
+
+
+ **Solutions:**
+ - Use Deepgram Nova 2/Nova 3 for optimal speed and multilingual support
+ - For Google STT, use latest models for better performance
+ - Consider the speed vs accuracy tradeoff for your use case
+ - Optimize audio quality and format to improve processing speed
+
+
+
+ **Solutions:**
+ - Test different voice providers for each language
+ - Use Azure for maximum language coverage
+ - Configure fallback voices as backup options
+ - Consider premium providers for key languages
+
+
+
+## Next steps
+
+Now that you have multilingual support configured:
+
+- **[Build a complete multilingual agent](../assistants/examples/multilingual-agent):** Follow our step-by-step implementation guide
+- **[Custom voices](custom-voices/custom-voice):** Set up region-specific custom voices
+- **[System prompting](../prompting-guide):** Design effective multilingual prompts
+- **[Call analysis](../call-analysis):** Monitor language performance and usage
diff --git a/fern/docs.yml b/fern/docs.yml
index f81b13a3..eabd90da 100644
--- a/fern/docs.yml
+++ b/fern/docs.yml
@@ -231,6 +231,9 @@ navigation:
- page: Documentation agent
path: assistants/examples/docs-agent.mdx
icon: fa-light fa-microphone
+ - page: Multilingual agent
+ path: assistants/examples/multilingual-agent.mdx
+ icon: fa-light fa-globe
- section: Workflows
contents:
@@ -255,6 +258,9 @@ navigation:
- page: Order management
path: workflows/examples/ecommerce-order-management.mdx
icon: fa-light fa-shopping-cart
+ - page: Multilingual support
+ path: workflows/examples/multilingual-support.mdx
+ icon: fa-light fa-globe
- section: Best practices
contents:
diff --git a/fern/guides.mdx b/fern/guides.mdx
index 50755620..7a03c784 100644
--- a/fern/guides.mdx
+++ b/fern/guides.mdx
@@ -41,6 +41,22 @@ slug: guides
Create an outbound sales agent that can schedule appointments automatically
+
+
+
+
+
Built with Workflows
+
+ Build a structured multilingual support workflow with language selection and dedicated conversation paths
+
+
+
+
+
+
Built with Assistants
+
+ Build a dynamic agent with automatic language detection and real-time language switching
+
diff --git a/fern/providers/model/openai.mdx b/fern/providers/model/openai.mdx
index 85f91c54..f0c2dc81 100644
--- a/fern/providers/model/openai.mdx
+++ b/fern/providers/model/openai.mdx
@@ -7,7 +7,7 @@ slug: providers/model/openai
**What is OpenAI?**
-OpenAI is a leading artificial intelligence research and deployment company dedicated to ensuring that artificial general intelligence (AGI) benefits all of humanity. Founded with the mission to create safe and highly capable AI systems, OpenAI has made significant strides in AI research, producing groundbreaking models like GPT-4, DALL-E, and Codex. These innovations have not only advanced the field of AI but also transformed various industries by providing powerful tools for natural language processing, image generation, and programming assistance.
+OpenAI is a leading artificial intelligence research and deployment company dedicated to ensuring that artificial general intelligence (AGI) benefits all of humanity. Founded with the mission to create safe and highly capable AI systems, OpenAI has made significant strides in AI research, producing groundbreaking models like GPT-4o, DALL-E, and Codex. These innovations have not only advanced the field of AI but also transformed various industries by providing powerful tools for natural language processing, image generation, and programming assistance.
**The Evolution of AI Research:**
@@ -19,7 +19,7 @@ OpenAI offers a range of AI-driven products and services designed to meet divers
**GPT Models:**
-- OpenAI’s Generative Pre-trained Transformer (GPT) models, including the latest GPT-4, are state-of-the-art in natural language processing. These models can generate human-like text, answer questions, summarize information, and perform various language tasks with high accuracy. GPT-4, in particular, represents a significant leap in AI capabilities, offering improved coherence, context understanding, and creativity.
+- OpenAI’s Generative Pre-trained Transformer (GPT) models, including the latest GPT-4o, are state-of-the-art in natural language processing. These models can generate human-like text, answer questions, summarize information, and perform various language tasks with high accuracy. GPT-4o, in particular, represents a significant leap in AI capabilities, offering improved coherence, context understanding, and creativity.
**DALL-E:**
diff --git a/fern/providers/voice/openai.mdx b/fern/providers/voice/openai.mdx
index 9822e6c4..12282fb2 100644
--- a/fern/providers/voice/openai.mdx
+++ b/fern/providers/voice/openai.mdx
@@ -7,7 +7,7 @@ slug: providers/voice/openai
**What is OpenAI?**
-OpenAI is a leading artificial intelligence research and deployment company dedicated to ensuring that artificial general intelligence (AGI) benefits all of humanity. Founded with the mission to create safe and highly capable AI systems, OpenAI has made significant strides in AI research, producing groundbreaking models like GPT-4, DALL-E, and Codex. These innovations have not only advanced the field of AI but also transformed various industries by providing powerful tools for natural language processing, image generation, and programming assistance.
+OpenAI is a leading artificial intelligence research and deployment company dedicated to ensuring that artificial general intelligence (AGI) benefits all of humanity. Founded with the mission to create safe and highly capable AI systems, OpenAI has made significant strides in AI research, producing groundbreaking models like GPT-4o, DALL-E, and Codex. These innovations have not only advanced the field of AI but also transformed various industries by providing powerful tools for natural language processing, image generation, and programming assistance.
**The Evolution of AI Research:**
@@ -19,7 +19,7 @@ OpenAI offers a range of AI-driven products and services designed to meet divers
**GPT Models:**
-- OpenAI’s Generative Pre-trained Transformer (GPT) models, including the latest GPT-4, are state-of-the-art in natural language processing. These models can generate human-like text, answer questions, summarize information, and perform various language tasks with high accuracy. GPT-4, in particular, represents a significant leap in AI capabilities, offering improved coherence, context understanding, and creativity.
+- OpenAI’s Generative Pre-trained Transformer (GPT) models, including the latest GPT-4o, are state-of-the-art in natural language processing. These models can generate human-like text, answer questions, summarize information, and perform various language tasks with high accuracy. GPT-4o, in particular, represents a significant leap in AI capabilities, offering improved coherence, context understanding, and creativity.
**DALL-E:**
diff --git a/fern/static/images/workflows/examples/multilingual-support.png b/fern/static/images/workflows/examples/multilingual-support.png
new file mode 100644
index 00000000..e4bec34f
Binary files /dev/null and b/fern/static/images/workflows/examples/multilingual-support.png differ
diff --git a/fern/static/spreadsheets/multilingual-support/customers.csv b/fern/static/spreadsheets/multilingual-support/customers.csv
new file mode 100644
index 00000000..94178c90
--- /dev/null
+++ b/fern/static/spreadsheets/multilingual-support/customers.csv
@@ -0,0 +1,16 @@
+customer_id,name,email,phone,preferred_language,region,account_status,support_tier
+C001,Sarah Johnson,sarah.johnson@email.com,+1-555-0101,english,north_america,active,premium
+C002,María González,maria.gonzalez@email.com,+34-600-123456,spanish,spain,active,standard
+C003,Jean Dubois,jean.dubois@email.com,+33-1-23456789,french,france,active,premium
+C004,Carlos Restrepo,carlos.restrepo@email.com,+52-55-12345678,spanish,mexico,active,standard
+C005,Emily Chen,emily.chen@email.com,+1-555-0102,english,north_america,active,enterprise
+C006,Sophie Martin,sophie.martin@email.com,+1-514-1234567,french,canada,active,premium
+C007,Antonio Silva,antonio.silva@email.com,+34-91-2345678,spanish,spain,inactive,standard
+C008,Michael Thompson,michael.thompson@email.com,+44-20-12345678,english,uk,active,standard
+C009,Luisa Fernández,luisa.fernandez@email.com,+57-1-3456789,spanish,colombia,active,premium
+C010,Pierre Leblanc,pierre.leblanc@email.com,+33-4-56789012,french,france,active,standard
+C011,Jennifer Davis,jennifer.davis@email.com,+1-555-0103,english,north_america,active,standard
+C012,Isabel Rodríguez,isabel.rodriguez@email.com,+52-33-45678901,spanish,mexico,suspended,standard
+C013,François Moreau,francois.moreau@email.com,+1-418-5678901,french,canada,active,enterprise
+C014,David Wilson,david.wilson@email.com,+1-555-0104,english,north_america,active,premium
+C015,Carmen López,carmen.lopez@email.com,+34-93-6789012,spanish,spain,active,standard
\ No newline at end of file
diff --git a/fern/static/spreadsheets/multilingual-support/products.csv b/fern/static/spreadsheets/multilingual-support/products.csv
new file mode 100644
index 00000000..24b96628
--- /dev/null
+++ b/fern/static/spreadsheets/multilingual-support/products.csv
@@ -0,0 +1,11 @@
+product_id,name_en,name_es,name_fr,category,price_usd,description_en,description_es,description_fr,availability
+P001,CloudSync Pro,CloudSync Pro,CloudSync Pro,cloud_storage,29.99,"Professional cloud storage with 1TB space and advanced sharing","Almacenamiento en la nube profesional con 1TB de espacio y compartición avanzada","Stockage cloud professionnel avec 1 To d'espace et partage avancé",available
+P002,SecureVPN Enterprise,VPN Segura Empresarial,VPN Sécurisé Entreprise,security,49.99,"Enterprise-grade VPN with global servers and 24/7 support","VPN de nivel empresarial con servidores globales y soporte 24/7","VPN de niveau entreprise avec serveurs mondiaux et support 24h/24",available
+P003,DataAnalytics Suite,Suite de Análisis de Datos,Suite d'Analyse de Données,analytics,99.99,"Complete data analytics platform with AI-powered insights","Plataforma completa de análisis de datos con insights impulsados por IA","Plateforme d'analyse de données complète avec des insights alimentés par l'IA",available
+P004,Mobile App Builder,Constructor de Apps Móviles,Constructeur d'Apps Mobiles,development,79.99,"No-code mobile app development platform","Plataforma de desarrollo de aplicaciones móviles sin código","Plateforme de développement d'applications mobiles sans code",available
+P005,Smart Backup Pro,Backup Inteligente Pro,Sauvegarde Intelligente Pro,backup,19.99,"Automated backup solution with intelligent scheduling","Solución de respaldo automatizada con programación inteligente","Solution de sauvegarde automatisée avec planification intelligente",available
+P006,Team Collaboration Hub,Centro de Colaboración,Hub de Collaboration,collaboration,39.99,"All-in-one team collaboration platform","Plataforma de colaboración en equipo todo-en-uno","Plateforme de collaboration d'équipe tout-en-un",available
+P007,AI Assistant Pro,Asistente IA Pro,Assistant IA Pro,ai,149.99,"Advanced AI assistant for business automation","Asistente de IA avanzado para automatización empresarial","Assistant IA avancé pour l'automatisation des entreprises",beta
+P008,Network Monitor,Monitor de Red,Moniteur Réseau,monitoring,59.99,"Real-time network monitoring and alerting","Monitoreo de red en tiempo real y alertas","Surveillance réseau en temps réel et alertes",available
+P009,Database Optimizer,Optimizador de Base de Datos,Optimiseur de Base de Données,database,89.99,"Database performance optimization tool","Herramienta de optimización de rendimiento de base de datos","Outil d'optimisation des performances de base de données",available
+P010,Code Review Assistant,Asistente de Revisión de Código,Assistant de Révision de Code,development,69.99,"Automated code review with quality insights","Revisión automatizada de código con insights de calidad","Révision automatisée du code avec des insights qualité",coming_soon
\ No newline at end of file
diff --git a/fern/static/spreadsheets/multilingual-support/support_articles.csv b/fern/static/spreadsheets/multilingual-support/support_articles.csv
new file mode 100644
index 00000000..33a778b0
--- /dev/null
+++ b/fern/static/spreadsheets/multilingual-support/support_articles.csv
@@ -0,0 +1,13 @@
+article_id,title_en,title_es,title_fr,category,language,content_summary_en,content_summary_es,content_summary_fr,tags
+A001,How to Reset Your Password,Cómo Restablecer tu Contraseña,Comment Réinitialiser votre Mot de Passe,account,all,"Step-by-step guide to reset your account password","Guía paso a paso para restablecer la contraseña de tu cuenta","Guide étape par étape pour réinitialiser le mot de passe de votre compte","password,reset,login,account"
+A002,CloudSync Setup Guide,Guía de Configuración CloudSync,Guide de Configuration CloudSync,cloud_storage,all,"Complete setup instructions for CloudSync Pro","Instrucciones completas de configuración para CloudSync Pro","Instructions de configuration complètes pour CloudSync Pro","cloudsync,setup,storage,sync"
+A003,VPN Connection Issues,Problemas de Conexión VPN,Problèmes de Connexion VPN,security,all,"Troubleshoot common VPN connection problems","Solucionar problemas comunes de conexión VPN","Dépanner les problèmes de connexion VPN courants","vpn,connection,troubleshooting,network"
+A004,Data Export Tutorial,Tutorial de Exportación de Datos,Tutoriel d'Exportation de Données,analytics,all,"How to export data from DataAnalytics Suite","Cómo exportar datos de la Suite de Análisis de Datos","Comment exporter des données de la Suite d'Analyse de Données","export,data,analytics,tutorial"
+A005,Mobile App Publishing,Publicación de Apps Móviles,Publication d'Applications Mobiles,development,all,"Guide to publish your mobile app","Guía para publicar tu aplicación móvil","Guide pour publier votre application mobile","mobile,app,publishing,development"
+A006,Backup Schedule Configuration,Configuración de Horario de Respaldo,Configuration de Planification de Sauvegarde,backup,all,"Set up automated backup schedules","Configurar horarios de respaldo automatizados","Configurer des planifications de sauvegarde automatisées","backup,schedule,automation,configuration"
+A007,Team Permissions Management,Gestión de Permisos de Equipo,Gestion des Permissions d'Équipe,collaboration,all,"Manage team member permissions and roles","Gestionar permisos y roles de miembros del equipo","Gérer les permissions et rôles des membres de l'équipe","team,permissions,roles,management"
+A008,Billing and Subscription Help,Ayuda de Facturación y Suscripción,Aide Facturation et Abonnement,billing,all,"Common billing questions and solutions","Preguntas comunes de facturación y soluciones","Questions de facturation courantes et solutions","billing,subscription,payment,invoice"
+A009,API Integration Guide,Guía de Integración API,Guide d'Intégration API,development,all,"How to integrate with GlobalTech APIs","Cómo integrar con las APIs de GlobalTech","Comment intégrer avec les API GlobalTech","api,integration,development,documentation"
+A010,Security Best Practices,Mejores Prácticas de Seguridad,Meilleures Pratiques de Sécurité,security,all,"Essential security guidelines for account protection","Pautas esenciales de seguridad para protección de cuenta","Directives de sécurité essentielles pour la protection de compte","security,best practices,protection,guidelines"
+A011,Performance Optimization,Optimización de Rendimiento,Optimisation des Performances,performance,all,"Tips to improve system performance","Consejos para mejorar el rendimiento del sistema","Conseils pour améliorer les performances du système","performance,optimization,speed,efficiency"
+A012,Troubleshooting Login Issues,Solución de Problemas de Inicio de Sesión,Dépannage des Problèmes de Connexion,account,all,"Fix common login and authentication problems","Solucionar problemas comunes de inicio de sesión y autenticación","Corriger les problèmes de connexion et d'authentification courants","login,authentication,troubleshooting,access"
\ No newline at end of file
diff --git a/fern/workflows/examples/multilingual-support.mdx b/fern/workflows/examples/multilingual-support.mdx
new file mode 100644
index 00000000..fc31642b
--- /dev/null
+++ b/fern/workflows/examples/multilingual-support.mdx
@@ -0,0 +1,945 @@
+---
+title: Multilingual support workflow
+subtitle: Build a structured multilingual customer support workflow with language selection and dedicated conversation paths for each language
+slug: workflows/examples/multilingual-support
+description: Build a multilingual voice AI customer support workflow with language selection, dedicated conversation nodes, and cultural context using Vapi's workflow builder.
+---
+
+## Overview
+
+Build a structured multilingual customer support workflow that guides customers through language selection at the start of the call, then routes them to dedicated conversation paths optimized for English, Spanish, and French support.
+
+**What You'll Build:**
+* Visual workflow with language selection and routing logic
+* Dedicated conversation nodes for each language with cultural context
+* Language-specific voice and prompt configurations
+* Multilingual knowledge base integration with customer data
+* 24/7 international phone support with optimal user experience
+
+## Prerequisites
+
+* A [Vapi account](https://dashboard.vapi.ai/).
+
+## Scenario
+
+We will be creating a multilingual support workflow for GlobalTech International, a technology company serving customers across North America, Europe, and Latin America. Instead of trying to detect language automatically, the workflow provides a clear language selection menu and routes customers to dedicated support paths optimized for each language and culture.
+
+## Final Workflow
+
+
+
+
+
+---
+
+## 1. Create a Multilingual Knowledge Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ In your Vapi dashboard, click `Files` in the left sidebar.
+
+
+ - Click `Choose file`. Upload all three CSV files: `customers.csv`, `products.csv`, and `support_articles.csv`.
+ - Note the file IDs. We'll need them later to create 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 files for multilingual workflow
+ 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 for multilingual workflow
+ 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 Workflow
+
+
+
+
+
+ Go to [dashboard.vapi.ai](https://dashboard.vapi.ai) and log in to your account.
+
+
+ Click `Workflows` in the left sidebar.
+
+
+ - Click `Create Workflow`.
+ - Enter workflow name: `GlobalTech Multilingual Support Workflow`.
+ - Select the default template (includes Call Start node).
+ - Click "Create Workflow".
+
+
+ - Set up workflow variables for customer language preference and support context
+ - Configure global settings for the multilingual workflow
+
+
+
+
+
+
+ ```typescript
+ import { VapiClient } from "@vapi-ai/server-sdk";
+
+ const vapi = new VapiClient({ token: "YOUR_VAPI_API_KEY" });
+
+ async function createMultilingualWorkflow() {
+ try {
+ // Create workflow with language selection node
+ const workflow = await vapi.workflows.create({
+ name: "GlobalTech Multilingual Support Workflow",
+ nodes: [
+ {
+ id: "language_selection",
+ type: "conversation",
+ firstMessage: "Hello! Hola! Bonjour! Welcome to GlobalTech International support. For English, say 'English' or 'one'. Para español, diga 'Español' o 'dos'. Pour français, dites 'Français' ou 'trois'.",
+ systemPrompt: "You are helping the customer select their preferred language. Listen for 'English', 'Español', 'Français', or numbers 1, 2, 3. Extract their language preference clearly.",
+ extractVariables: [
+ {
+ name: "preferred_language",
+ type: "string",
+ description: "Customer's preferred language choice",
+ enum: ["english", "spanish", "french"]
+ }
+ ]
+ }
+ ],
+ edges: []
+ });
+
+ console.log(`Multilingual workflow created with ID: ${workflow.id}`);
+ return workflow;
+ } catch (error) {
+ console.error('Error creating workflow:', error);
+ throw error;
+ }
+ }
+
+ // Create the multilingual workflow
+ const workflow = await createMultilingualWorkflow();
+ ```
+
+
+ ```python
+ import requests
+
+ def create_multilingual_workflow():
+ """Create a new multilingual support workflow"""
+ url = "https://api.vapi.ai/workflow"
+ headers = {
+ "Authorization": f"Bearer {YOUR_VAPI_API_KEY}",
+ "Content-Type": "application/json"
+ }
+
+ data = {
+ "name": "GlobalTech Multilingual Support Workflow",
+ "nodes": [
+ {
+ "id": "language_selection",
+ "type": "conversation",
+ "firstMessage": "Hello! Hola! Bonjour! Welcome to GlobalTech International support. For English, say 'English' or 'one'. Para español, diga 'Español' o 'dos'. Pour français, dites 'Français' ou 'trois'.",
+ "systemPrompt": "You are helping the customer select their preferred language. Listen for 'English', 'Español', 'Français', or numbers 1, 2, 3. Extract their language preference clearly.",
+ "extractVariables": [
+ {
+ "name": "preferred_language",
+ "type": "string",
+ "description": "Customer's preferred language choice",
+ "enum": ["english", "spanish", "french"]
+ }
+ ]
+ }
+ ],
+ "edges": []
+ }
+
+ try:
+ response = requests.post(url, headers=headers, json=data)
+ response.raise_for_status()
+ return response.json()
+ except requests.exceptions.RequestException as error:
+ print(f"Error creating workflow: {error}")
+ raise
+
+ # Create the multilingual workflow
+ workflow = create_multilingual_workflow()
+ print(f"Multilingual workflow created with ID: {workflow['id']}")
+ ```
+
+
+ ```bash
+ # Create the complete multilingual workflow with all conversation nodes
+ curl -X POST https://api.vapi.ai/workflow \
+ -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "name": "GlobalTech Multilingual Support Workflow",
+ "transcriber": {
+ "provider": "deepgram",
+ "model": "nova-2",
+ "language": "multi"
+ },
+ "voice": {
+ "provider": "azure",
+ "voiceId": "en-US-AriaNeural"
+ },
+ "globalPrompt": "GlobalTech International is a technology company specializing in workflow automation and productivity solutions. Always be helpful, professional, and solution-focused when assisting customers.",
+ "nodes": [
+ {
+ "name": "language_selection",
+ "type": "conversation",
+ "prompt": "You are helping the customer select their preferred language for support. Listen carefully for: English/one/1 to select english, Español/Spanish/dos/two/2 to select spanish, Français/French/trois/three/3 to select french. Extract their language preference clearly. If unclear, ask them to repeat their choice.",
+ "isStart": true,
+ "messagePlan": {
+ "firstMessage": "Hello! Hola! Bonjour! Welcome to GlobalTech International support. For English, say English or one. Para español, diga Español o dos. Pour français, dites Français ou trois."
+ },
+ "variableExtractionPlan": {
+ "output": [
+ {
+ "type": "string",
+ "title": "preferred_language",
+ "description": "Customer preferred language choice",
+ "enum": ["english", "spanish", "french"]
+ }
+ ]
+ }
+ },
+ {
+ "name": "english_support",
+ "type": "conversation",
+ "voice": {
+ "provider": "azure",
+ "voiceId": "en-US-AriaNeural"
+ },
+ "prompt": "You are Maria, GlobalTech English customer support representative. TONE: Direct, friendly, professional. Conversational but efficient. Solution-focused, provide clear steps. CAPABILITIES: Product information and recommendations, Account support, Technical troubleshooting and guidance, Transfer to specialized teams when needed. Keep responses concise under 40 words while being thorough and helpful.",
+ "messagePlan": {
+ "firstMessage": "Perfect! I am Maria, your English support representative. I am here to help you with any questions about GlobalTech products, account issues, or technical support. How can I assist you today?"
+ }
+ },
+ {
+ "name": "spanish_support",
+ "type": "conversation",
+ "voice": {
+ "provider": "azure",
+ "voiceId": "es-ES-ElviraNeural"
+ },
+ "prompt": "Eres María, representante de soporte al cliente de GlobalTech en español. TONO: Cálido, respetuoso y paciente. Usa usted formalmente al principio, luego adapta según la preferencia del cliente. Toma tiempo para crear rapport, sé completa en las explicaciones. CAPACIDADES: Información y recomendaciones de productos, Soporte de cuenta, Solución de problemas técnicos y orientación, Transferir a equipos especializados cuando sea necesario. Mantén las respuestas concisas menos de 40 palabras mientras eres completa y útil.",
+ "messagePlan": {
+ "firstMessage": "¡Perfecto! Soy María, su representante de soporte en español. Estoy aquí para ayudarle con cualquier pregunta sobre los productos de GlobalTech, problemas de cuenta o soporte técnico. ¿Cómo puedo asistirle hoy?"
+ }
+ },
+ {
+ "name": "french_support",
+ "type": "conversation",
+ "voice": {
+ "provider": "azure",
+ "voiceId": "fr-FR-DeniseNeural"
+ },
+ "prompt": "Vous êtes Maria, représentante du support client GlobalTech en français. TON: Poli, courtois et professionnel. Utilisez les conventions de salutation appropriées. Réponses structurées, respectueux de la formalité. CAPACITÉS: Informations et recommandations sur les produits, Support de compte, Dépannage technique et orientation, Transfert vers des équipes spécialisées si nécessaire. Gardez les réponses concises moins de 40 mots tout en étant complète et utile.",
+ "messagePlan": {
+ "firstMessage": "Parfait! Je suis Maria, votre représentante du support en français. Je suis là pour vous aider avec toutes vos questions concernant les produits GlobalTech, les problèmes de compte ou le support technique. Comment puis-je vous aider aujourd hui?"
+ }
+ }
+ ],
+ "edges": [
+ {
+ "from": "language_selection",
+ "to": "english_support",
+ "condition": {
+ "type": "ai",
+ "prompt": "Customer selected English language support"
+ }
+ },
+ {
+ "from": "language_selection",
+ "to": "spanish_support",
+ "condition": {
+ "type": "ai",
+ "prompt": "Customer selected Spanish language support"
+ }
+ },
+ {
+ "from": "language_selection",
+ "to": "french_support",
+ "condition": {
+ "type": "ai",
+ "prompt": "Customer selected French language support"
+ }
+ }
+ ]
+ }'
+ ```
+
+
+
+
+**Complete Workflow JSON**: You can download the complete workflow configuration as a JSON file and use it with any HTTP client or save it for version control:
+
+```bash
+# Save the workflow JSON to a file
+cat > multilingual_workflow.json << 'EOF'
+{
+ "name": "GlobalTech Multilingual Support Workflow",
+ "transcriber": {
+ "provider": "deepgram",
+ "model": "nova-2",
+ "language": "multi"
+ },
+ "voice": {
+ "provider": "azure",
+ "voiceId": "en-US-AriaNeural"
+ },
+ "globalPrompt": "GlobalTech International is a technology company specializing in workflow automation and productivity solutions. Always be helpful, professional, and solution-focused when assisting customers.",
+ "nodes": [
+ {
+ "name": "language_selection",
+ "type": "conversation",
+ "prompt": "You are helping the customer select their preferred language for support. Listen carefully for: English/one/1 to select english, Español/Spanish/dos/two/2 to select spanish, Français/French/trois/three/3 to select french. Extract their language preference clearly. If unclear, ask them to repeat their choice.",
+ "isStart": true,
+ "messagePlan": {
+ "firstMessage": "Hello! Hola! Bonjour! Welcome to GlobalTech International support. For English, say English or one. Para español, diga Español o dos. Pour français, dites Français ou trois."
+ },
+ "variableExtractionPlan": {
+ "output": [
+ {
+ "type": "string",
+ "title": "preferred_language",
+ "description": "Customer preferred language choice",
+ "enum": ["english", "spanish", "french"]
+ }
+ ]
+ }
+ },
+ {
+ "name": "english_support",
+ "type": "conversation",
+ "voice": {
+ "provider": "azure",
+ "voiceId": "en-US-AriaNeural"
+ },
+ "prompt": "You are Maria, GlobalTech English customer support representative. TONE: Direct, friendly, professional. Conversational but efficient. Solution-focused, provide clear steps. CAPABILITIES: Product information and recommendations, Account support, Technical troubleshooting and guidance, Transfer to specialized teams when needed. Keep responses concise under 40 words while being thorough and helpful.",
+ "messagePlan": {
+ "firstMessage": "Perfect! I am Maria, your English support representative. I am here to help you with any questions about GlobalTech products, account issues, or technical support. How can I assist you today?"
+ }
+ },
+ {
+ "name": "spanish_support",
+ "type": "conversation",
+ "voice": {
+ "provider": "azure",
+ "voiceId": "es-ES-ElviraNeural"
+ },
+ "prompt": "Eres María, representante de soporte al cliente de GlobalTech en español. TONO: Cálido, respetuoso y paciente. Usa usted formalmente al principio, luego adapta según la preferencia del cliente. Toma tiempo para crear rapport, sé completa en las explicaciones. CAPACIDADES: Información y recomendaciones de productos, Soporte de cuenta, Solución de problemas técnicos y orientación, Transferir a equipos especializados cuando sea necesario. Mantén las respuestas concisas menos de 40 palabras mientras eres completa y útil.",
+ "messagePlan": {
+ "firstMessage": "¡Perfecto! Soy María, su representante de soporte en español. Estoy aquí para ayudarle con cualquier pregunta sobre los productos de GlobalTech, problemas de cuenta o soporte técnico. ¿Cómo puedo asistirle hoy?"
+ }
+ },
+ {
+ "name": "french_support",
+ "type": "conversation",
+ "voice": {
+ "provider": "azure",
+ "voiceId": "fr-FR-DeniseNeural"
+ },
+ "prompt": "Vous êtes Maria, représentante du support client GlobalTech en français. TON: Poli, courtois et professionnel. Utilisez les conventions de salutation appropriées. Réponses structurées, respectueux de la formalité. CAPACITÉS: Informations et recommandations sur les produits, Support de compte, Dépannage technique et orientation, Transfert vers des équipes spécialisées si nécessaire. Gardez les réponses concises moins de 40 mots tout en étant complète et utile.",
+ "messagePlan": {
+ "firstMessage": "Parfait! Je suis Maria, votre représentante du support en français. Je suis là pour vous aider avec toutes vos questions concernant les produits GlobalTech, les problèmes de compte ou le support technique. Comment puis-je vous aider aujourd hui?"
+ }
+ }
+ ],
+ "edges": [
+ {
+ "from": "language_selection",
+ "to": "english_support",
+ "condition": {
+ "type": "ai",
+ "prompt": "Customer selected English language support"
+ }
+ },
+ {
+ "from": "language_selection",
+ "to": "spanish_support",
+ "condition": {
+ "type": "ai",
+ "prompt": "Customer selected Spanish language support"
+ }
+ },
+ {
+ "from": "language_selection",
+ "to": "french_support",
+ "condition": {
+ "type": "ai",
+ "prompt": "Customer selected French language support"
+ }
+ }
+ ]
+}
+EOF
+
+# Then create the workflow using the JSON file
+curl -X POST https://api.vapi.ai/workflow \
+ -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d @multilingual_workflow.json
+```
+
+
+---
+
+## 3. Build the Multilingual Workflow
+
+You'll start with a language selection node and then create dedicated conversation paths for each language with appropriate cultural context and voices.
+
+
+
+ The workflow starts with a language selection node. Click on it and configure:
+
+ ```txt title="First Message"
+ Hello! Hola! Bonjour! Welcome to GlobalTech International support. For English, say 'English' or 'one'. Para español, diga 'Español' o 'dos'. Pour français, dites 'Français' ou 'trois'.
+ ```
+
+ ```txt title="Prompt"
+ You are helping the customer select their preferred language for support.
+
+ Listen carefully for:
+ - "English" or "one" or "1" → english
+ - "Español" or "Spanish" or "dos" or "two" or "2" → spanish
+ - "Français" or "French" or "trois" or "three" or "3" → french
+
+ Extract their language preference clearly. If unclear, ask them to repeat their choice.
+ ```
+
+ **Extract Variables**:
+ - Variable: `preferred_language`
+ - Type: `String`
+ - Description: `Customer's preferred language choice`
+ - Enum Values: `english`, `spanish`, `french`
+
+
+
+ Click the + button and add a new **Conversation** node:
+
+ ```txt title="Condition"
+ preferred_language == "english"
+ ```
+
+ ```txt title="First Message"
+ Perfect! I'm Maria, your English support representative. I'm here to help you with any questions about GlobalTech products, account issues, or technical support. How can I assist you today?
+ ```
+
+ ```txt title="Prompt"
+ You are Maria, GlobalTech's English customer support representative.
+
+ TONE & STYLE:
+ - Direct, friendly, and professional
+ - Conversational but efficient
+ - Solution-focused, provide clear steps
+
+ CAPABILITIES:
+ - Product information and recommendations
+ - Account support (billing, subscriptions, access)
+ - Technical troubleshooting and guidance
+ - Transfer to specialized teams when needed
+
+ Keep responses concise (under 40 words) while being thorough and helpful.
+ Use tools to look up customer information and provide accurate support.
+ ```
+
+ **Voice Configuration**:
+ - Provider: `Azure`
+ - Voice: `en-US-AriaNeural`
+
+ **Extract Variables**:
+ - Variable: `customer_inquiry_type`
+ - Type: `String`
+ - Description: `Type of support needed`
+ - Enum Values: `product_info`, `account_support`, `technical_help`, `billing_question`
+
+
+
+ Add another **Conversation** node:
+
+ ```txt title="Condition"
+ preferred_language == "spanish"
+ ```
+
+ ```txt title="First Message"
+ ¡Perfecto! Soy María, su representante de soporte en español. Estoy aquí para ayudarle con cualquier pregunta sobre los productos de GlobalTech, problemas de cuenta o soporte técnico. ¿Cómo puedo asistirle hoy?
+ ```
+
+ ```txt title="Prompt"
+ Eres María, representante de soporte al cliente de GlobalTech en español.
+
+ TONO Y ESTILO:
+ - Cálido, respetuoso y paciente
+ - Usa "usted" formalmente al principio, luego adapta según la preferencia del cliente
+ - Toma tiempo para crear rapport, sé completa en las explicaciones
+
+ CAPACIDADES:
+ - Información y recomendaciones de productos
+ - Soporte de cuenta (facturación, suscripciones, acceso)
+ - Solución de problemas técnicos y orientación
+ - Transferir a equipos especializados cuando sea necesario
+
+ Mantén las respuestas concisas (menos de 40 palabras) mientras eres completa y útil.
+ Usa las herramientas para buscar información del cliente y brindar soporte preciso.
+ ```
+
+ **Voice Configuration**:
+ - Provider: `Azure`
+ - Voice: `es-ES-ElviraNeural` (or `es-MX-DaliaNeural` for Mexican Spanish)
+
+ **Extract Variables**:
+ - Variable: `customer_inquiry_type`
+ - Type: `String`
+ - Description: `Tipo de soporte necesario`
+ - Enum Values: `informacion_producto`, `soporte_cuenta`, `ayuda_tecnica`, `pregunta_facturacion`
+
+
+
+ Add another **Conversation** node:
+
+ ```txt title="Condition"
+ preferred_language == "french"
+ ```
+
+ ```txt title="First Message"
+ Parfait! Je suis Maria, votre représentante du support en français. Je suis là pour vous aider avec toutes vos questions concernant les produits GlobalTech, les problèmes de compte ou le support technique. Comment puis-je vous aider aujourd'hui?
+ ```
+
+ ```txt title="Prompt"
+ Vous êtes Maria, représentante du support client GlobalTech en français.
+
+ TON ET STYLE:
+ - Poli, courtois et professionnel
+ - Utilisez les conventions de salutation appropriées ("Bonjour/Bonsoir")
+ - Réponses structurées, respectueux de la formalité
+
+ CAPACITÉS:
+ - Informations et recommandations sur les produits
+ - Support de compte (facturation, abonnements, accès)
+ - Dépannage technique et orientation
+ - Transfert vers des équipes spécialisées si nécessaire
+
+ Gardez les réponses concises (moins de 40 mots) tout en étant complète et utile.
+ Utilisez les outils pour rechercher les informations client et fournir un support précis.
+ ```
+
+ **Voice Configuration**:
+ - Provider: `Azure`
+ - Voice: `fr-FR-DeniseNeural` (or `fr-CA-SylvieNeural` for Canadian French)
+
+ **Extract Variables**:
+ - Variable: `customer_inquiry_type`
+ - Type: `String`
+ - Description: `Type de support nécessaire`
+ - Enum Values: `info_produit`, `support_compte`, `aide_technique`, `question_facturation`
+
+
+
+ For each language path, add a **Tool** node to look up customer information:
+
+ **English Customer Lookup**:
+ ```txt title="Condition"
+ preferred_language == "english" AND customer_inquiry_type identified
+ ```
+
+ **Tool**: Select your pre-configured `lookup_customer` tool
+
+ **Follow-up Conversation Node**:
+ ```txt title="First Message"
+ I found your account information. Let me help you with your [inquiry_type]. What specific issue are you experiencing?
+ ```
+
+ **Spanish Customer Lookup**:
+ ```txt title="Condition"
+ preferred_language == "spanish" AND customer_inquiry_type identified
+ ```
+
+ **Tool**: Select your pre-configured `lookup_customer` tool
+
+ **Follow-up Conversation Node**:
+ ```txt title="First Message"
+ Encontré la información de su cuenta. Permíteme ayudarle con su [inquiry_type]. ¿Qué problema específico está experimentando?
+ ```
+
+ **French Customer Lookup**:
+ ```txt title="Condition"
+ preferred_language == "french" AND customer_inquiry_type identified
+ ```
+
+ **Tool**: Select your pre-configured `lookup_customer` tool
+
+ **Follow-up Conversation Node**:
+ ```txt title="First Message"
+ J'ai trouvé les informations de votre compte. Laissez-moi vous aider avec votre [inquiry_type]. Quel problème spécifique rencontrez-vous?
+ ```
+
+
+
+ Create specialized flows for different inquiry types in each language:
+
+ **Product Information Flow** (for each language):
+ - **Tool Node**: Use `get_product_info` tool
+ - **Conversation Node**: Present product information in customer's language
+ - **Follow-up**: Ask if they need additional assistance
+
+ **Technical Support Flow** (for each language):
+ - **Tool Node**: Use `search_support_articles` tool
+ - **Conversation Node**: Guide through troubleshooting in customer's language
+ - **Follow-up**: Verify issue resolution or escalate if needed
+
+ **Account Support Flow** (for each language):
+ - **Conversation Node**: Collect account details in customer's language
+ - **Tool Node**: Look up account information
+ - **Conversation Node**: Resolve account issues or transfer to billing team
+
+
+
+ **Transfer to Human Agent** (language-specific):
+
+ **English Transfer**:
+ ```txt title="Condition"
+ Issue requires human assistance
+ ```
+ **Node Type**: `Transfer Call`
+ **First Message**: `I'm connecting you to one of our English-speaking specialists who can better assist you. Please hold for just a moment.`
+ **Phone**: `+1-555-SUPPORT`
+
+ **Spanish Transfer**:
+ ```txt title="Condition"
+ Issue requires human assistance AND preferred_language == "spanish"
+ ```
+ **Node Type**: `Transfer Call`
+ **First Message**: `Le estoy conectando con uno de nuestros especialistas de habla hispana que puede ayudarle mejor. Por favor, manténgase en línea por un momento.`
+ **Phone**: `+1-555-SOPORTE`
+
+ **French Transfer**:
+ ```txt title="Condition"
+ Issue requires human assistance AND preferred_language == "french"
+ ```
+ **Node Type**: `Transfer Call`
+ **First Message**: `Je vous mets en relation avec l'un de nos spécialistes francophones qui pourra mieux vous aider. Veuillez patienter un instant.`
+ **Phone**: `+1-555-SOUTIEN`
+
+ **End Call Node** (language-specific):
+
+ **English**: `Thank you for contacting GlobalTech International. Have a great day!`
+ **Spanish**: `Gracias por contactar a GlobalTech International. ¡Que tenga un excelente día!`
+ **French**: `Merci d'avoir contacté GlobalTech International. Passez une excellente journée!`
+
+
+
+---
+
+## 4. Configure Phone Number
+
+
+
+
+
+ Click `Phone Numbers` in the left sidebar of your dashboard.
+
+
+ - Click `Create Phone Number` for a new Vapi number, or
+ - Click `Import Phone Number` to use your existing number from Twilio/Telnyx
+
+
+ **Workflow**: Select your `GlobalTech Multilingual Support Workflow`
+
+ **Advanced Settings**:
+ - Enable call recording for quality assurance
+ - Set maximum call duration (e.g., 20 minutes)
+ - Configure voicemail detection if needed
+
+
+ Call your Vapi phone number to test the complete workflow:
+ - Test language selection with different inputs
+ - Verify each language path works correctly
+ - Test customer lookup and support tools
+ - Ensure transfers work for each language
+
+
+
+
+ ```typescript
+ import { VapiClient } from "@vapi-ai/server-sdk";
+
+ const vapi = new VapiClient({ token: "YOUR_VAPI_API_KEY" });
+
+ async function createMultilingualPhoneNumber(workflowId: string) {
+ try {
+ // Create phone number for multilingual workflow
+ const phoneNumber = await vapi.phoneNumbers.create({
+ name: "GlobalTech International Support Line",
+ workflowId: workflowId,
+ inboundSettings: {
+ maxCallDurationMinutes: 20,
+ recordingEnabled: true,
+ voicemailDetectionEnabled: true
+ }
+ });
+
+ console.log(`Multilingual support phone number created: ${phoneNumber.number}`);
+ return phoneNumber;
+ } catch (error) {
+ console.error('Error creating phone number:', error);
+ throw error;
+ }
+ }
+
+ async function testMultilingualWorkflow(workflowId: string, testNumber: string) {
+ try {
+ // Test the multilingual workflow with an outbound call
+ const call = await vapi.calls.create({
+ workflowId: workflowId,
+ customer: {
+ number: testNumber
+ }
+ });
+
+ console.log(`Multilingual workflow test call created: ${call.id}`);
+ return call;
+ } catch (error) {
+ console.error('Error testing workflow:', error);
+ throw error;
+ }
+ }
+
+ // Create phone number and test workflow
+ const phoneNumber = await createMultilingualPhoneNumber('YOUR_WORKFLOW_ID');
+ const testCall = await testMultilingualWorkflow('YOUR_WORKFLOW_ID', '+1234567890');
+ ```
+
+
+ ```python
+ import requests
+
+ def create_multilingual_phone_number(workflow_id):
+ """Create phone number for multilingual workflow"""
+ url = "https://api.vapi.ai/phone-number"
+ headers = {
+ "Authorization": f"Bearer {YOUR_VAPI_API_KEY}",
+ "Content-Type": "application/json"
+ }
+
+ data = {
+ "name": "GlobalTech International Support Line",
+ "workflowId": workflow_id,
+ "inboundSettings": {
+ "maxCallDurationMinutes": 20,
+ "recordingEnabled": True,
+ "voicemailDetectionEnabled": True
+ }
+ }
+
+ try:
+ response = requests.post(url, headers=headers, json=data)
+ response.raise_for_status()
+ return response.json()
+ except requests.exceptions.RequestException as error:
+ print(f"Error creating phone number: {error}")
+ raise
+
+ def test_multilingual_workflow(workflow_id, test_number):
+ """Test multilingual workflow with outbound call"""
+ url = "https://api.vapi.ai/call"
+ headers = {
+ "Authorization": f"Bearer {YOUR_VAPI_API_KEY}",
+ "Content-Type": "application/json"
+ }
+
+ data = {
+ "workflowId": workflow_id,
+ "customer": {
+ "number": test_number
+ }
+ }
+
+ try:
+ response = requests.post(url, headers=headers, json=data)
+ response.raise_for_status()
+ return response.json()
+ except requests.exceptions.RequestException as error:
+ print(f"Error testing workflow: {error}")
+ raise
+
+ # Create phone number and test
+ phone_number = create_multilingual_phone_number('YOUR_WORKFLOW_ID')
+ test_call = test_multilingual_workflow('YOUR_WORKFLOW_ID', '+1234567890')
+
+ print(f"Phone number: {phone_number['number']}")
+ print(f"Test call ID: {test_call['id']}")
+ ```
+
+
+ ```bash
+ # Create phone number with workflow
+ 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 Line",
+ "workflowId": "YOUR_WORKFLOW_ID",
+ "inboundSettings": {
+ "maxCallDurationMinutes": 20,
+ "recordingEnabled": true,
+ "voicemailDetectionEnabled": true
+ }
+ }'
+
+ # Test the workflow with an outbound call
+ curl -X POST https://api.vapi.ai/call \
+ -H "Authorization: Bearer YOUR_VAPI_API_KEY" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "workflowId": "YOUR_WORKFLOW_ID",
+ "customer": {
+ "number": "+1234567890"
+ }
+ }'
+ ```
+
+
+
+## Benefits of Workflow-Based Multilingual Support
+
+### **Structured Language Selection**
+- **Clear menu**: Customers explicitly choose their language
+- **No guesswork**: Eliminates language detection errors
+- **Better UX**: Customers know exactly what to expect
+
+### **Optimized Conversation Paths**
+- **Dedicated nodes**: Each language has its own conversation flow
+- **Cultural context**: Language-specific tone and formality levels
+- **Native voices**: Optimal voice selection for each language
+
+### **Easier Maintenance**
+- **Separate logic**: Independent conversation flows for each language
+- **Clear analytics**: Track usage and success by language
+- **Scalable**: Easy to add new languages without affecting existing flows
+
+### **Enhanced Performance**
+- **No real-time detection**: Faster response times
+- **Optimized prompts**: Language-specific system prompts
+- **Better accuracy**: Eliminates language switching confusion
+
+
+**Alternative Approach**: For automatic language detection during conversation, see our [Assistant-based multilingual agent](../../assistants/examples/multilingual-agent) that detects and switches languages dynamically within a single conversation flow.
+
+
+## Next Steps
+
+Just like that, you've built a structured multilingual support workflow that provides clear language selection and optimal conversation paths for each language.
+
+Consider reading the following guides to further enhance your workflow:
+
+* [**Assistant-based Multilingual Agent**](../../assistants/examples/multilingual-agent) - Compare with automatic language detection approach
+* [**Custom Tools**](../../tools/custom-tools) - Create advanced multilingual tools and integrations
+* [**Advanced Workflows**](../overview) - Learn about complex workflow patterns and conditional logic
+
+
+Need help with multilingual workflows? Chat with the team on our [Discord](https://discord.com/invite/pUFNcf2WmH) or mention us on [X/Twitter](https://x.com/Vapi_AI).
+
\ No newline at end of file