https://retellai.com/?utm_source=discord&utm_medium=seo logo
Why am i getting a 500 internal server error when ...
# ❓・ai-evy-support
s
@AI Evy Why am i getting a 500 internal server error when using the https://api.retellai.com/create-knowledge-base API to simply add URL's? All URL's are valid.
a
Thanks for tagging me @seagul. I'll look through relevant sources and get back to you shortly.
### Answer The 500 Internal Server Error when adding URLs to a knowledge base via the API is a known issue that others have reported. [(1) ]() [(2) ]() [(3) ]() [(4) ]() Several users have encountered the same problem—the API returns
{"status":"error","message":"Internal Server Error"}
when including
knowledge_base_urls
, even with valid URLs. [(1) ]() [(3) ]() Workarounds that have been suggested: 1. Use the SDK instead of raw HTTP requests — some users have had success using the
retell-sdk
directly rather than making HTTP calls. [(1) ]() 2. Try creating the knowledge base without URLs first, using only
knowledge_base_texts
or
knowledge_base_files
, then add URLs separately if needed. [(3) ]() 3. Check URL accessibility — ensure the URLs are publicly accessible without login, cookies, or bot-blocking. Example using the SDK (JavaScript) :
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_urls: [
      "<https://www.retellai.com%22,>
      "<https://docs.retellai.com%22,>
    ],
  }) ;
  console.log(knowledgeBaseResponse.knowledge_base_id) ;
}
main() ;
[(5) ]() The Retell team has acknowledged this issue in multiple reports and is working on it. [(1) ]() [(4) ]() If the problem persists, you may want to reach out to support with your Org ID.
​ 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] Discord message from @wagreen. on 2025-10-15](https://discord.com/channels/1186424376300679209/1294891368505937952/1428134938728730758) [[3] Discord message from @colin_43491 on 2025-11-04](https://discord.com/channels/1186424376300679209/1294891368505937952/1435219186719653920) [[4] Knowledge Base through API - 500 Error](https://discord.com/channels/1186424376300679209/1456604973516198104) [[5] 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.