Learn how to use Retell’s Node.js and Python SDKs
Get Your API Key
Install the SDK
npm i retell-sdk
Initialize the Client
import Retell from 'retell-sdk'; const retellClient = new Retell({ apiKey: "YOUR_API_KEY", });
Make API Calls
try { const response = await retellClient.call.createPhoneCall({ from_number: '+14157774444', to_number: '+12137774445', }); console.log('Call initiated:', response); } catch (error) { console.error('Error making call:', error); }
const options = { method: 'POST', headers: { Authorization: '<authorization>', 'Content-Type': 'application/json' }, body: JSON.stringify({ response_engine: { type: 'retell-llm', llm_id: 'llm_234sdertfsdsfsdf' }, agent_name: 'Jarvis', voice_id: '11labs-Adrian', // ... many more configuration options }) }; fetch('https://api.retellai.com/create-agent', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import Retell from 'retell-sdk'; const client = new Retell({ apiKey: 'YOUR_RETELL_API_KEY', }); async function main() { const params: Retell.AgentCreateParams = { response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' }, voice_id: '11labs-Adrian', }; const agentResponse = await client.agent.create(params); }
Was this page helpful?