Darin
12/19/2025, 10:43 AMAI Evy
12/19/2025, 10:43 AMAI Evy
12/19/2025, 10:43 AMAI Evy
12/19/2025, 10:43 AMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
async function main() {
const knowledgeBaseResponse = await client.knowledgeBase.create({
knowledge_base_name: "Sample KB",
knowledge_base_texts: [
{
text: "Hello, how are you?",
title: "Sample Question",
},
],
knowledge_base_urls: [
"<https://www.retellai.com%22,>
"<https://docs.retellai.com%22,>
],
knowledge_base_files: [
fs.createReadStream("../sample.txt") ,
],
}) ;
console.log(knowledgeBaseResponse.knowledge_base_id) ;
}
main() ;
[(3) ]()
2. Ensure correct data types:
- knowledge_base_name must be a string (less than 40 characters)
- knowledge_base_texts must be an array of objects with text and title properties , [(4) ]()
- knowledge_base_urls must be valid URLs [(3) ]()
3. If using FormData directly, ensure the knowledge_base_name is properly formatted as a string. [(1) ]()
If the issue persists, this may be a temporary server-side issue — the Retell team has worked on knowledge base issues previously.AI Evy
12/19/2025, 10:43 AM