https://retellai.com/?utm_source=discord&utm_medium=seo logo
I'm trying to create a knowledge base with the Ret...
# ❓・ai-evy-support
m
@AI Evy I'm trying to create a knowledge base with the Retell API but keep getting 500 Internal Server errors. What could be wrong?
a
Thanks for tagging me @micahmikes_95356. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available sources, there's a known issue with testing the Knowledge Base API through the API documentation interface [(1) ]() . According to community feedback, the API documentation interface doesn't properly support Knowledge Base creation testing, which can result in Internal Server Error responses . Instead of using the API documentation interface, you should test the Knowledge Base API using direct HTTP requests or the official SDKs . Here are the proper implementation approaches: Using the Node.js/TypeScript SDK:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const knowledgeBaseResponse = await client.knowledgeBase.retrieve('kb_1234567890') ;
console.log(knowledgeBaseResponse.knowledge_base_id) ;
[(2) ]() Using the Python SDK:
Copy code
python
from retell import Retell

client = Retell(
    api_key="YOUR_RETELL_API_KEY",
)
[(3) ]() Key requirements for creating a Knowledge Base: - Authentication header with format "Bearer YOUR_API_KEY" [(4) ]() - Knowledge base name must be less than 40 characters - File uploads are limited to 25 files, with each file limited to 50MB - URLs must be valid URLs Make sure you're using proper authentication and following the parameter requirements outlined in the API reference . If you continue experiencing issues with direct API calls (not through the documentation interface) , you may want to contact support for further assistance.
​ To learn more, see the sources I considered: [[1] Create Knowledge Base Api returning : {"status":"error","message":"Internal Server Error"}](https://discord.com/channels/1186424376300679209/1318647863525380126) [[2] Get Knowledge Base](https://docs.retellai.com/api-references/get-knowledge-base) [[3] Retell Python API library](https://github.com/RetellAI/retell-python-sdk/blob/main/README.md) [[4] 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.