amine_86940
08/07/2025, 8:27 AMAI Evy
08/07/2025, 8:27 AMAI Evy
08/07/2025, 8:27 AMcreate-chat API endpoint, which returns a chat_id that you'll need for subsequent requests [(1) ]() . Then use the create-chat-completion API endpoint to generate responses from the chat agent .
Here's the correct implementation pattern:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
[(2) ]()
The API requires proper authentication with the header format "Bearer YOUR_API_KEY" [(3) ]() . Make sure you're using the correct agent_id in your request .
Common causes for Internal Server Error include:
- Incorrect API key format or missing authentication header
- Invalid agent_id parameter
- Malformed request body
Double-check that your request includes the required agent_id parameter and follows the proper authentication format .
If the issue persists, I'd recommend checking the API reference documentation for the exact request format and visiting [Contact Sales]() or [) for additional support.AI Evy
08/07/2025, 8:27 AMAI Evy
08/07/2025, 8:27 AMamine_86940
08/07/2025, 8:28 AM