# Getting RuntimeError: OPENROUTER\_API\_KEY is not set

**URL:** <https://forum.codecrafters.io/t/getting-runtimeerror-openrouter-api-key-is-not-set/16270>\
**Category:** General\
**Tags:** challenge:claude-code\
**Created:** [September 6, 2026, 5:29pm UTC](https://forum.codecrafters.io/t/getting-runtimeerror-openrouter-api-key-is-not-set/16270 "2026-09-06T17:29:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AkashMalasetty](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/akashmalasetty/32/28519_2.png) [@AkashMalasetty](https://forum.codecrafters.io/u/AkashMalasetty)\
**Post date:** [September 6, 2026, 5:29pm UTC](https://forum.codecrafters.io/t/getting-runtimeerror-openrouter-api-key-is-not-set/16270/1 "2026-09-06T17:29:14Z")

</div>

Hey I am getting following error as soon as I run the command ./your\_program.sh -p “How many tools are available to you in this request? Number only.”

Error: Traceback (most recent call last):  
File “”, line 203, in \_run\_module\_as\_main  
File “”, line 88, in \_run\_code  
File “/Users/akashmalasetty/Documents/codecrafters-claude-code-python/app/main.py”, line 56, in  
main()  
~~~~ ^^  
File “/Users/akashmalasetty/Documents/codecrafters-claude-code-python/app/main.py”, line 17, in main  
raise RuntimeError(“OPENROUTER\_API\_KEY is not set”)  
RuntimeError: OPENROUTER\_API\_KEY is not set

can you help me how will I get the OPENROUTER\_API\_KEY

---

<div class="post-metadata">

**Author:** ![yeswanth](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/yeswanth/32/27558_2.png) [@yeswanth](https://forum.codecrafters.io/u/yeswanth)\
**Post date:** [September 8, 2026, 12:56pm UTC](https://forum.codecrafters.io/t/getting-runtimeerror-openrouter-api-key-is-not-set/16270/3 "2026-09-08T12:56:48Z")

</div>

Hi @AkashMalasetty

I see you have resolved the issue and started working on the challenges.

If you’re open to sharing, I’d be curious to know what the issue turned out to be and how you fixed it.
