https://retellai.com/?utm_source=discord&utm_medium=seo logo
How to enable custom prompt that will be posted wh...
# ❓・ai-evy-support
b
@AI Evy How to enable custom prompt that will be posted when calling retell API?
a
Thanks for tagging me @biza8704. I'll look through relevant sources and get back to you shortly.
### Answer [(1) ]() :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const llmResponse = await client.llm.update('16b980523634a6dc504898cda492e939', {
 begin_message: 'Hey I am a virtual assistant calling from Retell Hospital.',
}) ;
console.log(llmResponse.llm_id) ;
There are two ways to enable custom prompts when calling the Retell API: Option 1: Use Dynamic Variables You can design your prompt to have dynamic variables and add those variables while creating a call using the Retell API [(2) ]() . This allows you to personalize prompts for each caller . Option 2: Create Agent with Custom Prompt You can directly use the create agent API with your custom prompt and use its ID while initiating the call . The Update Retell LLM API allows you to modify the
general_prompt
field, which is the general prompt appended to system prompt no matter what state the agent is in [(1) ]() . When updating an LLM, you can set custom prompts that will be used during API calls .
​ To learn more, see the sources I considered: [[1] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[2] Discord message from @akash_95873 on 2025-02-17](https://discord.com/channels/1186424376300679209/1186462578310910112/1341101106557620305) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.