better security and added nsfw flag to api