biza8704
09/06/2025, 6:34 PMAI Evy
09/06/2025, 6:34 PMAI Evy
09/06/2025, 6:34 PMjavascript
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 .AI Evy
09/06/2025, 6:34 PMAI Evy
09/06/2025, 6:34 PM