https://retellai.com/?utm_source=discord&utm_medium=seo logo
Trying to create knowledge base getting internal s...
# ❓・ai-evy-support
d
@AI Evy Trying to create knowledge base getting internal server error, even when using "try it" in the documentation.
a
Thanks for tagging me @djmichaelscoop. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] internal server error on create knowledge base by API](https://discord.com/channels/1186424376300679209/1391417148215136376) [[2] When i try to use the create-knowledge-base endpoint, it returns internal server error.](https://discord.com/channels/1186424376300679209/1418609638391283813) [[3] Create Knowledge Base](https://docs.retellai.com/api-references/create-knowledge-base) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer Based on the available sources, there have been reported instances of internal server errors when creating knowledge bases through the API [(1) ]() [(2) ]() . When creating a knowledge base, ensure your request follows this format [(3) ]() :
Copy code
javascript
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() ;
If you're encountering this error even with the "try it" feature in the documentation, the Retell team has acknowledged knowledge base issues in the past [(1) ]() . I recommend reaching out to Retell support directly for assistance with this server-side issue. Check out these potentially useful sources: [Create Knowledge Base]() , [Knowledge Base]() Would you like me to provide a general answer based on my knowledge instead?