Change render_json to render in API handler