luckyeva_
04/25/2025, 5:30 AMAI Evy
04/25/2025, 5:30 AMAI Evy
04/25/2025, 5:30 AMtypescript
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);
}
[(2)]()
Would you like me to provide a general explanation of conversation flows based on the available documentation?AI Evy
04/25/2025, 5:30 AMluckyeva_
04/25/2025, 5:32 AMluckyeva_
04/25/2025, 5:32 AMAI Evy
04/25/2025, 5:32 AMAI Evy
04/25/2025, 5:33 AMAI Evy
04/25/2025, 5:33 AMAI Evy
04/25/2025, 5:33 AMluckyeva_
04/27/2025, 3:24 PMAI Evy
04/27/2025, 3:24 PMAI Evy
04/27/2025, 3:24 PMAI Evy
04/27/2025, 3:24 PMUnprocessableEntityError in both the Python and Node.js SDKs [(4)]() [(5)]() .
To handle these errors, you can implement error catching in your code. Here's an example using the Node.js SDK:
typescript
async function main() {
const agentResponse = await client.agent
.create({
response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
voice_id: '11labs-Adrian',
})
.catch(async (err) => {
if (err instanceof Retell.APIError) {
console.log(err.status); // 400
console.log(err.name); // BadRequestError
console.log(err.headers); // {server: 'nginx', ...}
} else {
throw err;
}
});
}
[(5)]()AI Evy
04/27/2025, 3:24 PM