mpunk
09/04/2025, 12:24 PMAI Evy
09/04/2025, 12:24 PMAI Evy
09/04/2025, 12:25 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.retrieve('16b980523634a6dc504898cda492e939') ;
console.log(chatResponse.agent_id) ;
The response should include a transcript field that contains the conversation history [(3) ]() [(2) ]() . You can also list all chat sessions to verify they're being created properly [(3) ]() :
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponses = await client.chat.list() ;
console.log(chatResponses) ;
If the transcript field is empty or missing, there might be an issue with how the chat session was created or if the conversation hasn't been properly processed yet. Make sure you're creating the chat session first using the create-chat API endpoint before using create-chat-completion [(1) ]() .AI Evy
09/04/2025, 12:25 PMAI Evy
09/04/2025, 12:25 PM