K Rudy
01/19/2026, 3:05 PMAI Evy
01/19/2026, 3:05 PMAI Evy
01/19/2026, 3:05 PMjavascript
import Retell from 'retell-sdk';
import fs from 'fs';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
async function main() {
const knowledgeBaseResponse = await client.knowledgeBase.addSources(
"knowledge_base_xxxxxxxxxxxx",
{
knowledge_base_files: [
fs.createReadStream("./sample.txt") ,
],
}
) ;
console.log(knowledgeBaseResponse.knowledge_base_id) ;
}
main() ;
Supported file formats include: .bmp, .csv, .doc, .docx, .eml, .epub, .heic, .html, .jpeg, .png, .md, .msg, .odt, .org, .p7s, .pdf, .ppt, .pptx, .rst, .rtf, .tiff, .txt, .tsv, .xls, .xlsx, .xml [(1) ]()
Could you share:
1. What file type you're trying to upload?
2. The file size?
3. Are you using the SDK or direct API calls?AI Evy
01/19/2026, 3:05 PMAI Evy
01/19/2026, 3:05 PM