add gallery template and fix api url