modify gallery api