use api for galleries