https://retellai.com/?utm_source=discord&utm_medium=seo logo
<@1145576664366055464> will you be able to set the...
# ❓・ai-evy-support
o
@AI Evy will you be able to set the cal.com api key via the api OR the sdk when creating a phone agent programatically?
a
Thanks for tagging me @owenmecham_16942. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can set the Cal.com API key programmatically when creating a Retell LLM Response Engine that includes Cal.com booking tools [(1) ]() . The Cal.com API key is configured within the tool definition of your LLM states or general tools. Here's how you can create an agent with Cal.com integration using the SDK:
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',
}) ;
[(2) ]() For the LLM Response Engine, you can include Cal.com booking tools with the API key in the tool configuration:
Copy code
javascript
const llmResponse = await client.llm.update('16b980523634a6dc504898cda492e939', {
 begin_message: 'Hey I am a virtual assistant calling from Retell Hospital.',
}) ;
[(1) ]() The Cal.com tool configuration includes the
cal_api_key
field where you specify your Cal.com API key . This tool can be added to either the
general_tools
array or within specific
states
tools array when updating your Retell LLM Response Engine . The workflow is: first create or update your Retell LLM Response Engine with the Cal.com tool configuration including your API key, then create an agent that uses that LLM Response Engine [(2) ]() .
​ To learn more, see the sources I considered: [[1] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[2] 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.