https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hi , I'm new here
# ❓・ai-evy-support
a
Hi @AI Evy , I'm new here. I just start to use RetellAI for business purposes. I have created Agent with simple form. and got agent_id and api_key. how to test wheater is works or not. I have trid many time, and it always got error. sample curl curl -X POST https://api.retellai.com/v2/create-phone-call -H "Authorization: Bearer key_8eb100896edecfea061xxxxxxxxx" -H "Content-Type: application/json" -d '{ "to_number": "+62816712xxx", "from_number": "+62816712xxx", "agent_id": "agent_30992720c1b23f789bxxxxxxxx", "user_id": "Tester", "metadata": {"service_requested":"Roof Repair"} }'
a
Thanks for tagging me @adekurniawan44_59865. I'll look through relevant sources and get back to you shortly.
### Answer I can see a few issues with your curl request. Looking at the Create Phone Call API documentation, here are the corrections needed: 1. Required Parameters Issue: Your curl uses
agent_id
in the body, but the API expects
override_agent_id
[(1) ]() . The
from_number
must be a number you own in Retell (purchased from Retell or imported to Retell) . 2. Invalid Parameters: The parameter
user_id
doesn't exist in the Create Phone Call API . Remove it from your request. 3. Correct Format: Here's the proper JavaScript SDK example from the documentation:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneCallResponse = await client.call.createPhoneCall({
 from_number: '+14157774444',
 to_number: '+12137774445',
}) ;
console.log(phoneCallResponse.agent_id) ;
4. Required Body Parameters: The API requires
from_number
and
to_number
as required parameters . Optional parameters include
override_agent_id
,
metadata
, and
retell_llm_dynamic_variables
. 5. Phone Number Requirements: The
from_number
must be a number purchased from Retell or imported to Retell . If using a number purchased from Retell, only US numbers are supported as destination . Your corrected curl should look like:
Copy code
bash
curl -X POST <https://api.retellai.com/v2/create-phone-call> \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "from_number": "+your_retell_number",
  "to_number": "+62816712xxx",
  "override_agent_id": "agent_30992720c1b23f789bxxxxxxxx",
  "metadata": {"service_requested":"Roof Repair"}
}'
Make sure your
from_number
is a valid Retell phone number you own.
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
HI @AI Evy i got his error zsh: no such file or directory: https://api.retellai.com/v2/create-phone-call
a
Thanks for the follow-up, @adekurniawan44_59865. I'll get back to you soon.
### Answer The error "zsh: no such file or directory" indicates that your curl command has formatting issues. The URL is being interpreted as a file path instead of a web URL. Here's the correct curl format based on the Create Phone Call API documentation [(1) ]() :
Copy code
bash
curl -X POST <https://api.retellai.com/v2/create-phone-call> \
  -H "Authorization: Bearer YOUR_RETELL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from_number": "+14157774444",
    "to_number": "+12137774445",
    "override_agent_id": "your_agent_id"
  }'
Common fixes for this error: 1. Use backslashes for line continuation - Each line except the last needs a
\
at the end 2. Ensure proper spacing - No spaces after the backslashes 3. Quote the JSON properly - Use single quotes around the JSON data Required parameters from the API documentation: - `from_number`: Must be a number you own in Retell (E.164 format) - `to_number`: The number to call (E.164 format) - `override_agent_id`: Your agent ID (optional override) Make sure your
from_number
is a valid Retell phone number you purchased or imported, as the API requires this .
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
i wanna use in one line @AI Evy
a
Thanks for the follow-up, @adekurniawan44_59865. I'll get back to you soon.
### Answer For a one-line curl command to create a phone call, here's the correct format based on the Create Phone Call API documentation [(1) ]() :
Copy code
bash
curl -X POST <https://api.retellai.com/v2/create-phone-call> -H "Authorization: Bearer YOUR_RETELL_API_KEY" -H "Content-Type: application/json" -d '{"from_number": "+14157774444", "to_number": "+12137774445", "override_agent_id": "your_agent_id"}'
Key requirements from the API documentation: - `from_number`: Must be a number you own in Retell (E.164 format) - `to_number`: The number you want to call (E.164 format) - `override_agent_id`: Your agent ID (optional parameter) Make sure to replace: -
YOUR_RETELL_API_KEY
with your actual API key -
+14157774444
with your Retell phone number -
+12137774445
with the destination number -
your_agent_id
with your actual agent ID The
from_number
must be a number purchased from Retell or imported to Retell .
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
the error is the same zsh: no such file or directory: https://api.retellai.com/v2/create-phone-call
@AI Evy zsh: no such file or directory: https://api.retellai.com/v2/create-phone-call
a
Thanks for the follow-up, @adekurniawan44_59865. I'll get back to you soon.
### Answer The "zsh: no such file or directory" error means your terminal is interpreting the URL as a file path. This happens when there are invisible characters or formatting issues in your command. Try copying and pasting this exact one-line command [(1) ]() :
Copy code
bash
curl -X POST "<https://api.retellai.com/v2/create-phone-call%22> -H "Authorization: Bearer YOUR_RETELL_API_KEY" -H "Content-Type: application/json" -d '{"from_number": "+14157774444", "to_number": "+12137774445", "override_agent_id": "your_agent_id"}'
Key fixes: 1. Quote the URL - Put quotes around the entire URL:
Copy code
"<https://api.retellai.com/v2/create-phone-call%22%60> 
2. **No invisible characters** - Type the command fresh instead of copying from previous attempts
3. **Proper JSON formatting** - Ensure the JSON in
-d` is properly quoted Required parameters from the API: - `from_number`: Must be a number you own in Retell (E.164 format) - `to_number`: The number you want to call (E.164 format) - `override_agent_id`: Your agent ID (optional parameter) Make sure your
from_number
is a valid Retell phone number you purchased or imported .
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
Hi @AI Evy , it still got error curl -X POST https://api.retellai.com/v2/create-phone-call -H "Authorization: Bearer key_8eb100896edecfea0619f336dXXX" -H "Content-Type: application/json" -d '{ "from_number": "+628167124XX", "to_number": "+628167124XX", "override_agent_id": "agent_30992720c1b23f789b96942XXX" }' {"status":"error","message":"Not Found"}%
a
Thanks for the follow-up, @adekurniawan44_59865. I'll get back to you soon.
### Answer The "Not Found" error you're receiving is likely because your
from_number
isn't a valid Retell phone number. According to the Create Phone Call API documentation, the
from_number
must be a number you own in E.164 format and must be a number purchased from Retell or imported to Retell [(1) ]() . Your current
from_number
"+628167124XX" appears to be an Indonesian number, but the documentation states that if using a number purchased from Retell, only US numbers are supported as destination . To resolve this issue, you need to: 1. Get a Retell phone number first - You can create one using the Create Phone Number API [(2) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
 response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
 voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
[(3) ]() Or purchase a phone number with the required parameters including
area_code
(currently only supports US area codes) [(2) ]() . 2. Use the correct from_number - Replace your Indonesian number with a valid Retell phone number in your curl command. The Create Phone Call API requires that the
from_number
parameter be a number you own in E.164 format, and it must be a number purchased from Retell or imported to Retell [(1) ]() . This is why you're getting the "Not Found" error - the API can't find a valid Retell phone number matching your
from_number
.
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[2] Create Phone Number](https://docs.retellai.com/api-references/create-phone-number) [[3] Create Agent](https://docs.retellai.com/api-references/create-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy i want try test to get a retell number first in python
a
Thanks for the follow-up, @adekurniawan44_59865. I'll get back to you soon.
### Answer To purchase a Retell phone number using Python, you'll need to use the Python SDK [(1) ]() . Here's how to get started: 1. Install the Python SDK:
Copy code
bash
pip install retell-sdk
2. Initialize the Python client:
Copy code
python
from retell import Retell

client = Retell(
    api_key="YOUR_RETELL_API_KEY",
)
3. Create a phone number using the Python SDK: According to the Python SDK API documentation, you can use the
client.phone_number.create()
method [(2) ]() :
Copy code
python
phone_number_response = client.phone_number.create(
    # Add your parameters here
)
4. Alternative approach from the documentation: The documentation shows you can also create a phone number with specific parameters. From the Node.js example (which follows the same pattern) , you can assign agents to the number [(3) ]() :
Copy code
javascript
const phoneNumberResponse = await retell.phoneNumber.create({
 inbound_agent_id: "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD", // replace with the agent id you want to assign
 outbound_agent_id: "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD", // replace with the agent id you want to assign
}) ;
console.log(phoneNumberResponse) ;
Important notes: - Phone numbers are charged at $2 per month - Currently only US numbers are supported for purchase from Retell - You can optionally specify area codes when purchasing - Once purchased, phone numbers are yours indefinitely The Python SDK provides the
client.phone_number.create()
method with parameters that you can specify for your phone number purchase [(2) ]() .
​ To learn more, see the sources I considered: [[1] SDKs](https://docs.retellai.com/get-started/sdk) [[2] RetellAI/retell-python-sdk/api.md](https://github.com/RetellAI/retell-python-sdk/blob/main/api.md) [[3] Purchase phone number](https://docs.retellai.com/deploy/purchase-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
how to add my parameters here phone_number_response = client.phone_number.create( # Add your parameters here ) @AI Evy
how to add my parameters here phone_number_response = client.phone_number.create( # Add your parameters here ) @AI Evy
a
Thanks for the follow-up, @adekurniawan44_59865. I'll get back to you soon.
### Answer Based on the Create Phone Number API documentation, here are the parameters you can add to your Python phone number creation [(1) ]() :
Copy code
python
phone_number_response = client.phone_number.create(
    inbound_agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",  # Your agent ID for inbound calls
    outbound_agent_id="oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",  # Your agent ID for outbound calls
    area_code=415,  # US area code (3 digit integer)
    nickname="Frontdesk Number",  # Optional nickname for reference
    inbound_webhook_url="<https://example.com/inbound-webhook%22,>  # Optional webhook URL
    number_provider="twilio"  # Optional: "twilio" or "telnyx" (defaults to twilio)
)
Required vs Optional Parameters: - All parameters are optional -
area_code
is a 3-digit integer for US area codes only -
inbound_agent_id
- if null, the number won't accept inbound calls -
outbound_agent_id
- if null, the number can't initiate outbound calls without agent override -
nickname
is for your reference only -
inbound_webhook_url
allows you to override agent settings per call Simple example with just your agent:
Copy code
python
phone_number_response = client.phone_number.create(
    inbound_agent_id="agent_30992720c1b23f789b96942XXX",  # Replace with your actual agent ID
    outbound_agent_id="agent_30992720c1b23f789b96942XXX",  # Replace with your actual agent ID
    area_code=415  # Choose a US area code
)
print(phone_number_response)
Remember that phone numbers cost $2 per month and currently only US numbers are supported [(2) ]() .
​ To learn more, see the sources I considered: [[1] Create Phone Number](https://docs.retellai.com/api-references/create-phone-number) [[2] Purchase phone number](https://docs.retellai.com/deploy/purchase-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy I got this error when add phone number_response Traceback (most recent call last): File "/Users/user/Documents/Master_Study/Research_AI/experiment/assessment_work/jmile_singapore/ai_phone_agent/debug_retell.py", line 7, in phone_number_response = client.phone_number.create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/envs/feedbackenv/lib/python3.11/site-packages/retell/resources/phone_number.py", line 102, in create return self._post( ^^^^^^^^^^^ File "/opt/anaconda3/envs/feedbackenv/lib/python3.11/site-packages/retell/_base_client.py", line 1234, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/envs/feedbackenv/lib/python3.11/site-packages/retell/_base_client.py", line 1036, in request raise self._make_status_error_from_response(err.response) from None retell.NotFoundError: Error code: 404 - {'status': 'error', 'message': 'Not Found'}
a
Thanks for the follow-up, @adekurniawan44_59865. I'll get back to you soon.
### Answer The 404 "Not Found" error when creating a phone number typically indicates an authentication issue with your API key or an invalid agent ID [(1) ]() . Here's how to troubleshoot this: 1. Verify your Python client initialization:
Copy code
python
from retell import Retell

client = Retell(
    api_key="YOUR_RETELL_API_KEY",
)
[(2) ]() 2. Check your API key format: Make sure your API key is correct and properly formatted. The authentication header should contain your API key in the format "Bearer YOUR_API_KEY" [(1) ]() . 3. Verify your agent ID exists: Before creating a phone number, ensure your agent ID is valid. You can test this by trying to retrieve the agent first using the Python SDK [(2) ]() . 4. Simple phone number creation: Try creating a phone number without optional parameters first:
Copy code
python
phone_number_response = client.phone_number.create()
[(1) ]() 5. With minimal parameters:
Copy code
python
phone_number_response = client.phone_number.create(
    area_code=415
)
Common causes of 404 errors: - Invalid or expired API key - Non-existent agent ID in the
inbound_agent_id
or
outbound_agent_id
parameters - Incorrect API endpoint (though the Python SDK handles this automatically) [(2) ]() The Create Phone Number API accepts optional parameters like
inbound_agent_id
,
outbound_agent_id
,
area_code
,
nickname
,
inbound_webhook_url
, and
number_provider
[(1) ]() . If any agent IDs you specify don't exist, you'll get a 404 error. Try the minimal approach first, then gradually add parameters to identify which one is causing the issue.
​ To learn more, see the sources I considered: [[1] Create Phone Number](https://docs.retellai.com/api-references/create-phone-number) [[2] Retell Python API library](https://github.com/RetellAI/retell-python-sdk/blob/main/README.md) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
hi @AI Evy , I have tested with this code from retell import Retell client = Retell( api_key="key_8eb100896edecfea0619f336dxxx", ) phone_number_response = client.phone_number.create() print(phone_number_response.inbound_agent_id) and got error Traceback (most recent call last): File "/Users/user/Documents/Master_Study/Research_AI/experiment/assessment_work/jmile_singapore/ai_phone_agent/debug_retell.py", line 7, in phone_number_response = client.phone_number.create() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/envs/feedbackenv/lib/python3.11/site-packages/retell/resources/phone_number.py", line 102, in create return self._post( ^^^^^^^^^^^ File "/opt/anaconda3/envs/feedbackenv/lib/python3.11/site-packages/retell/_base_client.py", line 1234, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/envs/feedbackenv/lib/python3.11/site-packages/retell/_base_client.py", line 1036, in request raise self._make_status_error_from_response(err.response) from None retell.NotFoundError: Error code: 404 - {'status': 'error', 'message': 'Not Found'}
a
Thanks for the follow-up, @adekurniawan44_59865. I'll get back to you soon.
### Answer The 404 error you're receiving is likely due to an authentication issue with your API key [(1) ]() . Looking at the Create Phone Number API documentation, the authentication header must contain your API key in the format "Bearer YOUR_API_KEY" . Here's the correct JavaScript SDK example from the documentation:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.create() ;
console.log(phoneNumberResponse.inbound_agent_id) ;
Key troubleshooting steps: 1. Verify your API key format - Make sure your API key starts with the correct prefix and is complete 2. Check your account status - Ensure your Retell AI account has the necessary permissions to create phone numbers 3. Try with area code parameter - The Create Phone Number API accepts an
area_code
parameter as a 3-digit integer for US area codes :
Copy code
python
phone_number_response = client.phone_number.create(
    area_code=415
)
4. Verify the API endpoint - The Create Phone Number API uses the POST
/create-phone-number
endpoint The Create Phone Number API documentation shows that all body parameters are optional, including
inbound_agent_id
,
outbound_agent_id
,
area_code
,
nickname
,
inbound_webhook_url
, and
number_provider
. However, a 404 error typically indicates an authentication or authorization issue rather than a parameter problem. Note: Phone numbers purchased from Retell currently only support US area codes, and there may be account-level requirements for purchasing phone numbers .
​ To learn more, see the sources I considered: [[1] Create Phone Number](https://docs.retellai.com/api-references/create-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
hi @AI Evy, I don't have any phone number registered, because it should be bought. Is there any possiblity for me to test first, if it's okay later on I may bought the number
a
Thanks for the follow-up, @adekurniawan44_59865. I'll get back to you soon.
### Answer Yes, you can definitely test your agent without purchasing a phone number first! Retell AI offers multiple testing methods that don't require phone numbers [(1) ]() . Here are three ways to test your agent: *1. LLM Playground * Test conversation flows and responses by manually chatting with your agent using the LLM Playground . This allows you to test response accuracy and function calling accuracy . *2. LLM Simulation Testing * Automate testing by setting up customer scenarios and evaluating how your agent handles them . This method includes metrics-based evaluation of results . You can create simulated customer scenarios, automate testing, and evaluate agent performance [(2) ]() . *3. Web Call Testing [(1) ]() * Make test calls to your agent to evaluate its performance during real conversations . This tests response accuracy, function calling accuracy, background noise testing, and user interruption testing . Recommended Testing Workflow: 1. Start with LLM Playground to manually chat with your agent to iteratively improve its capabilities 2. Progress to LLM Simulation Testing once you have a functional agent 3. Conduct Web Call/Phone Call Testing to test in real-world conditions 4. Implement Batch Testing to ensure stability across various scenarios Getting Started with Testing: From the quick start guide, you can test your agent by clicking the "Test" button in your agent dashboard [(3) ]() . This allows you to test your agent before deploying to a phone number . The simulation testing features are particularly useful for testing without phone numbers, as they allow you to create test scenarios
and run batch tests to ensure your agent performs well before making any purchases [(2) ]() .
​ To learn more, see the sources I considered: [[1] Testing Overview](https://docs.retellai.com/test/test-overview) [[2] Retell AI Introduces Simulation and Batch Testing for AI Agents | Retell AI](https://www.retellai.com/blog/retell-ai-introduces-simulation-and-batch-testing-for-ai-agents) [[3] Build your first phone agent in 5 minutes](https://docs.retellai.com/get-started/quick-start) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy , can i use it API format so i can run in my python script
a
Thanks for the follow-up, @adekurniawan44_59865. I'll get back to you soon.
### Answer Yes, you can absolutely test your agent using API format in your Python script! Here are several ways to test without purchasing a phone number: 1. Create Chat Session for Testing You can create a chat session to test your agent using the Python SDK [(1) ]() :
Copy code
python
from retell import Retell

client = Retell(
    api_key="YOUR_RETELL_API_KEY",
)

chat_response = client.chat.create({ 
    agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' 
})
print(chat_response.agent_id)
2. Using the Python SDK for Testing The Python SDK provides convenient access to test your agent [(2) ]() :
Copy code
python
from retell import Retell

client = Retell(
    api_key="YOUR_RETELL_API_KEY",
)

agent_response = client.agent.create(
    response_engine={
        "llm_id": "llm_234sdertfsdsfsdf",
        "type": "retell-llm",
    },
    voice_id="11labs-Adrian",
)
print(agent_response.agent_id)
3. Async Usage for Testing You can also use async functionality for testing :
Copy code
python
import asyncio
from retell import AsyncRetell

client = AsyncRetell(
    api_key="YOUR_RETELL_API_KEY",
)

async def main() -> None:
    agent_response = await client.agent.create(
        response_engine={
            "llm_id": "llm_234sdertfsdsfsdf",
            "type": "retell-llm",
        },
        voice_id="11labs-Adrian",
    )
    print(agent_response.agent_id)

asyncio.run(main() )
Installation and Setup First, install the Python SDK [(3) ]() :
Copy code
bash
pip install retell-sdk
Then initialize your client :
Copy code
python
from retell import Retell

client = Retell(
    api_key="YOUR_API_KEY",
)
Key Benefits of Using the SDK for Testing: - The Python SDK requires Python 3.8+ and provides typed methods [(2) ]() - You get structured approach to integrating with Retell [(3) ]() - All errors inherit from
retell.APIError
for proper error handling [(2) ]() - You can test conversation flows and agent responses programmatically Testing Chat Sessions: The Create Chat API allows you to test your agent through chat interactions, which is perfect for testing without phone numbers. You can create chat sessions with your agent and test the conversation flow programmatically [(1) ]() . This approach lets you test your agent's functionality, response accuracy, and tool calling capabilities without needing to purchase a phone number first.
​ To learn more, see the sources I considered: [[1] Create Chat](https://docs.retellai.com/api-references/create-chat) [[2] Retell Python API library](https://github.com/RetellAI/retell-python-sdk/blob/main/README.md) [[3] SDKs](https://docs.retellai.com/get-started/sdk) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
I wanna buy Buy i Phone Number Twilio in Retell, How much should i pay
@AI Evy I wanna buy Buy i Phone Number Twilio in Retell, How much should i pay
a
Thanks for the follow-up, @adekurniawan44_59865. I'll get back to you soon.
### Answer ### Answer Based on the Retell AI pricing information, when you purchase a Twilio phone number through Retell AI, you'll pay $2 per month per phone number [(1) ]() . This pricing is confirmed in the Discord conversation where a user asked about the monthly charge for Twilio numbers purchased through Retell [(2) ]() . Key pricing details: - **Monthly cost**: $2 per month per phone number [(1) ]() - **Billing**: You'll be charged the full monthly fee even if you only use the number for 1-2 days [(2) ]() - **Provider options**: You can choose between Twilio or Telnyx when creating a phone number [(3) ]() To purchase a Twilio phone number through Retell AI using Python:
Copy code
python
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.create() ;
console.log(phoneNumberResponse.inbound_agent_id) ;
Available parameters for phone number creation: - `number_provider`: Set to "twilio" (this is the default) - `area_code`: 3-digit US area code (currently only US numbers supported) - `inbound_agent_id`: Your agent ID for handling inbound calls - `outbound_agent_id`: Your agent ID for handling outbound calls - `nickname`: Optional name for your reference Important notes: - Currently only US area codes are supported - The phone number will be in E.164 format (e.g., "+14157774444") - You can specify "twilio" or "telnyx" as the number provider
​ To learn more, see the sources I considered: [[1] AI Phone Numbers: How to Buy & Set Up | Retell AI](https://www.retellai.com/blog/how-to-buy-an-ai-phone-number-a-guide-on-your-options-and-providers) [[2] Discord message from @mrearthbound on 2025-06-25](https://discord.com/channels/1186424376300679209/1186462578310910112/1387537879277764658) [[3] Create Phone Number](https://docs.retellai.com/api-references/create-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
is there any verification
@AI Evy I wanna buy twilio is there any verification
a
Thanks for the follow-up, @adekurniawan44_59865. I'll get back to you soon.
### Answer Yes, there are verification options available when purchasing Twilio phone numbers through Retell AI. Here are the verification options: 1. Verified Phone Number You can apply for verified phone number status to prevent your phone number from being marked as "Spam Likely" [(1) ]() . Phone carriers may mark certain phone numbers as "Spam Likely", particularly when telephony providers like Twilio recycle previously used numbers . Steps for verification: Step 1: Create a Business Profile First, create a business profile by following the guide in Business Profile . Step 2: Apply for Phone Number Verification Once your business profile is set up, select it and submit your verification application through the dashboard . 2. Branded Caller ID You can also set up branded caller ID so customers see your business name instead of just a phone number [(2) ]() . This helps with call pickup rates and builds trust with customers . Verification Process Benefits: - Reduces the risk of calls being flagged as "Spam Likely" [(3) ]() - Improves answer rates - Provides carrier-verified numbers authenticated by major carriers (e.g., T-Mobile, AT&T, Verizon) Pricing Note: Based on Discord discussions, there may be additional fees for verification services. One user mentioned a $100 verification fee, though this appears to come from Twilio's pricing structure rather than Retell AI directly [(4) ]() [(5) ]() . **To purchase a Twilio number with
verification:**
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.create() ;
console.log(phoneNumberResponse.inbound_agent_id) ;
[(6) ]() After purchasing, you can then apply for verification through the Retell AI dashboard to ensure your number maintains trusted status and isn't flagged as spam [(1) ]() .
​ To learn more, see the sources I considered: [[1] Apply for verified phone number](https://docs.retellai.com/build/telephony/verified-phone) [[2] Branded Caller ID for Trusted Business Calls | Retell AI](https://www.retellai.com/blog/branded-caller-ids-and-verified-phone-numbers) [[3] AI Phone Numbers: How to Buy & Set Up | Retell AI](https://www.retellai.com/blog/how-to-buy-an-ai-phone-number-a-guide-on-your-options-and-providers) [[4] Discord message from @turkish5317 on 2025-05-22](https://discord.com/channels/1186424376300679209/1186462578310910112/1375201048091820165) [[5] Discord message from @dumpfile on 2025-05-22](https://discord.com/channels/1186424376300679209/1186462578310910112/1375207760043573268) [[6] Create Phone Number](https://docs.retellai.com/api-references/create-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
But I just want for testing
@AI Evy But I just want for testing
a
Thanks for the follow-up, @adekurniawan44_59865. I'll get back to you soon.
### Answer Yes, for testing purposes, you have several options that don't require purchasing a phone number or any verification [(1) ]() : Three Testing Methods Available: 1. LLM Playground - Test conversation flows and responses by manually chatting with your agent 2. LLM Simulation Testing - Automate testing by setting up customer scenarios and evaluating how your agent handles them, with metrics-based evaluation 3. Web Call/Phone Call Testing - Make test calls to your agent to evaluate its performance during real phone conversations Recommended Testing Workflow: 1. Start with LLM Playground to manually chat with your agent to iteratively improve its capabilities 2. Progress to LLM Simulation Testing once you have a functional agent 3. Conduct Web Call/Phone Call Testing to test your agent in real-world conditions 4. Implement Batch Testing to create and run multiple test cases to ensure your agent maintains stability and performance across various scenarios Testing Features Comparison: - LLM Playground: Available for all agents, medium effort required, supports response accuracy testing and function calling accuracy - LLM Simulation Testing: Available for conversation flow agents only, low effort required, includes batch testing capability - Web Call/Phone Call Testing: Available for all agents, high effort required, supports background noise testing and user interruption testing You can start testing immediately without any phone number purchase or verification - just use the LLM Playground or Simulation Testing features in your Retell AI dashboard .
​ To learn more, see the sources I considered: [[1] Testing Overview](https://docs.retellai.com/test/test-overview) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
2 Views