Added json requests for generating images