The API is free for non-commercial use. For commercial projects, defined as ... earning money from it, including, but not limited to in-app advertising, in-app purchases or you intend to learn from the data and repackage for sale, you need to contact Reddit to receive approval to use the API.
Note that Reddit (generally) merges open source projects with non-commercial ones.