I don't think you can filter closed questions in the API, so there are two options:
1. Pick a question, each with an even weight, then try again if it's closed (uses up quota faster)
2. Pick a random page of questions, then pick a random non-closed question from it (will give some questions higher chances of being picked than others)
The current quota is 150 random questions per day, option 1 will decrease it to around 130 (though picking a random _closed_ question would decrease it to around 20).